Cannot shrink log file 2 because the logical log file located at the end of the file is in use ?

Answered Cannot shrink log file 2 because the logical log file located at the end of the file is in use ?

  • Tuesday, March 22, 2011 6:00 AM
     
     

    HI,

    I am getting this error frequently.. any recomendations :

     

    Executed as user: DB0\sqlservices. Processing database: dbin [SQLSTATE 01000] (Message 0)  Cannot shrink log file 2 (DB_log) because the logical log file located at the end of the file is in use. [SQLSTATE 01000] (Message 9008)  Processing database: DB_ [SQLSTATE 01000] (Message 0)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  Cannot shrink log file 2 (DB_log) because the logical log file located at the end of the file is in use. [SQLSTATE 01000] (Message 9008)  Processing database: DB [SQLSTATE 01000] (Message 0)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed. [SQLSTATE 42000] (Error 3023)  Processing database: DB_AC [SQLSTATE 01000] (Error 0)   [SQLSTATE 01000] (Error 0)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Error 2528).  The step failed.

     

    Please give any receomendations to avoid this error in future :


    Yangamuni Prasad M

All Replies

  • Tuesday, March 22, 2011 7:39 AM
     
     Answered

    I guess this error message is from the job executed ? Can you please let us know what dose this job do ?

    To find out what's got your log tied up, look in the sys.databases table at the log_reuse_wait_desc field - that should describe what's holding up log truncation

    ---------------------------------------------
    Thanks,Suhas V

     

  • Saturday, March 26, 2011 3:29 AM
    Moderator
     
     Answered
     

    Hi Yangamuni,

     

    Are there any progress?

     

    Please have a look on the below threads with the similar issues as yours:

    http://www.sqlservercentral.com/Forums/Topic652579-146-1.aspx

    http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/ae4db890-c15e-44de-a2af-e85c04260331

     

    The solution is change the recovery mode to SIMPLE, shrink log files and then change to the FULL recovery mode.

     

    Thanks,
    Weilin Qiao


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
  • Wednesday, March 30, 2011 3:55 AM
     
     
    Thank you sir.. yes i observed some progress..
    Yangamuni Prasad M