![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
So I have a potential bug in DB2 9.7 FP3a and am curious for some feedback before opening a PMR. To reproduce: create table test1.table (c1 int); create view test1.view (c1) as select c1 from test1.table; This creates a view that is explicitly dependent on TEST1.TABLE. If I extract the DDL for this view using db2look it returns as expected: |
|
This creates the objects TEST2.TABLE and TEST2.VIEW as expected. However, TEST2.VIEW is still dependent on TEST1.TABLE - not TEST2.TABLE, as you might expect: |
|
The ADMIN_COPY_SCHEMA procedure correctly alters the CREATE VIEW statement to create the view in the correct schema, but does not change the other instances of the source schema to the target schema. I expected that the objects in the newly-created schema depend on the other objects in the newly-created schema, not on objects in the "old" source schema. Is this a reasonable expectation? Or would you expect that views in the newly-created schema still depend on the source schema? |
#3
| |||
| |||
|
|
Does the same thing happen with other referenced objects, say for example foreign keys (I can't try myself right now)? I can't make up my mind whether I consider this a bug or not, but it would be nice if the docs described this behaviour. |
#4
| |||
| |||
|
|
On Oct 31, 9:03*pm, Lennart Jonsson <erik.lennart.jons... (AT) gmail (DOT) com wrote: Does the same thing happen with other referenced objects, say for example foreign keys (I can't try myself right now)? I can't make up my mind whether I consider this a bug or not, but it would be nice if the docs described this behaviour. Foreign keys are handled properly –*If TEST1.TABLE2 has a foreign key referencing TEST1.TABLE1, then when I use ADMIN_COPY_SCHEMA , the resulting TEST2.TABLE2 will reference TEST2.TABLE1. |
![]() |
| Thread Tools | |
| Display Modes | |
| |