Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Cannot alter column enabled for Replication or CDC

Author  Topic 

nathon
Starting Member

2 Posts

Posted - 2010-03-25 : 11:56:55
I have a database that I had enabled Change Data Capture (CDC) on. I went to update one of the fields in a table in that database and got the following error.

'tblName' table
- Unable to rename column from 'ColNameA' to 'ColNameB'.
Cannot alter column 'ColNameA' because it is 'enabled for Replication or Change Data Capture'.
A severe error occurred on the current command. The results, if any, should be discarded.


I found the following MS KB Article 811899, but this functionality has since been restricted.
[url]http://support.microsoft.com/default.aspx/kb/811899?p=1[/url]

I also found this article about this error with replication in general in MS KB Article 326352.
[url]http://support.microsoft.com/kb/326352/EN-US/[/url]

So far I have done the following trying to fix this.
  • I have disabled CDC using sys.sp_cdc_disable_db and verified that colstat went below 4096 in sys.columns.

  • Verified there is nothing that has is_tracked_by_cdc = 1.

  • Verified there is nothing that has is_replicated = 1.

  • I have ensured replication was disabled by using sp_removedbreplication.



Just FYI, I have enabled CDC on this database, but have never enabled replication on anything on this server. How do I get to where I can modify this column name?

Nathon Dalton
http://nathondalton.wordpress.com

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-03-25 : 13:39:29
what is result of

SELECT is_published FROM sys.tables WHERE name = 'tblNameHere'
Go to Top of Page

nathon
Starting Member

2 Posts

Posted - 2010-03-25 : 16:14:26
quote:
Originally posted by russell

what is result of

SELECT is_published FROM sys.tables WHERE name = 'tblNameHere'



Sorry, I forgot to mention that I had checked that as well. Every table in the database is 0. Fortunately I had a backup from before this nonsense happened. I restored it and everything is fine. I'm not sure if it was from when I had enabled CDC or what, but everything said neither CDC nor replication was enabled, but SQL ensisted it was.

Nathon Dalton
http://nathondalton.wordpress.com
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-03-25 : 16:49:13
hmmmm. well, glad you got it sorted
Go to Top of Page
   

- Advertisement -