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

前端 未结 15 2017
忘了有多久
忘了有多久 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条回答
  • The fix for me was to go into Options when trying to Restore the database and change the path to the new path. Here is the screenshot

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

    Well, In my case the solution was quite simple and straight.

    I had to change just the value of log On As value.

    Steps to Resolve-

    1. Open Sql Server Configuration manager
    2. Right click on SQL Server (MSSQLSERVER)
    3. Go to Properties

    1. change log On As value to LocalSystem

    Hoping this will help you too :)

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

    I recently had this problem. The fix for me was to go to the Files page of the Restore Database dialog and check "Relocate all files to folder".

    Restore Database dialog

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

    There are several causes for this error, I got this error because I checked "Reallocate all files to folder" in the Files tab of Restore Database window but the default path did not exist on my local machine. I had the ldf/mdf files in another folder, once I changed that I was able to restore.

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

    The account that sql server is running under does not have access to the location where you have the backup file or are trying to restore the database to. You can use SQL Server Configuration Manager to find which account is used to run the SQL Server instance, and then make sure that account has full control over the .BAK file and the folder where the MDF will be restored to.

    enter image description here

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

    The account does not have access to the location for backup file. Take the following steps to access the SQL Server Configuration Manager via Computer Manager easily

    1. Click the Windows key + R to open the Run window.
    2. Type compmgmt.msc in the Open: box.
    3. Click OK.
    4. Expand Services and Applications.
    5. Expand SQL Server Configuration Manager.
    6. Change User Account in Log On As tab .

    Now you can Restore Data Base easily

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