Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
anon1m0us
Starting Member
7 Posts |
Posted - 2012-06-08 : 12:00:38
|
I am trying to backup my database but it is failing with the following error: BackupDiskFile::CreateMedia: Backup device '\System\master_backup_2012_06_08_113121_5537116.bak' failed to create. Operating system error 5(Access is denied.).I am able to manually write to the location. The SQL Agent job is the same ID that is able to manually write to the location. Also, the ID is a sysadmin on the DB.Why is it failing? |
|
steel
Posting Yak Master
107 Posts |
Posted - 2012-06-09 : 02:18:54
|
The issue is with the permissions to the folder where you are trying to take backup. Operating system error 5 clearly indicates that the sql server service account doesn't have permissions on the specified folder. |
|
|
anon1m0us
Starting Member
7 Posts |
Posted - 2012-06-09 : 22:14:46
|
If that was the case, why would I be able to manually write to that folder? |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2012-06-10 : 01:03:22
|
Your backup is running in the context of SQL Server - you need to grant permissions for the account running SQL Server. |
|
|
anon1m0us
Starting Member
7 Posts |
Posted - 2012-06-10 : 01:41:46
|
quote: Originally posted by jeffw8713 Your backup is running in the context of SQL Server - you need to grant permissions for the account running SQL Server.
As stated above, SQL is running with a service account that has access to the shared. I tested this by manually creating a file and folder and was also able to delete. |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-06-10 : 01:43:51
|
As well as comments made already - if it's a network drive - do you have a suitable domain account as the SQL Service start up?Jack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
Sachin.Nand
2937 Posts |
Posted - 2012-06-10 : 03:51:49
|
quote: Originally posted by anon1m0usAs stated above, SQL is running with a service account that has access to the shared. I tested this by manually creating a file and folder and was also able to delete.
So you logged in with the service account under which SQL service runs and then created the file/folder on the shared path.After Monday and Tuesday even the calendar says W T F .... |
|
|
anon1m0us
Starting Member
7 Posts |
Posted - 2012-06-10 : 13:47:46
|
quote: Originally posted by Sachin.Nand
quote: Originally posted by anon1m0usAs stated above, SQL is running with a service account that has access to the shared. I tested this by manually creating a file and folder and was also able to delete.
So you logged in with the service account under which SQL service runs and then created the file/folder on the shared path.After Monday and Tuesday even the calendar says W T F ....
Correct. |
|
|
Sachin.Nand
2937 Posts |
Posted - 2012-06-10 : 15:01:44
|
Run the backup command and check the security/application error log of the network path at the instance the backup command is running.Also are you logged in as a sysadmin on the sql instance while running the backup command ?Between what version of SQL Service is it ?After Monday and Tuesday even the calendar says W T F .... |
|
|
|
|
|