Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Monday, October 31, 2016 6:37 PM
We have done the following. And we still cannot shrink the log and the log_reuse_wait_desc still reads REPLICATION. I told taking the database out of the AAG is not an option and changing the recovery mode to SIMPLE is also not an option. What else can we try?
BACKUP
LOG[ldm_carepoints] TODISK='NUL'
Processed 19949278 pages for database 'ldm_carepoints', file 'ldm_Log' on file 1.
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 use sp_repldone to mark transactions as distributed or captured.
BACKUP LOG successfully processed 19949278 pages in 984.803 seconds (158.258 MB/sec).
USE ldm_carepoints
GO
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0,@time = 0, @reset = 1
Msg 18757, Level 16, State 1, Procedure sp_repldone, Line 1
Unable to execute procedure. The database is not published. Execute the procedure in a database that is published for replication.
select name, log_reuse_wait_desc, is_cdc_enabled from sys.databases
name log_reuse_wait_desc is_cdc_enabled
ldm_carepoints REPLICATION 0
lcerni
Monday, October 31, 2016 7:23 PM ✅Answered
Thank you for your response. Next time I will try that. Working together we did this and it resolved our issue.
"To fix this we set up a new publication with one table from the problem database, didn't even create a subscription, then deleted the publication and the problem went away. "
Must give credit to
http://stackoverflow.com/questions/18745584/log-cant-be-truncated-but-no-cdcs-or-replication-exists
lcerni
Monday, October 31, 2016 6:44 PM
Can you do this on your database
sp_removedbreplication 'dbname'
Also check to see if you are doing any change data capture.
replication is separate from the 'replication' the Always on uses. The message in sys.databases clearly says that transactional replication is in use in this database. You need to address that issue.