Quantcast
Viewing all articles
Browse latest Browse all 12963

Log Can't be truncated but no CDCs or Replication exists.

We restored databases to our test environment and set up AlwaysOn (AlwaysOn was set up for these databases in prod as well). Whenever I try and backup the log I'm getting "The log was not truncated because records at the beginning of the log are pending replication or Change Data Capture. Ensure the Log Reader Agent or capture job is running or usesp_repldone to mark transactions as distributed or captured."

I've removed CDCs from the database and removed all replication but I'm still getting the above error. The log_reuse_wait_desc is showing up as AVAILABILITY_REPLICAor Replication.

I've also tried running the following.

EXEC sys.sp_replflush

EXEC sp_removedbreplication

EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0,     @time = 0, @reset = 1


Any suggestions? 

Thanks, Tim



Viewing all articles
Browse latest Browse all 12963

Trending Articles