How can I revert back to using a single log file

  • It has come to my attention that not only has my log file been set to autogrow, but at some point it was also expanded to a separate physical location.  The result is now I have two log files.  I run the database in simple recovery mode, and there is plenty of space in my original location.  Not to mentioin that I am now getting Q'd I/O's on the disk the second partition was expanded to. 

     

    My question is how can I revert back to using only the original log file.  Ideally I need to do this on the fly without the end users being aware.  A restart can be done later if needed

     

    Thanks

  • The log file to be deleted needs to be empty before deletion, use this script to get what you need.

    DBCC

    SHRINKFILE ([YourTransLog] , EMPTYFILE)

     

    USE

    master

    GO

    ALTER

    DATABASE YourDatabase

    REMOVE

    FILE [YourTransLog]

    GO

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply