473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1663
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alain Filiatrault | last post by:
HI, I have an SQL Server table with only 1 column. That column is an identity column. How can I insert a row in this table using SQL syntax? I tried insert into T_tableName () values ()...
4
by: signaturefactory | last post by:
I get the following error for this procedure: Server: Msg 156, Level 15, State 1, Procedure Trig_Ins_TrackingNumbers, Line 6 Incorrect syntax near the keyword 'IF'. CREATE TRIGGER...
14
by: serge | last post by:
I have a scenario where two tables are in a One-to-Many relationship and I need to move the data from the Many table to the One table so that it becomes a One-to-One relationship. I need to...
8
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record...
8
by: shenanwei | last post by:
I have 2 same windows machine, same instance configure and Database , all run DB2 UDB V8.1.5 Test 1 : create table OUT_1 (LINE VARCHAR(350), LINENUMBER INTEGER NOT NULL GENERATED ALWAYS AS...
6
by: Christopher Lusardi | last post by:
How can I fix this? When I do the below I get the error message: "Cannot insert explict value for identity column in table 'Employees' when IDENTITY_INSERT is set to OFF." To get this message,...
9
by: rhaazy | last post by:
Using MS SQL 2000 I have a stored procedure that processes an XML file generated from an Audit program. The XML looks somewhat like this: <ComputerScan> <scanheader>...
5
by: .Net Sports | last post by:
I'm trying to insert records into an sql database coming from a page using the request ..form method. The table "general" has a primary key 'geid .' I get the following error: Cannot insert the...
1
by: AliHabib | last post by:
I write this stored procedure to modify the identity column depending on entered value it worked well just one time but now not work how can i fix this problem create proc TickIDStart ( @IDnew...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.