Purpose
The cleanup command cleans up Teradata DSA, Teradata PT API, and Teradata JDBC tasks from a job that failed or was stopped before completing successfully. The command deletes staging, error, work, and log tables and releases HUT locks, depending on the underlying utility used for the job.
Parameters
See Parameter Order.
- dm.rest.endpoint
- [Optional] Enter a Data Mover REST server URL to overwrite the default value specified in the commandline.properties file in order to connect to a different REST server (and therefore a different daemon) at runtime.
- job_name
- Name of the job to be cleaned up.
- security_password
- [Optional] Password for the super user or authorized Viewpoint user.
- security_password_encrypted
- [Optional] Encrypted password for the super user.
- security_username
- [Optional] User ID of the super user or authorized Viewpoint user. The user ID of the super user is dmcl_admin and cannot be changed.
Usage Notes
The following information is specific to the type of job running cleanup:
- Teradata DSA – a DSA stop command is issued for the running job and DSMAIN stops the job and releases any locks.
- Teradata PT API – existing target log, work, error, and staging tables are dropped.
- Teradata JDBC – existing target staging tables are dropped.
The cleanup command only cleans up job instances that are not currently running. To clean up a currently running job, stop the job and then run cleanup.
XML File Example
For the cleanup command, type datamove cleanup -f parameters.xml.
In the following example, the parameters file cleans up database artifacts that are left by the stopped or failed job 12315DFHJKS:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <dmCleanup xmlns="http://schemas.teradata.com/dataMover/v2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.teradata.com/unity/datamover.xsd"> <job_name>12315DFHJKS</job_name> </dmCleanup>