Db restore

  • I have a reporting db that is restored from the previous nights backup of production. The last few mornings

    the job has failed because the db was in use. I disconnect all and run the job manually but the job still fails even though there are no connections. Any thoughts? Thanks

  • You'll have to provide more information about what the error is and what the job is doing. If anyone, including the connection doing the restore, is connected, it won't work. This include SSMS connections.

  • The job is just a simple restore from a bak file. It was working fine for weeks now I get this error:

    Message

    Executed as user: XXXXXX. Exclusive access could not be obtained because the database is in use. [SQLSTATE 42000] (Error 3101) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

  • Someone is still connected to the db. Connect to another db, like master, and run sp_who2 to see who is "using" that database.

  • if you can afford, change the db access level to "single user" before restore and then restore te db

Viewing 5 posts - 1 through 4 (of 4 total)

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