Running a sql server 2008 job to back up to network folder

  • I'm trying to schedule a back up database task to backup some specific databases to a network folder but kept getting this error message-

    " Executing the query "BACKUP DATABASE [XDevSL7Utilities] TO DISK = N'\\..." failed with the following error: "Cannot open backup device '\\fscorp\DynDB-Backup\Backup-vDB2001\Database_backup_2010_12_30_134701_5618693.bak'. Operating system error 5(Access is denied.). BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 1:47:00 PM Finished: 1:47:01 PM Elapsed: 1.031 seconds. The package execution failed. The step failed"

    Any help or guidance will be greatly appreciated.

  • mashikoo (12/30/2010)


    I'm trying to schedule a back up database task to backup some specific databases to a network folder...

    1- Share a folder located on target remote drive

    2- Map remote share in local server

    3- Point backup to mapped drive

    Problem is that backup speed will be limited by network speed - pretty poor performance.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • I have had no end to trouble with mapped drives when not connected as an interactive user. I strongly suggest using a UNC path instead of a mapped drive.

    CEWII

  • Thanks, but I'm not trying to backup to a mapped drive but to a network share. Does the steps you metioned earlier apply?

    Appreciate!

  • Thanks Elliot,

    Currently i'm able to backup my sqlserver 2005 databases to a shared folder without any glitch. I'm only having trouble doing the same to my sql server 2008 databases hence the error I stated earlier.

  • The sqlagent (user) has access to the share?

  • As Jo suggested, check if the SQL Server Agent service account has FULL permissions on the network share.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • I have the similar problem. and the SQL agent has read, write and modify access to the shared folder BUT FULL Control.

    Please help!!!

  • apart from the share permissions, does the agent also has the necessary NTFS-permissions (if underlying filesystem is ntfs)?

  • Yes Im logged into the server as the agent domain account and I can manually create, delete txt files on the shared folder. But when I try to backup the database on the shared folder it fails with access denied error.

  • It's definitely permissions. AFAIK, however, it's the SQL Service account, not the agent account, that needs permissions.

    The agent logs in just like you do from your workstation. The backup is run by the SQL engine, and it's service account needs permission.

  • SQL Server Services and the agent runs under same account.

    Thanks!

  • The network share - is it by chance a DFS replicated share?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • It is permissions. OS 5 is access denied from Windows.

    there has to be something weird going on there. Can you run this on your system and perhaps see permissions and verify?

    http://technet.microsoft.com/en-us/sysinternals/bb897332

    Can you do a "dir > n:\test.txt" in a job with the same credentials?

  • it is CIFS.

Viewing 15 posts - 1 through 15 (of 29 total)

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