Solved

Cannot drop table due to replication - trying to change datatype

Posted on 2006-11-19
3
449 Views
Last Modified: 2008-02-01
Hello all.  I have replication setup for a Web server and I need to change a datatype in my table from text to varchar(4000).  Is there an easy way for me to handle this without having to resetup replication again?  Thanks all
0
Comment
Question by:sbornstein2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
nakul_vachhrajani earned 500 total points
ID: 17975882
No. If the data in the table is marked for replication, then there is no way but to remove replication, make the modification and then re-setup the same again.

Reason: If this would have been possible, then it would happen that the datatype in the replication schema would be different from your actual table definition, which is not allowed because replication is supposed to work on a snapshot of the existing data, requiring that both schema definitions remain the same.
0
 
LVL 28

Expert Comment

by:imran_fast
ID: 17977584
>>change a datatype in my table from text to varchar(4000).

You cannot change the datatype of a column in existing Article. You can add new columns by use sp_addreplcolumn.
The Only way you can alter column is to drop your subscribtion remove the table from the article and make nessesary changes.

Due to this it is always recommended to create publications with small number of articles.

Regards

Imran
0
 

Author Comment

by:sbornstein2
ID: 17980902
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question