SQL Server Performance Forum – Threads Archive
purging transaction logsI have a large database that I am having difficulty shrinking the log files with. Is there a way to use T-SQL to purge the log files so I can get them down to a managable size?
Look at: BACKUP LOG DBNAME WITH TRUNCATE_ONLY and DBCC SHRINKFILE(file, targetsize) In Books online. Make sure you are either performing regular log backups or the database is set to Simple Mode (under properties) – your log will keep growing otherwise. Simon
The problem I am running into now is that this database was created by restoring a backup of a replicated database. Now I receive the following error when I try to use the command above to backup the log. The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed.
How can I get this copy of the database to understand that it is not replicated, nor will it be replicated?
KBAhttp://support.microsoft.com/kb/306769/EN-US/ fyi. Satya SKJ
Contributing Editor & Forums Moderator
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.