cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 DDL generation order

Former Member
0 Kudos

Hi,

I am using PD 16.5. I have a problem with generating DDL for an auxiliary table. It appears in front of the CREATE DATABASE statement. That's not what I want. According to the manual it should be genrated at the end of the DDL because it is an Extended Object. That is also where I want it.

I tried to change the generation order in the DBMS file, but that is not possible for Extended Objects (again according to the manual).

Anyone a suggestion how to solve this. Or is this a bug?

regards

Dirk Verburg

Accepted Solutions (0)

Answers (2)

Answers (2)

marc_ledier
Active Participant
0 Kudos

Hi,

There are many ways to control the generation order.

* You can change the item in the XDB (Script\Objects\GenerationOrder) that control in which order the metaclass are distributed in DDL generation.

* Dependencies between object should influence the objects order in DDL generation (ex. View on Tables)

* You also can manually create a traceability link between two objects (regardless metaclass) with type "DBCreateAfter". This will instruct PowerDesigner to respect the order between objects.

In your case, you may need and fill) an extended attribute of type Database on your extended object to create the dependency.

Marc

former_member185199
Contributor
0 Kudos


I had several times the problem that even standard objects are not generated in the right order

(i.e view creation before table creation and so on )

The problem is that this is not reproducable behavoir and therefore hard to open a case,

but i would treat this as a bug

regards

dj

Former Member
0 Kudos

Hi Dirk,

Thanks for your reply.

In my case, this error is perfectly reproducable.

I had other problems with the order of objects in the DDL, but they are all solved now.

In my case (DB2 zOS v10) it was all a matter of connecting the objects to the correct database within the model

regards

Dirk

former_member185199
Contributor
0 Kudos


Interesting, we are using also zOS v10 , i will test if this might be the case, are you speaking about physical option database ???

Former Member
0 Kudos

Yes Dirk,

We define several databases for one application in one model.

1. The tablespaces must be connected to one of the databases through the physical option IN. Select the correct database from the list.

2. And then the tables must be connected as usual to the tabespace using the physical options of the table (choose the IN option and then select the tablespace from the list).

But make sure you define the database before you connect the tablespaces.