Backing up to UNC path

  • I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

  • jackimo - Wednesday, March 28, 2018 8:49 AM

    I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

    are these backups via sql agent jobs?
    if the sql server service and\or the agent service run under a domain user account, then the user must be granted access to the share and have sufficient NTFS ACls to grant access.

    If the sql service and\or the agent run under system or network service then the computer account for the sql server needs to be granted access as stated above

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle - Wednesday, March 28, 2018 8:57 AM

    jackimo - Wednesday, March 28, 2018 8:49 AM

    I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

    are these backups via sql agent jobs?
    if the sql server service and\or the agent service run under a domain user account, then the user must be granted access to the share and have sufficient NTFS ACls to grant access.

    If the sql service and\or the agent run under system or network service then the computer account for the sql server needs to be granted access as stated above

    Yes - SQL Agent jobs.  So if they are sql agent jobs does only the domain account running the agent require access?  Or is it the agent account and the SQL Server service account?

  • jackimo - Wednesday, March 28, 2018 9:06 AM

    Perry Whittle - Wednesday, March 28, 2018 8:57 AM

    jackimo - Wednesday, March 28, 2018 8:49 AM

    I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

    are these backups via sql agent jobs?
    if the sql server service and\or the agent service run under a domain user account, then the user must be granted access to the share and have sufficient NTFS ACls to grant access.

    If the sql service and\or the agent run under system or network service then the computer account for the sql server needs to be granted access as stated above

    Yes - SQL Agent jobs.  So if they are sql agent jobs does only the domain account running the agent require access?  Or is it the agent account and the SQL Server service account?

    if theyre jobs its the agent acct

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle - Wednesday, March 28, 2018 9:24 AM

    jackimo - Wednesday, March 28, 2018 9:06 AM

    Perry Whittle - Wednesday, March 28, 2018 8:57 AM

    jackimo - Wednesday, March 28, 2018 8:49 AM

    I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

    are these backups via sql agent jobs?
    if the sql server service and\or the agent service run under a domain user account, then the user must be granted access to the share and have sufficient NTFS ACls to grant access.

    If the sql service and\or the agent run under system or network service then the computer account for the sql server needs to be granted access as stated above

    Yes - SQL Agent jobs.  So if they are sql agent jobs does only the domain account running the agent require access?  Or is it the agent account and the SQL Server service account?

    if theyre jobs its the agent acct

    So I've tested this out, created a scheduled agent job that runs on a schedule and the only way I seem to be able to get it to run successfully is to have the actual SQL Server service account running as the domain account with access to the share.  Any thoughts?

  • jackimo - Wednesday, March 28, 2018 9:41 AM

    Perry Whittle - Wednesday, March 28, 2018 9:24 AM

    jackimo - Wednesday, March 28, 2018 9:06 AM

    Perry Whittle - Wednesday, March 28, 2018 8:57 AM

    jackimo - Wednesday, March 28, 2018 8:49 AM

    I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

    are these backups via sql agent jobs?
    if the sql server service and\or the agent service run under a domain user account, then the user must be granted access to the share and have sufficient NTFS ACls to grant access.

    If the sql service and\or the agent run under system or network service then the computer account for the sql server needs to be granted access as stated above

    Yes - SQL Agent jobs.  So if they are sql agent jobs does only the domain account running the agent require access?  Or is it the agent account and the SQL Server service account?

    if theyre jobs its the agent acct

    So I've tested this out, created a scheduled agent job that runs on a schedule and the only way I seem to be able to get it to run successfully is to have the actual SQL Server service account running as the domain account with access to the share.  Any thoughts?

    That would be correct. You can always monitor which accounts are accessing what by running Process Monitor. In your case, just point to the backup folder and filter where "path begins with" and set it to the path for the backup folder. It will pick up subfolder activity:
    Process Monitor v3.50

    I was just watching some and the backups themselves were the SQL Server service account. The deletes were the SQL Server agent account.

    Sue

  • jackimo - Wednesday, March 28, 2018 9:41 AM

    Perry Whittle - Wednesday, March 28, 2018 9:24 AM

    jackimo - Wednesday, March 28, 2018 9:06 AM

    Perry Whittle - Wednesday, March 28, 2018 8:57 AM

    jackimo - Wednesday, March 28, 2018 8:49 AM

    I'd like to backup my databases to a UNC path.  IE - \\servername\share1\.
    I'm a bit confused about the configuration, does the SQL Server service account itself need to be running under a domain account (with permissions to the share) to accomplish this or just the SQL Server agent account?

    are these backups via sql agent jobs?
    if the sql server service and\or the agent service run under a domain user account, then the user must be granted access to the share and have sufficient NTFS ACls to grant access.

    If the sql service and\or the agent run under system or network service then the computer account for the sql server needs to be granted access as stated above

    Yes - SQL Agent jobs.  So if they are sql agent jobs does only the domain account running the agent require access?  Or is it the agent account and the SQL Server service account?

    if theyre jobs its the agent acct

    So I've tested this out, created a scheduled agent job that runs on a schedule and the only way I seem to be able to get it to run successfully is to have the actual SQL Server service account running as the domain account with access to the share.  Any thoughts?

    if the sql server service runs as local system or network service, the computer account should be granted permissions. The computer account has the following format

    domain\computername$

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • The SQL Server engine service account runs the backup.  This is why when you run the backup from SSMS, even though you might have access to a folder or share, the backup can't run if the engine doesn't have access.

    Agent requests a backup of the engine, but the engine runs this. Other tasks from the agent are started by the agent,but depending if this is direct execution or request of a service determines which account needs rights.

Viewing 8 posts - 1 through 7 (of 7 total)

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