• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 547
  • Last Modified:

Restore backup in SQL 2008R2

I have made SQL database backup before updating server to Server 2012
After upgrade,I have attempted to restore database using SQL Server Management Studio  and received error message Restore failed for the server localhost\MSDPM2012
Exclusive access could not be obtained because the database is in use
1 Solution
PadawanDBAOperational DBACommented:
There are probably some open connections on the database.  There are two options: you can check the sys.dm_exec_sessions view for all sessions against your database (and manually kill them by spid) or there should be an option in the restore database diaglog options to close existing connections to destination database, which will automatically kill those sessions before the restore.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now