SQL Backup to Network Share-Fails by UNC, works by IP

  • I'm running a clustered SQL 2008 R2 instance. When I try to backup a tran log to a network share by the share's UNC, it fails with:

    Operating system error 5(Access is denied.). BACKUP LOG is terminating abnormally

    The SQL Agent and the SQL Server service are both running under the same domain account, and if I log into a computer with that domain account, I can create and delete files on that share. In addition, if I change the backup location to reference the IP rather than the UNC, the tran log backup job works! So I know that the share permissions are correct.

    I suppose I could leave the job running and backing up to that share via the IP indefinetly, but that's not ideal; I would rather backup to the UNC path, in case someone at corporate decides to change the IPs around.

    Anyone run into problems like this, where SQL can access network shares via IP, but fails with Access Denied when accessing via a UNC?

    ie. FileServer.Domain.com fails

    10.165.XX.XX works

    where

    pinging FileServer.domain.com returns 10.165.XX.XX

    Thanks,

    Jeff

  • Have you double checked to make sure the backup job is being executed in the context of the service account, and not some user account that doesn't have access to the share?

  • Well, the job is running thru the job scheduler, without anyone RDP'd into the SQL server or anyone triggering the job. So the only credentials it would have would be those of the SQL Server.

    And it works thru the scheduler using the IP, and it fails thru the scheduler using a UNC path. So the userid it is using has permissions to access the folders, since it works via IP; It's the same location and the same userid, just refering to that location in a different manner.

  • More info:

    I changed our Dev SQL Server to use that same userid / password for its SQL Services. I set up our Dev SQL Server to back up its tran log to that same location.

    Our Dev SQL Server is able to back up to that file share by using its UNC name. Our prod SQL Server can only back up to that location by using the IP address.

    Both are using the same userid / password for SQL Server Service and SQL Agent Service. Both are running SQL 2008 R2.

    Prod is clustered. Dev is not.

    Anyone have any ideas what change needs to be made for our prod SQL Server to back up to that location using the UNC name rather than the IP?

    If I remote into the Prod SQL Server, I can browse the location thru windows explorer via the UNC name. So the Windows cluster can get to that location by UNC name, but the SQL Cluster cannot.

  • I just encountered the same issue yesterday on a new production SQL 2008 R2 cluster that I built. Same error logged when trying to backup to a UNC path. Dev server could back up to same path with no issues. Prod server backup works using IP instead of UNC.

    We created a new DNS Host(A) record using a new name but the same IP. I was able to backup to the new UNC path with no issues.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply