|
Huntland Services Ltd Tel: +44 (0)1392-490518
|
Delete Events |
||
| Back | Download The Scripts | ||
|
IntroductionSometimes its useful to be able to 're-set' the events for a particular server. Maybe you have been experimenting or have only just rolled out Mom and already have a considerable number of events in the database generated by a particular machine. This is even more likely if it's taken a bit of time to realise that some of those events are just not very interesting and were collected by default when you activated one of the management packs. So now you have Mom fine tuned but the database is full of junk. How do you get rid of it? There are two ways.
Run DeleteEvents.vbs from a Command Prompt using CSCRIPT. You will need to specify the following paramaters:
In all cases your account must have access to the MOM SQL Server and at least read access to the Onepoint database. Windows Security ('Integrated') is assumed. If your database is many gigabytes in size then you can expect a delay while the script runs. Each script has two commented timeout values controlling the maximum connection time and the maximum time to run a command. By default these are set low and may have to be increased for larger databases.
DeleteEvents.vbsPurpose: To permanently remove all traces of events logged by a particular machine Syntax: cscript DeleteEvents .vbs myMomSqlServer myServer Result:
EventParam ........
Or if there was a problem, the deletions would all be rolled back, restoring the database to its origional condition. e.g. no deletions have taken place:
There has been a problem
objCn.connectionTimeout =
15 'Increase this value (in
seconds) if server timeout errors occur
Please accept this script as is. Any feedback will be gratefully received at Debug@Huntland.co.uk |
|||