• menon.satyen (10/30/2012)


    Hi,

    1. Take backup of your databases.

    2. Detach your database after closing all active connections

    3. Attach the database using SSMS.

    4. Delete the log file that's not required from the db details pane.

    This should do it. It worked for me!!

    No, no, no!!!

    If the log file is deleted (or not attached), SQL could refuse to reattach the DB because either the database was not cleanly shut down or the log file that was 'not required' contained a portion of the active log.

    The correct and safe way to remove a log file is the method I gave. Any form of deleting or not attaching a log can potentially destroy the DB entirely requiring a restore from backup.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass