Knowledgebase: MSSQL Server
Restore failed for Server 'server\sqlexpress'. (Microsoft.SqlServer.Express.Smo)
Posted by on 23 February 2013 05:10 PM

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

(3 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).