Please help me ( restore DB fail) urgent..

i'm trying to restore the database but its giving some error please help me out i'm a beginner

here's the error

TITLE: Microsoft SQL Server Management Studio
------------------------------

Restore failed for Server 'HP-PC\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended)

------------------------------
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\MSSQL10.MSSQLSERVER\MSSQL\DATA\ResturantManagementDB.mdf'. (Microsoft.SqlServer.Smo)

------------------------------
BUTTONS:

OK
------------------------------

April 29th, 2015 7:40pm

the database file is being created on the path C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\

make sure your sql server service account has permission to create/write/read files on that location.

to know your sql server service account -- go to run-- type in  configuration manager ---sql server ---you should see the service account.

alternatively, you can create the file on a different location where your sql service account has permission to read/write the files..

Free Windows Admin Tool Kit Click here and download it now
April 29th, 2015 7:55pm

Restore failed for Server 'HP-PC\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended)

...The operating system returned the error '5(Access is denied.)'
...'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ResturantManagementDB.mdf'

Hello,

I guess that's a backup from a different SQL Server then yours?

In the backup the origin location is stored and that's also a different one then on your machine, it should be more the folder
'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\

In the restore Dialog go to tab "Files" and change the file location to meet your enviroment.

April 30th, 2015 3:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics