472,340 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Change column name in replication environment

DB2 8.2 on AIX

Hi,

I'd like to change a column's name in a table which is part of
replication.
This column is identity column (generated always).

1. Since DB2 will drop and recreate the table with the changed column
name, do I have to do something like 'set integrity off'?

2. I think I have to exclude the target table from replication, add it
back once the column name is changed. Is this correct?

Thanks a lot!

Nov 12 '05 #1
1 2214
ib****@yahoo.com wrote:
DB2 8.2 on AIX

Hi,

I'd like to change a column's name in a table which is part of
replication.
This column is identity column (generated always).

1. Since DB2 will drop and recreate the table with the changed column
name, do I have to do something like 'set integrity off'?

2. I think I have to exclude the target table from replication, add it
back once the column name is changed. Is this correct?

Thanks a lot!

1. Retrieve the identity value with which you want to continue.
2. Create the new table WITHOUT the identity property.
3. LOAD the data
4. ALTER TABLE ALTER COLUMN to make the column an identity column again.

Alternatively you can use the IDENTITY OVERRIDE (sp?) option of LOAD and
alter the table to RESTART with the new value.
I have posted a stored procedure that "synchs up" identity columns after
load repeatedly in this forum.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shino | last post by:
Hi, Can anyone help with this error: "ORA-00904: invalid column name"? Thanks! SQL> create view PPFa as 2 SELECT L.UserID AS LecID, U.Name,...
4
by: mokles | last post by:
Hi All, I am trying to change column name on an existing table. I am using SQL Server 7. As the table is quite big, it is taking quite long time...
2
by: Mick White | last post by:
I inadvertantly named a field "in" mysql> select * from guestbook; +----+-------+-------+-----------------+----------------+ | id | fname |...
10
by: Colleyville Alan | last post by:
I am trying to turn a short and fat (63 columns) table into one that is tall and skinny (7 columns). Basically, I am trying to create a "reverse...
0
by: ymcj | last post by:
Hi, I'm trying to change the column name - date to Sdate in all the tables in my database. As i have many to change so i tried to search all tables...
3
by: ymcj | last post by:
Hi, I'm trying to change the column name - date to Sdate in all the tables in my database. As i have many to change so i tried to search all tables...
6
by: craigkenisston | last post by:
How to change database name on the fly? I have an asp.net application in which a user connects to a sql server, where there's a centralized...
7
JustJim
by: JustJim | last post by:
Hi If all you can do with ALTER TABLE....ALTER COLUMN is change the datatype/size then how do I change the name of a field? I have several...
8
by: kashifabbasi786 | last post by:
I want to change the DataGridView Heading on run time by giving in textbox. how i will do this,plz help me Thnx
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.