SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Backup Failed
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

anon1m0us
Starting Member

7 Posts

Posted - 06/08/2012 :  12:00:38  Show Profile  Reply with Quote
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 - 06/09/2012 :  02:18:54  Show Profile  Reply with Quote
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.

Edited by - steel on 06/09/2012 02:19:34
Go to Top of Page

anon1m0us
Starting Member

7 Posts

Posted - 06/09/2012 :  22:14:46  Show Profile  Reply with Quote
If that was the case, why would I be able to manually write to that folder?
Go to Top of Page

jeffw8713
Aged Yak Warrior

USA
694 Posts

Posted - 06/10/2012 :  01:03:22  Show Profile  Reply with Quote
Your backup is running in the context of SQL Server - you need to grant permissions for the account running SQL Server.
Go to Top of Page

anon1m0us
Starting Member

7 Posts

Posted - 06/10/2012 :  01:41:46  Show Profile  Reply with Quote
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.
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
1769 Posts

Posted - 06/10/2012 :  01:43:51  Show Profile  Visit jackv's Homepage  Reply with Quote
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
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 06/10/2012 :  03:51:49  Show Profile  Reply with Quote
quote:
Originally posted by anon1m0us

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.



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 ....
Go to Top of Page

anon1m0us
Starting Member

7 Posts

Posted - 06/10/2012 :  13:47:46  Show Profile  Reply with Quote
quote:
Originally posted by Sachin.Nand

quote:
Originally posted by anon1m0us

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.



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.
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 06/10/2012 :  15:01:44  Show Profile  Reply with Quote
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 ....
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000