Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002

    Unanswered: Cannot shrink transaction log


    I have a t-log on one database which is 400mb when the database size is only 30mb. dbcc shrinkfile does not work and dbcc opentran shows no open transactions. When I tried to do a Backup log with truncate_only the following message displays:

    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.

    The database in question is not a publisher and only receives 5 subscribed articles, none of which are changed very often. The database operates 24 x 7.

    Does anyone have a solution to this dilemma?

    Thank You

  2. #2
    Join Date
    Sep 2002
    Have you enabled the transaction checkpoint ? so that it will reduce automatically ?


  3. #3
    Join Date
    Feb 2002

    Thumbs up Re: Cannot shrink transaction log

    Run this script (courtesy of SQL Server Professional magazine)

    Sometimes a piece of data blocks the rest of the transaction log from being truncated. This script will solve your problem by created and removing garbage data until the active portion of the log loops to the beginning of the t'log.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts