Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.).

SQL 2005 Enterprise

Even if I logon as Administrator and try to backup any of my databases to local partitions, I get this error below. I have been operating fine up until this point and doing backups all the time. As far as I know, and after checking, no permissions have changed and of course Administrator has ntfs permissions to my local C and other partitions on this server:

TITLE: Microsoft SQL Server Management Studio

Backup failed for Server 'servername'. (Microsoft.SqlServer.Smo)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476


ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.). (Microsoft.SqlServer.Smo)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476


BUTTONS:

OK

In the Event log for Windows Server 2003 I see this:

Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10016
Date: 3/6/2006
Time: 3:35:06 PM
User: NT AUTHORITY\NETWORK SERVICE
Computer: servername
Description:
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{BA126AD1-2166-11D1-B1D0-00805FC1270E}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.

For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp.

[2680 byte] By [FavorFlave] at [2007-12-19]
# 1

You need to check the security permissions on the folder you are trying to backup to. Make sure the service account (Network Service) has write permissions. It may well not do.

SQL on changing the service account changes the permissions on the critical drives it knows about but won't to it for all the drives in a server.

SimonSa at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 2
well I added Network Service with the right permissions. Still same error. Like I said before this was never a problem. I am the only one who touches the server and I haven't changed permissions except to change what permissions Network Service had in logons but I changed that back wto what it was previous and what my other server has in SQL logins.
FavorFlave at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 3

It doesn't matter who *you* are logged in as, it is the service account for SQL Server service that matters -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ Blog: http://solidqualitylearning.com/blogs/tibor/

MVPUser at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 4
Thanks a lot NNTP, that was it. I added my domain account that I had created to run all SQL Services to the security of the partitions on my server and I have access now. I'm not sure though what changed, I was able to do this before unless someone took this login out of the security..I guess it's possible but as far as I know nobody it touching my server
FavorFlave at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 5

Tnks God I found this post... It really save me!!!

rgds

milocr at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 6

Hi,

I have the same problem. I have changed the SQLAGENT service to run as domain\administrator but are you suggesting the sql server instance service also?

Thanks

Paul

PaulMonaghan at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 7
On a Windows 2000 Server with SQL Express 2005 freshly installed, giving the "SYSTEM" user full control on the target folder seems to do the trick without the need to change the service user.
Brandano at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 8

SQL Service account is DOMAIN\SQLAdmin

Have given the SQLAdmin AD account access to the Backup shares on the file servers (2 file servers, FILE1, FILE2)

and I still get the error

Operating system error 5(Access is denied.).

RESTORE FILELISTONLY

FROM DISK = N'\\SERVER\APPS\backups\UA\DB\DB.BAK'

I trid to attach it as device, which runs

sp_addumpdevice 'disk', 'Network_Share', '\\SERVER\backup\APPS\UA\DB\DB.BAK'

BUT when restoring, same error occurred (Access denied)

Only case I can backup/restore to/from network shares, is from the machines where SQL Server runs (SQL1, SQL2)

e.g. I copy the BAK file from FILE1 to SQL2, share the folder (add SQLAdmin account with access), then restore on SQL1 with file from SQL2 Share

RESTORE FILELISTONLY

FROM DISK = N'\\SQL2\backups\UA\DB\DB.BAK'

JerryHung at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 9

When you try to backup, SQL Server 2005 shows the default backup path i.e. c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ . This directory default has SQL user rights. Go to Backup directory and check the user name. Its very big name and I have not checked how SQL server adds it in allowed users list. You can do 2 things:

1. Let the Server take backup on default directory and copy the file in your desired folder. I did that.

2. Give same kind of permissions to your desired folder as Backup directory has.

Hope it solves the issue.

Moonguy

moonguy at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 10

This problem occurs when you are attempting to backup to a UNC patch and the SQL server does not have "modify" rights to the backup path. With the backup path sharepoint, and on the backup directory itself, grant the SQL server "modify" rights - when doing this be sure that "computers" is selected under "object types"

Hopes this helps

Dolphins at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...

SQL Server

Site Classified