Hello,
I have this problem on a Production database.
DBCC OPENTRAN shows "REPLICATION" on a server that is not configured for replication. The transaction log is almost as large as the database (40GB) with a Simple recovery model. I would like to find out how the log can be truncated in such a situation.
Thank you.
I missed some information. DBCC OPENTRAN showed that we had open replication transactions. When I ran
SELECT name, database_id, log_reuse_wait_desc
FROM sys.databases
the log_reuse_wait_desc showed "REPLICATION". We do not have Replication set up at all (it was never set up on the server).
Can you please advise on how to truncate and make the log file reusable in this case?
I tested the sp_removedbreplication on a test copy of the database and it seems to allow the log to then shrink.
1. Is it safe to run sp_removedbreplication on a server that is not set up at all for replication?
2. Why should these "replication transaction" logs be there in the first place?
Advice/suggestions on this will be greatly appreciated!
Thank you.
|||
You must have restored a database backup that was previously published? If so, running sp_removedbreplication against the database will remove all replication bits, so yes it's safe.
|||The database was never published previously.
Can a failed backup cause this? Is there any other reason "transaction replication" records can be in the log?
Even after running sp_dbremovedbreplication, we are unable to shrink the logs on the Production database. The transactions still seem to be there .
What are the options to retrieve space from the log?
Thank you.
|||Can you issue a sp_repldone to see if this solves the problem?For example, in your problem database issue the following:
EXEC sp_repldone @.xactid = NULL, @.xact_segno = NULL, @.numtrans = 0, @.time = 0, @.reset = 1
No comments:
Post a Comment