KB Issue
You receive an "Access is denied error", when trying to restore a database in SQL Server Management Studio
(SSMS).
Issue Details
When trying to restore a database in SQL Server Management Studio (SSMS), you may encounter the following error. The operating system returned the error 5(Access is denied.)
Copy
Search Site
Search Google
while attempting
RestoreContainer::ValidateTargetForCreation
Copy
Search Site
Search Google
Recreate Issue
The folder(s) where the database and log files are to be located need to have the proper permissions granted for SQL Server to write information to the folder(s).
Resolve Issue
  1. Navigate to [Control Panel]
  2. Chose [Administrative Tools]
  3. Open [Services]
  4. Scroll down and open [SQL Server (InstanceName)]
  5. Choose the [Log On] tab
  6. Copy the [This account] name (Example: NT Service\MSSQL$InstanceName)
  7. Navigate to the folder where you will be storing your database and log files
  8. Right-click, and choose [Porperties]
  9. Select the [Security] tab
  10. Click [Edit]
  11. Click [Add]
  12. The following only applies if you are on a domain
  13. Click [Locations...]
  14. Choose the Computer name at the top
    Click [OK]
  15. This section applies to all
  16. Paste the account you copied from earlier
    NT Service\MSSQL$InstanceName
  17. Click [OK] on all windows.
Now, inside of SSMS, perform the Restore.