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: [crayon-5d05b37a48373609031880/] Solution You can encounter 22830 error following a database restore\attach when the user account did not exist in the database being restored.  For example, when restoring AdventureWorks while logged on as ‘corp\chris’ and enabling CDC, the user ‘corp\chris’ didn’t exists in
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. [crayon-5d05b37a48a98544595867/] Consider the following scenario. Transactional Replication is set on the database from a script and sp_addarticle was used to Publish some of the replication systems tables (in this case, MSpeer_lsns table). When you try to restore the
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 »