Reduce the size of WUG databases

Reduce the size of WUG databases

If you have a problem with WhatsUp Gold database size, you can use Database Tools to Purge expired rows. But if you have non expired data and you need to delete, so you should delete them directly from database.

Tables that have an unexpectedly large number of rows in them may indicate a problem. You can either DELETE or TRUNCATE the table. DELETE option is a more measured approach, whereas the TRUNCATE option empties the table. For DELETE you can do so in small chunks, by date; however, this process will be slower.

For example, if one of your large tables is dbo.PassiveMonitorActivityLog then you can select a date, where all entries prior to that date will be deleted. Let us say you want to delete all entries in the dbo.PassiveMonitorActivityLog table prior to 1/1/2012 then run the following command:

DELETE FROM dbo.PassiveMonitorActivityLog WHERE dEventTime < ‘1/1/2012′  

If the Statistical tables are the ones that happen to be large, then choose to either DELETE or TRUNCATE.

DELETE FROM dbo.StatisticalPing WHERE dPollTime < ‘1/1/2012′

Alternatively, you can empty a table’s contents by running this query:

TRUNCATE Table dbo.StatisticalPing

Then repeat what you did using Database Utilities

 

Note:

  1. You have made a backup before performing Delete or Truncate.
  2. You can change the time to the required one.
  3. Make sure that if you are collecting SNMP Traps or Syslogs, that “Accept Unsolicited” is not enabled under the Passive Monitor Listeners (WhatsUp Gold Server Console > Configure > Program Options > Passive Monitor Listeners).