none
SQL Backup to network share

    Question

  • Hi
    I need to backup Sql server for network share. My SQL server installation doesn't have installed with any service users .In this situation I can'y direclty backup database to network share. How to grant permission on network share if we not install SQL Server using Service user to make backup to network share. Which privileges should I added on network share ?  Many thanks !!!!!

    command

    Backup database [xyz] TO DISK = N'\\NETorkshare\SQLPROD\xyz_backup_201804201402.bak' WITH NOFORMAT, NOINIT,SKIP, REWIND, NOUNLOAD, STATS = 100


    • Edited by ashwan Friday, April 20, 2018 4:07 AM
    Friday, April 20, 2018 4:05 AM

Answers

  • How to grant permission on network share if we not install SQL Server using Service user to make backup to network share. Which privileges should I added on network share

    Hello,

    You have to grant permission for the Computer account , it's "Domain\computername$" (the dollar $ sign is important!) and the account needs at least read & write permissions.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, April 20, 2018 5:50 AM
    Moderator
  • Ideally you want to change the account that SQL runs as.

    If you can, change it to a low privileged domain account and use that domain account on the share.

    If you cannot use a domain account, run it as Local Service and then grant the computer account permissions on the share


    Martin Cairney SQL Server MVP

    Friday, April 20, 2018 6:01 AM

All replies

  • make sure that you write access on '\\NETorkshare\SQLPROD\.

    try create a note pad file in '\\NETorkshare\SQLPROD.


    https://social.technet.microsoft.com/wiki/contents/articles/37872.sql-server-installation-on-centos-linux.aspx

    Friday, April 20, 2018 4:59 AM
  • Hi Thanks for reply, Write access to which user?. That what my issue. As long as no service user. But my login account has full permission on this folder. Still getting error. That is the issue I have.

    Operating system error 5(Access is denied.).

    Msg 3013, Level 16, State 1, Line 97

    thanks


    • Edited by ashwan Friday, April 20, 2018 5:38 AM
    Friday, April 20, 2018 5:34 AM
  • How to grant permission on network share if we not install SQL Server using Service user to make backup to network share. Which privileges should I added on network share

    Hello,

    You have to grant permission for the Computer account , it's "Domain\computername$" (the dollar $ sign is important!) and the account needs at least read & write permissions.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, April 20, 2018 5:50 AM
    Moderator
  • Ideally you want to change the account that SQL runs as.

    If you can, change it to a low privileged domain account and use that domain account on the share.

    If you cannot use a domain account, run it as Local Service and then grant the computer account permissions on the share


    Martin Cairney SQL Server MVP

    Friday, April 20, 2018 6:01 AM
  • Hi Olaf !00% correct. Its works. Great thanks
    Friday, April 20, 2018 6:20 AM
  • Hi Martin

    You al so correct. But At this stage I can't restart instances by assign new Service users.

    Many thanks

    Friday, April 20, 2018 6:21 AM