The SQL statements that the DDL operator supports are specified in the Teradata PT APPLY statement.
The following examples show how to specify DDL statements in the APPLY statement:
- One SQL statement per group
APPLY 'ddl stmt1', 'ddl stmt2', ......... 'ddl stmt3' TO OPERATOR (operator specification)
- Multiple SQL statements in a group, but only one group
APPLY ('ddl stmt1','ddl stmt2', ... ,'ddl stmtn') TO OPERATOR (operator specification)
- Multiple SQL statements per group, and multiple groups
APPLY ('ddl stmt11','ddl stmt12', ... ,'ddl stmt1n'), . . . ('ddl stmtx1','ddl stmtx2', ... ,'ddl stmtxm') TO OPERATOR (operator specification)
If more than one statement is specified in one group, then the DDL operator combines all statements into one single multistatement request and sends it to the database as one implicit transaction. This means that any statement failure or any error rolls back the entire transaction.
The SQL statements are executed by groups in the order they are specified in the APPLY statement. Currently, the maximum number of SQL statement groups that can be specified in the APPLY statement is 1024. If the number of SQL statement groups is greater than 1024, Teradata PT terminates the job with the TPT05537 error message.