Solved

Cannot drop table due to replication - trying to change datatype

Posted on 2006-11-19
3
446 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
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

832 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