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 certain 32-bit library files 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 BMC 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 installation.
- You can choose to upgrade the database either before or after performing Offline Cleanup.
- Database user is required to have following privileges or prerequisites:
- 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:
For an Oracle database, follow these steps:
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 .
- To evaluate the impact of the cleanup process on the BMC 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.