Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Altering identity column to "not for replication"

0 views
Skip to first unread message

Robert

unread,
Mar 21, 2003, 12:51:00 PM3/21/03
to
Hi,
I was wondering whether somebody knows how to change the
existing "pure" IDENTITY column to IDENTITY NOT FOR
REPLICATION in SQL Server 2000. It can be done through
Enterprise Manager but I'm looking for Transact SQL
solution (to be put into a script).

Thanks,
Robert

Yi Mao [MSFT]

unread,
Mar 21, 2003, 1:37:16 PM3/21/03
to
You have to drop the existing identity column and add it back as identity
NFR

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Robert" <rob...@cft-inc.net> wrote in message
news:244a01c2efd2$6f52e770$a501...@phx.gbl...

Robert

unread,
Mar 21, 2003, 3:47:33 PM3/21/03
to
But in this case identity values will change and I will
loose "referential/logical integrity" between tables based
on these identity columns.

I guess I'm condemned to Enterprise Manager solution.
Fortunately I have only 30 tables -> which gives me about
1 hour of randez vous with GUI :)

P.S. Still, I wonder what Enterprise Manager does behind
the scene to accomplish this.

Thanks for your help,
Robert

>.
>

Derek

unread,
Mar 24, 2003, 3:43:56 AM3/24/03
to
Hi Robert,

I want to do the same thing. How do you alter an identity column to add the
"NOT FOR REPLICATION" option in Enterprise Manager?

Why don't you use Profiler to trace what Enterprise Manager does? I guess
you should get some insights into how EM add the NOT FOR REPLICATION option
to the identity column.


"Robert" <rob...@cft-inc.net> wrote in message

news:2ba201c2efeb$18fd6d50$a101...@phx.gbl...

Nayan Raval

unread,
Mar 25, 2003, 10:32:53 AM3/25/03
to
Robert - here's a totally unsupported way:

http://tinyurl.com/84bf

Worked fine for me.
--
Nayan Raval

>.
>

0 new messages