![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Troels Arvin wrote: Yes, that's also what I told the user to do. However, this will mean losing indexes, constraints, permissions, and triggers as far as I can see. You can check out the article Kovi pointed to. It deals with these guys. Cheers Serge -- Serge Rielau DB2 Solutions Development IBM Toronto Lab |
#12
| |||
| |||
|
|
"Serge Rielau" <srielau (AT) ca (DOT) ibm.com> wrote in message news:6gt9grFhgepbU1 (AT) mid (DOT) individual.net... Troels Arvin wrote: Yes, that's also what I told the user to do. However, this will mean losing indexes, constraints, permissions, and triggers as far as I can see. You can check out the article Kovi pointed to. It deals with these guys. Cheers Serge -- Serge Rielau DB2 Solutions Development IBM Toronto Lab I am a bit confused by the following statement in the article referenced: "The composition of the DDL objects is entirely based on the documented SYSCAT catalog views, with one exception. The high watermark for an IDENTITY column needs to be retrieved from SYSIBM.SYSSEQUENCES.LASTASSIGNVAL, which is not exposed in DB2 UDB V8." Does COPYSCHEMA(<TARGETSCHEMA>,<TARGETTABLESPACEINFO>,< SOURCESCHEMA>) reset the sequences and/or indentify columns to the same last assinged value as the source schema? Does the COPYSCHEMA SP work differently in V9.5 versus V8 in this regard? Yes.... in the same sense as the value is preserved by a |
#13
| |||
| |||
|
|
"Serge Rielau" <srielau (AT) ca (DOT) ibm.com> wrote in message news:6gt9grFhgepbU1 (AT) mid (DOT) individual.net... Troels Arvin wrote: Yes, that's also what I told the user to do. However, this will mean losing indexes, constraints, permissions, and triggers as far as I can see. You can check out the article Kovi pointed to. It deals with these guys. Cheers Serge -- Serge Rielau DB2 Solutions Development IBM Toronto Lab I am a bit confused by the following statement in the article referenced: "The composition of the DDL objects is entirely based on the documented SYSCAT catalog views, with one exception. The high watermark for an IDENTITY column needs to be retrieved from SYSIBM.SYSSEQUENCES.LASTASSIGNVAL, which is not exposed in DB2 UDB V8." Does COPYSCHEMA(<TARGETSCHEMA>,<TARGETTABLESPACEINFO>,< SOURCESCHEMA>) reset the sequences and/or indentify columns to the same last assinged value as the source schema? Does the COPYSCHEMA SP work differently in V9.5 versus V8 in this regard? Yes.... in the same sense as the value is preserved by a |
#14
| |||
| |||
|
|
Yes.... in the same sense as the value is preserved by a db2stop/db2start. The tool works the same on DB2 V8 and DB2 9.5. It's just that the column in question wasn't exposed in DB2 V8. Cheers Serge Serge Rielau DB2 Solutions Development IBM Toronto Lab |
#15
| |||
| |||
|
|
Yes.... in the same sense as the value is preserved by a db2stop/db2start. The tool works the same on DB2 V8 and DB2 9.5. It's just that the column in question wasn't exposed in DB2 V8. Cheers Serge Serge Rielau DB2 Solutions Development IBM Toronto Lab |
#16
| |||
| |||
|
|
On 8/18/2008 at 4:34 PM, in message wJmqk.12227$XB4.3006 (AT) bignews9 (DOT) bellsouth.net>, Mark A<xxxxxx (AT) xxxxx (DOT) com |
|
"Serge Rielau" <srielau (AT) ca (DOT) ibm.com> wrote in message news:6gtgmeFhhiq1U1 (AT) mid (DOT) individual.net... Yes.... in the same sense as the value is preserved by a db2stop/db2start. The tool works the same on DB2 V8 and DB2 9.5. It's just that the column in question wasn't exposed in DB2 V8. Cheers Serge Serge Rielau DB2 Solutions Development IBM Toronto Lab I tried using the stored procedure SYSPROC.ADMIN_COPY_SCHEMA to copy a schema from one name to another in the same database. 1. The proc I executed above is a different stored procedure than mentioned in the link from this thread. The one I used above comes with DB2 V9.5. 2. When I call the stored procedure, it copies the schema and data (if I use COPY or COPYNO), but it does not set the identity column last value to the same values as the source schema, so that upon the first insert into the new schema there is a duplicate unique constraint error (-803). |
#17
| |||
| |||
|
|
On 8/18/2008 at 4:34 PM, in message wJmqk.12227$XB4.3006 (AT) bignews9 (DOT) bellsouth.net>, Mark A<xxxxxx (AT) xxxxx (DOT) com |
|
"Serge Rielau" <srielau (AT) ca (DOT) ibm.com> wrote in message news:6gtgmeFhhiq1U1 (AT) mid (DOT) individual.net... Yes.... in the same sense as the value is preserved by a db2stop/db2start. The tool works the same on DB2 V8 and DB2 9.5. It's just that the column in question wasn't exposed in DB2 V8. Cheers Serge Serge Rielau DB2 Solutions Development IBM Toronto Lab I tried using the stored procedure SYSPROC.ADMIN_COPY_SCHEMA to copy a schema from one name to another in the same database. 1. The proc I executed above is a different stored procedure than mentioned in the link from this thread. The one I used above comes with DB2 V9.5. 2. When I call the stored procedure, it copies the schema and data (if I use COPY or COPYNO), but it does not set the identity column last value to the same values as the source schema, so that upon the first insert into the new schema there is a duplicate unique constraint error (-803). |
#18
| |||
| |||
|
|
As far as I can tell this is "working as designed". However, it could use some "design improvement" in my opinion. Here is a thread I participated in in the DB2 Express forum: http://www.ibm.com/developerworks/fo...214937&tstart= 30 Especially look at my post dated Jul 25, 2008 07:36:26 PM and the response from Raul Chong of IBM on Jul 28, 2008 10:04:17 AM. What do you think? Frank |
#19
| |||
| |||
|
|
As far as I can tell this is "working as designed". However, it could use some "design improvement" in my opinion. Here is a thread I participated in in the DB2 Express forum: http://www.ibm.com/developerworks/fo...214937&tstart= 30 Especially look at my post dated Jul 25, 2008 07:36:26 PM and the response from Raul Chong of IBM on Jul 28, 2008 10:04:17 AM. What do you think? Frank |
#20
| |||
| |||
|
|
http://kovica.blogspot.com| -----------------------------~-~-~-~-~-~-~-~-~-~- In A World Without Fences Who Needs Gates? | Experience Linux. | -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- |
![]() |
| Thread Tools | |
| Display Modes | |
| |