October 2, 2012 at 9:10 am
We have just installed SQL Server 2012 Standard edition on a Windows Server 2008 r2 Enterprise edition. While attempting to restore a database from a SQL Server 2005 backup we get the following error
System.Data.SqlClient Sql Error:: The operating System returned the error '5(Access is denied)' while attempting to 'restore container:: validate target for creation' on I:\MSSQL-DATA\MSSQL.1\mydatabase.mdf
Have not run into this before anyone have insight?
George
October 2, 2012 at 9:28 am
gchappell (10/2/2012)
We have just installed SQL Server 2012 Standard edition on a Windows Server 2008 r2 Enterprise edition. While attempting to restore a database from a SQL Server 2005 backup we get the following errorSystem.Data.SqlClient Sql Error:: The operating System returned the error '5(Access is denied)' while attempting to 'restore container:: validate target for creation' on I:\MSSQL-DATA\MSSQL.1\mydatabase.mdf
Have not run into this before anyone have insight?
George
Make sure that the account SQL Server (the service) is running as has access to that folder.
October 2, 2012 at 9:53 am
cphite thank you for your reply,
The service is running, but how do you tell if it has access to a folder?
October 3, 2012 at 10:52 am
gchappell (10/2/2012)
cphite thank you for your reply,The service is running, but how do you tell if it has access to a folder?
Look for the column called "Log On As" for the service. That is the account the service is running as.
Next, go to the folder (in your case I:\MSSQL-DATA\MSSQL.1\) and right-click on it.
Select Properties.
Go to the Security tab.
If the "Log On As" user from your service is a user account, make sure that user account has Full Control for the folder.
If the "Log On As" user from your service is "Network Service" or "Local System" those account should already have access, but go ahead and add them and give them Full Control.
BTW, are you sure that your I:\ drive is local and not a network drive?
October 3, 2012 at 11:20 am
Thank you Cphite that worked perfectly
George
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply