SQL Express Restore Failed

Bookmark and Share

14-06-2007 22:52:32

Description

Restoring a database fails with an access denied error along the lines of 'Restore failed for Server' or System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)'


Details

After installing SQL Express and trying to restore a SQL Server 2000 database to a new database I got the following error:
Restore failed for Server '<SERVERNAME>\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

------------------------------
ADDITIONAL INFORMATION:

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\g2isstore.MDF'. (Microsoft.SqlServer.Express.Smo)

SOLUTION

This problem seemed to be caused by the SQL Express service running as NT AUTHORITY\NetworkService. Change the service to run as the local system account, restart and the SQL Express restore should work properly.

After doing that it should just be a case of restoring a SQL Server 2000 database as normal straight into SQL Server Express


Tags

SQL  Express  access  denied  restore 

Bookmark and Share

Login

Enter you login details below to sign in to the site.

If you do not have a login you will need to register.

User Name
Password