• lw1990 (1/8/2016)


    I tried it as you said. But after I detached the old database and was trying to restore to it, I got the "database is in use" error when I used the GUI. I still don't know why.

    The only reasons you will get that error message are the ones I listed in a previous post.

    The error message says that you are trying to either overwrite an *existing* database that is currently attached to the instance, or you're trying to overwrite files for a database that's currently attached to the instance. The detached and renamed database doesn't count, it's detached.

    So either the DB name you entered was an existing DB, or one of the file names you listed existed and belonged to an existing DB.

    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