Why do scheduled jobs run as network service?

ProtoProto Posts: 12 Bronze 2
I don't understand. Why bother setting up a specific account that the SQL Backup Agent runs under when scheduled jobs just ignore it and try and run under NETWORK SERVICE? 

SQL Backup Agent is running under the SQLBackupAgent account, but that seems to make no difference.

It's permissions issue after permissions issue when setting up the latest version of Backup. I've never had so much trouble.

Is there a clear step by step guide on setting up Backup? Don't point me at that giant Permissions page, that is just a useless wall of text. 


Tagged:

Answers

  • ProtoProto Posts: 12 Bronze 2
    The current permissions issue seems to be causing scheduled jobs to not send out emails. Even though the test runs fine.

    Warning 150: MAILTO error: SMTP host name not defined.

    SQLBackupAgent has Admin permissions, but I suspect it's running as NETWORK SERVICE





  • ProtoProto Posts: 12 Bronze 2
    So I found this command

    DECLARE @settings varchar(1024)
    EXEC master..sqbutility 1008, @settings OUTPUT
    SELECT @settings

    which showed the email settings as blank, even thought they show in the UI.
    went back to the UI and moved the port from 25 to 26 and back again to enable the Apply button.
    Clicked that and now the settings are saved in the db.
    Now scheduled jobs can find them and things run as expected.
    So... weird
  • This might help with regards to understanding the rights required (https://www.sqlbackuprestore.com/settinguprights.htm).  Essentially, your SQL Server Agent job needs to have the same rights as a end-user - i.e. to run the SQL Backup extended stored procedures and rights to back up and restore the databases.
    SQL Backup - beyond compression
Sign In or Register to comment.