Solved

Cannot drop table due to replication - trying to change datatype

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now