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
 Import/Export (DTS) and Replication (2000)
 Setting Identity to "Not for replication"

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-26 : 08:08:18
Roy writes "I need to prepare an existing database for merge replication. To do this I have established that I need to set all identities to "Not for Replication". This can of course be done manually but I was wondering if you know of a way to automate to process.
Perhaps using ALTER TABLE."

MuadDBA

628 Posts

Posted - 2005-09-02 : 13:51:37
I don't see why ALTER TABLE wouldn't work here. Query the Information_Schema.Colums table to find all your identity columns in tables you want to replicate, and then use a query to build your alter table statements.

Go to Top of Page
   

- Advertisement -