Start a conversation

Restore failed for Server 'server\sqlexpress'. (Microsoft.SqlServer.Express.Smo)

You receive an error when you restore a SQL Server database from a Database Backup file (databasename.bak).

System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\databasename.mdf'. (Microsoft.SqlServer.Express.Smo)

Note: databasename.mdf is the actual name of your database.

SQL Server is trying to restore the database to '...\MSSQL\databasename.mdf'.'

Change the destination folder to '...\MSSQL\Data\databasename.mdf

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Senior Engineer Jessie

  2. Posted
  3. Updated

Comments