Year: 2011

Enable CDC fails with error Msg 22830, Level 16, State 1, Procedure sp_cdc_enable_db_internal

Problem While enabling Change Data Capture (CDC) on database you get following error: EXECUTE sys.sp_cdc_enable_db Msg 22830, Level 16, State 1, Procedure sys.sp_cdc_enable_db_internal, Line 198 [Batch Start Line 8] Could not update the metadata that indicates database AdventureWorks2012 is enabled for Change Data Capture. The failure occurred when executing the command 'SetCDCTracked(Value = 1)'. The
Read More »

Restore of Replicated Database fails with “Cannot drop the table because it is being used for replication.”

Sateesh Yele Microsoft SQL Server Support Issue: Restore of a replicated database fails with the following message. Msg 3724, Level 16, State 2, Procedure sp_MSdrop_peertopeer_tables, Line 32 Cannot drop the table 'dbo.MSpeer_lsns' because it is being used for replication. Consider the following scenario. Transactional Replication is set on the database from a script and sp_addarticle
Read More »

Distribution Agent fails with “Could not remove directory” error

Sateesh Yele Microsoft SQL Server Support Symptom: The Distribution Clean up job fails with the following error. Executed as user: Domainname\Username. Could not remove directory ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\ReplData\unc’. Check the security context of xp_cmdshell and close other processes that may be accessing the directory. [SQLSTATE 42000] (Error 20015). The step failed. Consider the following
Read More »