Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cannot drop table due to replication - trying to change datatype

Posted on 2006-11-19
3
Medium Priority
?
476 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

636 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