473,686 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2300
ib****@yahoo.co m 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
64824
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, U.Email, I.IntakeID, S.UserID AS StudID 3 FROM User_Lecturer L, User_Student S, TBL_Intake I, Users U 4 WHERE L.UserID=S.InitialSupervisorID And L.UserID=U.UserID And
4
20151
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 to do it. By the way I could change the column name only through the Enterprize Manager. Is it possible to change the column name using SQL script? Why the change of column name will depend on the size of the table?
2
2296
by: Mick White | last post by:
I inadvertantly named a field "in" mysql> select * from guestbook; +----+-------+-------+-----------------+----------------+ | id | fname | lname | comments | in | +----+-------+-------+-----------------+----------------+ | 1 | Mick | White | Test 123 | 20050208000000 | | 2 | Ann | White | Hello World | 20050213101948 | | 3 | | | It's a nice day | 20050213102405 |...
10
6559
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 crosstab" using a looping structure in VBA along with SQL. I'd like to take the name of the column and input it into a descritor field. This isn't the table, but will serve as a better illustration than the real deal. If the table looks like this:
0
1277
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 and have it change automatically rather than manually however my query doesn't seem to do the job? requesting assistance from anyone is appreciated thank you! DECLARE @sSQL AS VarChar(500), -- SQL Statement @sTableName AS VarChar(100) -- TableName DECLARE CursorTable CURSOR FOR...
3
18734
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 and have it change automatically rather than manually however my query doesn't seem to do the job? requesting assistance from anyone is appreciated thank you! DECLARE @sSQL AS VarChar(500), -- SQL Statement @sTableName AS VarChar(100) -- TableName DECLARE CursorTable CURSOR FOR SELECT FROM...
6
2613
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 database with the users table and general settings. Then, each user also has a database in which his particular information is stored. There will be a few hundreds of this databases. Certain groups of users will share a database, all tables in this database have a userid column for identification...
7
4999
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 database files spread all over the state and some of the users (Darn users!) have changed a field from "Datum" to "MapDatum" and I need to change it back because it is causing problems with the front end. I suspect that I'm going to have to determine if the field MapDatum exists and if it does, make...
8
39921
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
8517
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8934
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8770
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2947
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.