Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to alter a identity column

Author  Topic 

krajdba
Starting Member

43 Posts

Posted - 2007-08-10 : 09:47:44
Hi

How to ALTER a column of Indentity to make it NOT FOR REPLICATION.
I have a table with 40gb data.

Urgent please.

Thanks & Regards

-Rajesh.




Raj.

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-10 : 11:49:05
If you have SP4 this might work:


alter table dbo.testtable
alter column [id] add NOT FOR REPLICATION



Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

krajdba
Starting Member

43 Posts

Posted - 2007-08-13 : 06:05:22
How do we do it for a existing column?



Raj.
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-13 : 11:29:15
Did you even try it out?

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

krajdba
Starting Member

43 Posts

Posted - 2007-08-14 : 05:34:58
Hi

I am getting following error.....

alter table dbo.icts_transaction
alter column sequence add NOT FOR REPLICATION

---------error---------------
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'NOT'.

Raj.
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-14 : 12:07:13
The syntax works only post SP4. What version of SQL are you running? You can also change it in design view, it will take a few minutes (or longer) depending on the load, your hardware.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

krajdba
Starting Member

43 Posts

Posted - 2007-08-16 : 09:16:33
Thanks for the help


Raj.
Go to Top of Page
   

- Advertisement -