movehistorydata
Use the movehistorydata when access to the database becomes too slow. This command moves the data present in the Job Repository to the archive tables
Slow database access might be due to a huge number of records being present in the database, for example when bulk job submissions are performed.
When you run this command, the jobs are moved to the following tables in the database:
- JOA_JOB_ARCHIVES
- Contains archived job instances
- JRA_JOB_RESOURCE_ARCHIVES
- Contains resource information related to the jobs
- MEA_METRIC_ARCHIVES
- Contains metrics collected for the jobs
If your HCL Workload Automation database
is DB2 and you use FIPS security, to run this command successfully
you need to have the com.ibm.tdwb.dao.rdbms.useSSLConnections option
set to TRUE
in the CLIConfig.properties
file.
Syntax
movehistorydata ?
movehistorydata -dbUsr db_user_name-dbPwd db_user_password [-successfulJobsMaxAge successfulJobsMaxAge [-notSuccessfulJobsMaxAge notSuccessfulJobsMaxAge ]
Description
This command performs a cleanup operation on the Job Repository database. Based on the values you specify, information on submitted jobs is moved to the archive database and the information in the archive database is deleted.
Use this command to temporarily override the settings defined in the JobDispatcherConfig.properties file, when unexpected events require an immediate database cleanup. The settings in the JobDispatcherConfig.properties file remain unchanged. For more information on the JobDispatcherConfig.properties file, refer to the HCL Workload Automation: Administration Guide.
Options
- ?
- Displays help information.
- -dbUsr db_user_name
- Specifies the username for a user authorized to perform operations on the database server.
- -dbPwd db_user_password
- Specifies the password for a user authorized to perform operations on the database server.
- -successfulJobsMaxAge successfulJobsMaxAge
- Specifies how many hours jobs completed successfully or canceled must be kept in the Job Repository database before being archived. The default value is 240 hours, that is ten days.
- -notSuccessfulJobsMaxAge notSuccessfulJobsMaxAge
- Specifies how many hours jobs completed unsuccessfully or in unknown status must be kept in the Job Repository database before being archived. The default value is 720 hours, that is 30 days.
Return Values
The movehistorydata command returns one of the following values:- 0
- Indicates that movehistorydata completed successfully.
- < > 0
- Indicates that movehistorydata failed.
Examples
- To move to the archive database all successful jobs completed
in the last 40 hours, type the following command:
movehistorydata -dbUsr halmst -dbPwd dgordon -successfulJobsMaxAge 40
- To move to the archive database all jobs in all supported statuses and remove from the archive
database all jobs older than 700 hours, type the following
command:
movehistorydata -dbUsr halmst -dbPwd dgordon -successfulJobsMaxAge 0 -notSuccessfulJobsMaxAge 0