Preparing for offline database cleanup
Before you run Offline Cleanup, review the following preparatory tasks and perform the tasks that are necessary for your environment:
To use the Offline Cleanup utility on Red Hat Linux, you must have several 32-bit library files (.i386 or .i686 extension) installed.
- To maintain data consistency, ensure that all Application Servers are shut down and that no ETL processes are running on the database.
- Ensure that the Application Server is upgraded to TrueSight Server Automation version 8.3 SP2 or later.
- Ensure that the database statistics are updated before running the wizard.
- BMC recommends that you run an ETL for data older than the retention period that you want to store in the Reporting Data Warehouse. After Cleanup is run, the data will not be available to load into the Data Warehouse.
- Back up the database before you begin the cleanup.
- You can choose to upgrade the database either before or after performing Offline Cleanup.
- Ensure that the database user is granted the permissions required by TrueSight Server Automation. For the list of permissions, see List-of-required-database-permissions. For offline database cleanup, the database user is required to have the following additional permissions:
- Oracle. The Oracle DBA must ensure that the BladeLogic database user has the appropriate permissions to run the Offline Cleanup:
- Create Job
Syntax: GRANT CREATE JOB TO <bsa schema user> - Create External Job
Syntax: GRANT CREATE EXTERNAL JOB TO <bsa schema user> - Execute on DBMS scheduler
Syntax: GRANT EXECUTE ON DBMS_SCHEDULER TO <bsa schema user>
- Create Job
- SQL Server:
- The database user should have sysadmin role.
Syntax: EXEC master..sp_addsrvrolemember @loginame = <bsa db user>, @rolename = 'sysadmin' - SQL Server Agent Service is running.
- The database user should have sysadmin role.
- Oracle. The Oracle DBA must ensure that the BladeLogic database user has the appropriate permissions to run the Offline Cleanup:
Prior to running the cleanup process, it is worthwhile to capture the current size of the database tables so that these sizes can be compared to the post-cleanup sizes. To capture database table sizes, run one of the provided scripts, depending on your database type — either or .
For various other methods for checking up on the state of your database, see Determining-the-state-of-the-database-before-or-during-cleanup.
- To evaluate the impact of the cleanup process on the TrueSight Server Automation job data that you have stored in your database, you can use the dbm_cli command line utility. Use the following information modes:
To evaluate how much data would be cleaned out with various retention times, run the following command:
./dbm_cli.nsh -evalTo determine what jobs and job runs would be affected by various retention times, run a command similar to the following example command:
./dbm_cli.nsh -impact Snapshot=30This command is useful for determining whether the retention value passed during offline cleanup would remove any job runs that might need to be kept, as well as to see which specific jobs would be affected by the cleanup.