Solved

Cannot drop table due to replication - trying to change datatype

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 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

24 Experts available now in Live!

Get 1:1 Help Now