Creating a New Diagram

Working with Common Format Designer 6-5

6.3 Generating DDL scripts

When data structure changes have been performed in a data server, you usually perform an incremental reverse-engineering in Oracle Data Integrator to retrieve the new metadata from the data server. When a diagram or data model is designed or modified in Oracle Data Integrator, it is necessary to implement the data model or the changes in the data server containing the model implementation. This operation is performed with DDL scripts. The DDL scripts are generated in the form of Oracle Data Integrator procedures containing DDL commands create table, alter table, etc. This procedure may be executed on the data server to apply the changes. To generate the DDL scripts:

1. In the Models tree of Designer Navigator, select the data model for which you

want to generate the DDL scripts.

2. Right-click, then select Generate DDL. The Generate DDL for Oracle Data

Integrator Model dialog is displayed.

3. Click Yes if you want to process tables that are not in the Oracle Data Integrator

model, otherwise click No. Oracle Data Integrator retrieves current state of the data structure from the data server, and compares it to the model definition. The progression is displayed in the status bar. The Generate DDL Editor appears, with the differences detected.

4. Select the Action Group to use for the DDL script generation.

5. Click the ... button to select the Generation Folder into which the procedure will be created.

6. Select the folder and click OK.

7. Filter the type of changes you want to display using the Filters check boxes.

8. Select the changes to apply by checking the Synchronization option. The

following icons indicate the type of changes: ■ - : Element existing in the data model but not in the data server. ■ + : Element existing in the data server but not in the data model. ■ = : Element existing in both the data model and the data server, but with differences in its properties example: a column resized or attached elements example: a table including new columns.

9. Click OK to generate the DDL script.

Oracle Data Integrator generates the DDL scripts in a procedure and opens the Procedure Editor for this procedure. Note: The templates for the DDL scripts are defined as Action Groups. Check in the Topology Navigator that you have the appropriate action group for the technology of the model before starting DDL scripts generation. For more information on action groups, please refer to the Knowledge Module Developers Guide for Oracle Data Integrator.