Posted: Tue Dec 09, 2008 6:39 pm Post subject: LOADING TABLES HAVING IDENTITY COLUMNS
Hi all,
Herein I am having a doubt while loading the data in the tables which have SEQ_NO as Identity column.
I am able to load the table, but, I have to synchronize the tables data in all test regions. while doing this, I am getting the seq no different.
For example, I am unloading the data from TEST1 region and loading in TEST2 region.
In the TEST1 region the values of SEQ_NO are somewhat like 1, 3, 4
when I am loading the data in TEST2 region the value are loading in it as 1, 2, 3
And, this does not make the tables in sync in the regions.
Please suggest me how to make them in sync.
DDL:
Code:
CREATE TABLE "NSH"."TBRAND"
( "BRAND_SEQ_NO" DECIMAL (9, 0) NOT NULL
GENERATED ALWAYS
AS IDENTITY
( START WITH 1)
,"BRAND_CD" CHAR (1) NOT NULL
,"CORP_BRAND_CD" CHAR (1) NOT NULL
,"BRAND_DESC" CHAR (50) NOT NULL
,"CRT_UID" CHAR (8) NOT NULL
,"CRT_TS" TIMESTAMP NOT NULL
,"CRT_PGM_ID" CHAR (8) NOT NULL
,"UPDT_UID" CHAR (8) NOT NULL
,"UPDT_TS" TIMESTAMP NOT NULL
,"UPDT_PGM_ID" CHAR (8) NOT NULL
, PRIMARY KEY
("BRAND_SEQ_NO"
,"BRAND_CD"
)
)
IN "DBCDSA5"."TBRAND"
Thanks all in advance
-Satyender _________________ Satya
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
Posted: Fri Dec 26, 2008 9:03 pm Post subject:
Satya,
you may want to check those values. I've always set the RESTART value to the max from select query + 1.
also you probably want to alter the identity column to be "GENERATE ALWAYS" as that was the original definition. This would need to be done after the table is loaded.
I had to alter the Load control cards generated during the unload as it generated a non-existent column name for the identity column. This may be dependent upon the particular software / version that I was using at the time.
good luck, _________________ Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum