|
Huntland Services Ltd Tel: +44 (0)1392-490518
|
Delete Sampled Numeric Data |
||
| Back | Download The Script | ||
|
IntroductionSometimes its useful to be able to 're-set' the sampled numeric data for a particular server. Maybe you have been experimenting or have only just rolled out Mom and already have a considerable amount of performance data generated by a particular machine. This is even more likely if it's taken a bit of time to realise that some of the data is just not very interesting and was 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 DeleteSND.vbs from a Command Prompt using CSCRIPT. You will need to specify the following parameters:
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.
DeleteSND.vbsPurpose: To permanently remove all traces of events logged by a particular machine Syntax: cscript DeleteSND.vbs myMomSqlServer myServer Result: Table SampledNumericData.............
Or if there was a problem, the deletions would all be rolled back, restoring the database to its original 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 |
|||