Use the compare_ddl element in the job creation XML to specify that DDL comparison be performed for the individual object, for all tables and views in a database, or for all tables and views in the job.
The compare_ddl flag is always optional at the object, database or job level; you do not need to explicitly set a value. By default, DDL comparison is enabled when you specify an individual table or view to be copied, and disabled for tables and views when copying an entire database.
- Open the parameters.xml file that has the job definition information for the job.
- Add a compare_ddl element in the appropriate location in the job creation XML, and specify the desired value:
Option Description true Perform DDL comparison for the individual object or for all tables and views in the database or in the job. false Do not perform DDL comparison for the individual object or for all tables and views in the database or in the job unspecified Use the default value unless a different higher priority value is specified. The following examples illustrate the placement of the compare_ddl element, according to the scope level at which you want to set the DDL comparison flag.
Table example: DDL comparison is performed for Table1 (by default) and not performed for Table2.
<table selection="included"> <name>Table1</name> </table> <table selection="included"> <name>Table2</name> <compare_ddl>false</compare_ddl> </table>
View example: DDL comparison is performed when copying the view. Note that the copyData element must also be set to true.
<views> <view selection="included" copyData="true"> <name>deptsals</name> <database>MyDb</database> <view_data_table> <target_table>TargetTable</target_table> <target_database>TargetDb</target_database> </view_data_table> <compare_ddl>true</compare_ddl> </view> </views>
Database example: DDL comparison is performed for all tables and views in the database.
<database selection="all"> <name>MyDB</name> <compare_ddl>true</compare_ddl> </database>
Tables in a database example: DDL comparison is performed on tables in the MyDB database other than the MyDB.PPIOrders table when an entire database is copied.
<database selection="all"> <name>MyDB</name> <compare_ddl>true</compare_ddl> <table selection="included"> <name>PPIOrders</name> <compare_ddl>false</compare_ddl> </table> </database>
Job example: DDL comparison is performed for all tables and views in the job.
<job_name>MyJob</job_name> ... <overwrite_existing_objects>true</overwrite_existing_objects> <force_utility>tptapi</force_utility> <compare_ddl>true</compare_ddl> <database> ... </database>