Note: |
In the Corporate edition of Enterprise Architect, if security is enabled you must have Generate Source Code and DDL permission to generate DDL. |
In this procedure, you can generate DDL for a package, and also compare the DDL with the database.
Generate DDL
To generate DDL for a package, follow the steps below:
- Right-click on the required package in the Project Browser window. The context menu displays.
- Select the Code Engineering | Generate DDL menu option. The Generate Package DDL dialog displays.

Note: |
Alternatively you can select the Project | Database Engineering | Generate Package DDL menu option. |
- Select the checkbox against each inclusion required. Deselect the checkboxes for inclusions you do not require.
Note: |
If generating Oracle sequences, you must always select the Generate Triggers and Generate Sequences checkboxes; this ensures that a pre-insert trigger is generated to select the next sequence value to populate the column. |
- To recursively generate DDL, select the Include All Child Packages checkbox.
- Click on the Generate button to proceed. Enterprise Architect prompts you for file names as the process executes.
Compare DDL For a Database
When you have generated the DDL, you can compare it with the database. To do this, follow the steps below:
- On the Generate Package DDL dialog, click on the Compare button. The Compare With Database dialog displays.

- Click on the [ ... ] button and locate the required database on the Select Data Source dialog.
- For an Oracle database, if required you can also specify the Owner in the Schema/Owner field.
- Click on the View button to perform the comparison. The Comparison Database dialog displays with the results of the comparison.



