469,920 Members | 2,424 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

What is logged for insert on identity column

CREATE TABLE "MYSCHEMA"."T1" (
"ID1" DECIMAL(8,0) NOT NULL GENERATED ALWAYS AS
IDENTITY (
START WITH +1
INCREMENT BY +1
MINVALUE +1
MAXVALUE +99999999
NO CYCLE
CACHE 20
NO ORDER ) )
DATA CAPTURE CHANGES
IN "USERSPACE1" ;
db2 insert into myschema.t1 values (default).
Is the real value inserted in the table logged and is it possible to
retrieve it with the log analyis API?
Bernard Dhooghe

Jun 27 '06 #1
2 1557
Bernard Dhooghe wrote:
CREATE TABLE "MYSCHEMA"."T1" (
"ID1" DECIMAL(8,0) NOT NULL GENERATED ALWAYS AS
IDENTITY (
START WITH +1
INCREMENT BY +1
MINVALUE +1
MAXVALUE +99999999
NO CYCLE
CACHE 20
NO ORDER ) )
DATA CAPTURE CHANGES
IN "USERSPACE1" ;
db2 insert into myschema.t1 values (default).
Is the real value inserted in the table logged and is it possible to
retrieve it with the log analyis API?

Yes, "ID1" is just a regular column as far as the lower levels of DB2
are concerned.
It just happens to get its values from a sequence associated with the
column.
The only thing that is special about sequences is that they log issuance
of new cache (high watermark) into SYSIBM.SYSSEQUENCES for rollforward
recovery.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jun 27 '06 #2
Thanks!

Bernard

Serge Rielau wrote:
Bernard Dhooghe wrote:
CREATE TABLE "MYSCHEMA"."T1" (
"ID1" DECIMAL(8,0) NOT NULL GENERATED ALWAYS AS
IDENTITY (
START WITH +1
INCREMENT BY +1
MINVALUE +1
MAXVALUE +99999999
NO CYCLE
CACHE 20
NO ORDER ) )
DATA CAPTURE CHANGES
IN "USERSPACE1" ;
db2 insert into myschema.t1 values (default).
Is the real value inserted in the table logged and is it possible to
retrieve it with the log analyis API?

Yes, "ID1" is just a regular column as far as the lower levels of DB2
are concerned.
It just happens to get its values from a sequence associated with the
column.
The only thing that is special about sequences is that they log issuance
of new cache (high watermark) into SYSIBM.SYSSEQUENCES for rollforward
recovery.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/


Jun 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by signaturefactory | last post: by
8 posts views Thread by shenanwei | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.