DBQL log maintenance is automated. To set up DBQL log maintenance, do the following things:
Run the DIP script DIPPDCR.
This creates DBQL (and other system performance) history tables and the data extraction macros that populate the tables.
Use the Viewpoint portlet Performance Data Collection to set up the DBQL job and run it every day.
This job moves data from the DBQL log tables to the history tables created by DIPPDCR. You can also use the portlet to specify how long the history tables are retained.
Create and maintain an executable BTEQ script file to keep your final BEGIN QUERY LOGGING or REPLACE QUERY LOGGING statements.
Do this in case a system initialization is required in the future for disaster recovery or to migrate to a new platform. After the database has been restored, you can start a BTEQ session and run the script to easily repopulate DBQLRuleTbl and rebuild your rules cache.