Cannot Open Backup Device Error

Hi DBAs,

I am trying to take backup on network folder but I am getting below error:

Msg 3201, Level 16, State 1, Line 9
Cannot open backup device '\\xyz.xy.z.xy\abcde\xy\xyzarchive_2015_7_14_11_14_58.Diff'. Operating system error 1326(Logon failure: unknown user name or bad password.).
Msg 3013, Level 16, State 1, Line 9
BACKUP DATABASE is terminating abnormally.

I am using the below script :

DECLARE @filename VARCHAR(255)
SELECT @filename ='\\xyz.xy.z.xy\abcde\xy\xyzarchive_' + 
  LTRIM(STR(DATEPART(year, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(month, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(day, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(hour, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(minute, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(second, GETDATE()))) + '.Diff'
backup database xyzarchive 
to disk=@filename
with differential,stats=1

Could anyone suggest me how to troubleshoot / resolve this error permanently??

Thanks in Advance!

Regards,

Yashwant Vishwakarma | SQLOcean.c

July 14th, 2015 2:06am

Msg 3201, Level 16, State 1, Line 9
Cannot open backup device '\\xyz.xy.z.xy\abcde\xy\xyzarchive_2015_7_14_11_14_58.Diff'. Operating system error 1326(Logon failure: unknown user name or bad password.).

Hello,

You are trying to restore a backup from a network share and by the error message it seems that SQL Server service account don't have permissions to Access the share. Copy the backup file to a local drive and try to restore from there.

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 2:55am

Hi There,

Nothing wrong in syntax. can take a backup locally with your code.

SO the problem is the network path. you may not have permissions.

from the machine:  Test this path from the run prompt. \\xyz.xy.z.xy\abcde\xy\

you you can access this then you should be fine. 

This is purely folder level permissions and sharing issue.

Good luck

kumar 

July 14th, 2015 3:01am

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

Other recent topics Other recent topics