mssql '5 (Access is denied.)' error during restoring database

前端 未结 15 2019
忘了有多久
忘了有多久 2021-01-30 04:08

I want to restore a database from a file (Tasks → Restore → Database; after I select from device and select file) via SQL Server Management Studio.

After that, I get th

相关标签:
15条回答
  • 2021-01-30 04:37

    I had exactly same problem but my fix was different - my company is encrypting all the files on my machines. After decrypting the file MSSQL did not have any issues to accessing and created the DB. Just right click .bak file -> Properties -> Advanced... -> Encrypt contents to secure data.

    0 讨论(0)
  • 2021-01-30 04:38

    In my case I had to check the box in Overwrite the existing database (WITH REPLACE) under Options tab on Restore Database page.

    The reason I was getting this error: because there was already an MDF file present for the database and it was not getting overwritten.

    Hope this will help someone.

    0 讨论(0)
  • 2021-01-30 04:40

    I just ran into this same problem but had a different fix. Essentially I had both SQL Server and SQL Server Express installed on my computer. This wouldn't work when I attempted to restore to SQL Express, but worked correctly when I restored it to SQL Server.

    0 讨论(0)
提交回复
热议问题