Backup on network fails

  • Hi,

    I am trying to configure SQL server 2005 backup to a another server drive \\server2\folder. The folder on second server is shared, shared permission and security permission are set fine.

    SQL server runs with NT Authority\Network service and SQL agent runs with a domain account which is given full permission on folder.

    Still the backup from SQL job fails with below error:

    "Cannot open backup device '\\server2\folder\master.bak'. Operating system error 5(Access is denied.). BACKUP DATABASE is terminating abnormally.".

    Please let me know what might be the issue?

    Thanks

  • The account which actually rights the backup is the engine, not the agent.

    You will need to make the SQL Engine service run as a domain account.

    You could try adding the computer account in on the share permission, but never tested that so cannot confirm if it works or not.

    I would consider first backing up to local disk then using something like robocopy to copy the files to the network share, for added safety and doesnt stop the backup completing if there is a network blip.

  • anthony.green (1/3/2013)

    You could try adding the computer account in on the share permission, but never tested that so cannot confirm if it works or not.

    I can confirm it *does* work, but it's not a configuration I would recommend--it gives any service running as Local System or Network Service on the SQL server machine access to the share, which is a potential security issue.

  • paul.knibbs (1/4/2013)


    anthony.green (1/3/2013)

    You could try adding the computer account in on the share permission, but never tested that so cannot confirm if it works or not.

    I can confirm it *does* work, but it's not a configuration I would recommend--it gives any service running as Local System or Network Service on the SQL server machine access to the share, which is a potential security issue.

    Thanks for the clarification Paul, always run everything under a domain account so never had to test that particular scenario, but agreed with its a massive security flaw.

  • I believe read/write permission should go well with the account that you're using to back those db's of your's onto a shared path. If you know how to configure the security part then fair enough, otherwise ask your administrator to look into it. Pls. use "sa" account to run all your jobs unless there is a specific need to drift away from best practice.

    I would also agree what other experts have mentioned over here, instead of backing it up on the share...try backing up on local disk, and then by using robocopy you can actually dump that file to the specific shared path. This way your backup will not be interrupted, and you'll be safe 😛

    Regards,

    Faisal

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

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