Unable to restore MSSQL database: Exclusive access could not be obtained because the database is in use

Follow

Comments

4 comments

  • Avatar
    Unknown User

    Wrong.

    RESTORE DATABASE [example_database] FROM DISK = 'C:\Program Files (x86)\Plesk\Backup\example.com\databases\example_database_2\tmp141.tmp'
    WITH REPLACE

    1
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Nguyên Bảo,

    The syntax looks valid. Could you give some information, what went wrong in your case?

    0
    Comment actions Permalink
  • Avatar
    Unknown User

    Query is wrong:

    RESTORE DATABASE [example_database] FROM DISK = C:\Program Files (x86)\Plesk\Backup\example.com\databases\example_database_2\tmp141.tmp'
    WITH REPLACE

     

    The correct result will be:

    RESTORE DATABASE [example_database] FROM DISK = 'C:\Program Files (x86)\Plesk\Backup\example.com\databases\example_database_2\tmp141.tmp'
    WITH REPLACE

     

    The syntax is missing a    '   at location file.

    1
    Comment actions Permalink
  • Avatar
    Anna Morozyuk

    Hi @Nguyên,
    Thank you for pointing that out! We have fixed this typo.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request