1 Reply Latest reply on Feb 26, 2013 7:14 AM by LadaVarga

    Automatically Clearing Events

    rick.harwood

      Is there any way to automatically clear certain events in NPM. I have hundreds of events that I really don't want cluttering up my event screen and want to automatically remove them, while keeping all other events.

      Thanks

      Rick

        • Re: Automatically Clearing Events
          LadaVarga

          Hello

           

          You can create SQL script which can be run every day via task scheduler in the server.

          I think SQL studio has such function.

          Best solution will update "acknowledged' collumn in events table. I don't recommended delete that events.

           

          Example:

          UPDATE Events SET Acknowledged=1 where Message = 'message'

           

          Use wisely, backup table or DB before such trying.

           

          If you need it automatically, fastest solution is use SQLCMD command it is added via SQL managment studio. SQL managment studio is free tool from microsoft.

          Example:

          sqlcmd -S localhost -d SolarwindsOrion -i c:\SQLQuery1.sql

          (in that example user who run that script should have rights to run query on your database.

          Whole help can get sqlcmd /?

          You can creat .bat file and use that .bat file in Task Scheduler in the server and run script every hour/day/month,