Took backup of database from SQL Server 2008 R2 Enterprise and trying to restore it on a database on SQL Server 2019 Enterprise but getting error:

Exclusive access could not be obtained because the database is in use

I took destination database offline but no luck. Restarted SQL Server service but no luck. Close existing connections to destination database is checked under Options but no luck (screenshot attached). There is enough disk space available.

Is the error coming due to version difference? If yes, then how to restore database from 2008 R2 to 2019?

enter image description here

  • Perhaps restoring with tail and leave source will need the exclusive access. Have you tried to uncheck both
    – Peter
    Dec 25, 2022 at 10:57
  • Are you trying to overwrite the existing database on the 2019 server or restore the backup as a new copy of the database?
    – J.D.
    Dec 25, 2022 at 13:43
  • Existing database which I just created. Dec 25, 2022 at 13:54
  • Does checking off "Overwrite the existing database (WITH REPLACE)" fix your issue? Also if it's a new database you just created then presumably there's nothing to backup and you can uncheck "Take tail-log backup before restore".
    – J.D.
    Dec 25, 2022 at 16:56
  • Restarted server, then checked Overwrite the existing database (WITH REPLACE) and also removed tail log checkbox and this time it worked Dec 26, 2022 at 5:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.