Detaching DB with Users connected?

  • Hello,

    I have a few old 2000 databases that I would like to move off the local C: Drive and onto the new G: Drive. I practiced this on a database that had no users connected to it by Detaching...logging into the server and physically moving the detached databases mdf and ldf to their new location on G:. I then re-attached making sure the correct DBO was selected which it was not by default. I then scripted the command out to the query windows and everything looked good and ran it successfully. I then refreshed and saw the database had been re-attached properly.

    Now my question is...

    I ran sp_who2 and I can see that I have a particular login who is sleeping awaiting command and has several SPIDs to a database I need to move. Is it safe from me to go ahead and detach - re-attach this database?

    Thanks!

  • Please do not cross post - please reference

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

    Chris Powell

    George: You're kidding.
    Elroy: Nope.
    George: Then lie to me and say you're kidding.

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

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