How can the AM_Monthly_Summary tables be trimmed?

Article:TECH166167  |  Created: 2011-08-02  |  Updated: 2011-08-02  |  Article URL http://www.symantec.com/docs/TECH166167
Article Type
Technical Solution

Subject

Issue



After running the following queries, it was found that the table row count far exceeded the row count that was configured via the Resource Event Data Purge Settings for the Application Metering data classes:

SELECT COUNT (*) FROM Inv_AeX_AM_Monthly_Summary_Archive_spt
SELECT COUNT (*) FROM Inv_AeX_AM_Monthly_Summary_spt

Ho can these tables be trimmed so that purging will work again?


Environment



Application Metering Solution


Solution



The attached queries will trim those two tables so that they only contain data from 2011, and can easily be modified to target different time periods.

The 2011 data will be copied to a temporary table, the original table will then be truncated (truncate action enters one row in the transaction logs; whereas delete actions enter a row for each row that is deleted, so truncate is better as it saves log space), the 2011 data is then moved back and the temporary table is removed.


Attachments

Process to trim the Inv_AeX_AM_Monthly_Summary_Archive_spt table.
Trim_Inv_AeX_AM_Monthly_Summary_Archive_spt.sql (2 kBytes)
Process to trim the Inv_AeX_AM_Monthly_Summary_spt table.
Trim_Inv_AeX_AM_Monthly_Summary_spt.sql (2 kBytes)






Article URL http://www.symantec.com/docs/TECH166167


Terms of use for this information are found in Legal Notices