DDLGenerator

Description

The DDLGenerator generates DDL based on a comparison result file. The input parameter targetTreatment decides how specific the generated DDL should be, meaning that for example only the DDL for missing objects in the target should be generated, or every object should be re-generated, even if it does exist in the target. The generated DDL is written into an SQL file (files/DDL.sql per default).

DDL can be generated for the following objects:
Auxiliary object, Tablespace, Table, Index, Constraint, Sequence, View, Grant, Alias

Names

Short

ddlgen

Full

DDLGenerator

Input parameters

Parameter Description

inputFile

The object container file of the source system.

targetObjectContainerFile

The object container file of the target system.

comparisonFile

The file containing the result of the comparison based on which the DDL is being generated.

outputFile

The file the generated DDL will be written into.

droppedTableFile

The file for the information which tables are dropped.

databaseVersion

The version of the target database.

databaseType

The type of the target database.

targetTreatment

The handling of how the generated DDL should be treated in target, set by the DropOption.

Output parameters

Parameter Description

return code

The return code of the program.

Output information

Parameter Description

outputFile

The file the generated DDL will be written into. Default: files/DDL.sql

droppedTableFile

The file for the information which tables are dropped. Default: raw/DroppedTables.oc

Known limitations

  • When generating DDL for tables using a custom data type, the respective CREATE TYPE statement is generated every time. It is not checked if the type already exists in the target database. Possible errors coming from the CREATE TYPE statement are not handled.