After you change the default database user, you can generate DDL directly from the data model. PowerDesigner saves the results in a SQL script that you use to generate the tables and other objects in the target database.
Note
Use the model RAP_ASE.pdm to
generate DDL for the RAPCache database. Do not use
a different model by changing the target database to ASE, as this will
result in the loss of index information.
Click Database | Generate Database.
On the Database Generation dialog, click the browse button, and choose the directory where you want to store the script. Click OK.
In the File name box, type a name for the SQL script. You will use this script in the next procedure.
On the Tables & Views, Keys & Indexes, Database, and Options tabs, set options as listed in the following table:
On this tab... |
In this panel... |
Set these options... |
---|---|---|
Tables & Views |
Tables |
Create table |
Columns |
User Defined Type Check |
|
Keys & Indexes |
Primary keys |
Create primary key Inside Table |
Indexes |
Deselect Create index |
|
Foreign keys |
Create foreign key Outside Declarative Integrity |
|
Database |
User-defined data type |
Create data type |
Options |
Accept all defaults |
Click the Selection tab.
The Selection tab includes two drop-down boxes: the drop-down box on the left is used to choose the RAP model to generate, and the drop-down box on the right is used to choose the database owner.
From the drop-down box on the right, choose the database owner.
On the Tables tab, click the Select All button, which is to the right of the database owner drop-down box.
On the Domains tab, choose the database owner, click the Select All button, click Apply, then click OK.
PowerDesigner checks the model for any errors, builds a result list, and generates the DDL. The Result dialog appears, which identifies the name and location of the generated file. You can click the Edit button on the Result dialog to view the generated script. Close the Result dialog.
The Result List dialog appears in the background and may include
several warnings, for example, "Existence of
index"
and "Existence of reference."
These
warnings normally occur during generation.
Close the Result List dialog, then exit PowerDesigner.
If PowerDesigner prompts you to save the current workspace, click No.
If PowerDesigner prompts you to save the model, click Yes only if you want to save the modified model. Otherwise, click No.