March 14, 2002 at 3:38 pm
Does anyone know how to turn the Identity off of a column? Is there a TSQL statement that lets me take the identity off? I've looked on Books On Line but can't find anything on it.
March 14, 2002 at 4:41 pm
March 14, 2002 at 6:45 pm
But the table is replicated. And the column is part of a primary key. Any easy way to do this?
March 14, 2002 at 6:50 pm
No, as far as I know you have to stop replication and rebuild the table, then redo replication.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
March 15, 2002 at 9:58 am
March 15, 2002 at 10:37 am
You might want to look at my article:
http://www.sqlservercentral.com/columnists/awarren/alterreplicatedtable.asp
Robert Marda had a post about altering the system tables to make it "not replicated" long enough to alter a constraint - take a look at it, I have not tried it:
In either case you should have a fallback plan ready to send over a new snapshot. Other than SQL not letting you do it I don't think adding an identity col would be a huge deal, you're still sending over the exact same data.
Andy
December 8, 2002 at 8:50 pm
You can create a new column w/o identity, copy the current values to it, then delete the IDENTITY column.
December 9, 2002 at 1:11 am
may be this:
SET IDENTITY_INSERT [ database. [ owner. ] ] { table } { ON | OFF }
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply