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)
 Alter table alter column

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-05-26 : 08:16:33
Shmo writes "I have a fairly large production database and testing replication set up using the backup and restore method. The replication fails due to identity inserts. All the identity colmuns in the table definitions are not set as [not for replication]. How do I write or what is the syntax to alter the tables and add the [not for replication] property on the publication tables in question.

I tried to use enterprise manager to remove the identity definitions on the subscription but it took over an hour to change it on one table. I am looking for a speedier way.

Any help would be appreciated. THX "

donpolix
Yak Posting Veteran

97 Posts

Posted - 2005-05-27 : 07:35:30
would you consider log shipping instead of replication?
sorry for not answering your question. :)

Donn Policarpio
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-05-27 : 09:09:15
You are better off creating the tables then using bcp to populate them.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

tomy74
Starting Member

32 Posts

Posted - 2005-06-01 : 06:24:42
Hi,

The way to get the not for replication option on a column is to perform what is called an extended alter. This takes the form of the following:

-Rename existing table
-Recreate table
-Insert data from renamed table into new structure
-Verify data is intact
-Drop renamed table

Thanks,

Tarek Ghazali
Go to Top of Page
   

- Advertisement -