MS SQL Server 2012... with nightly databases backups to the same/local as SQL Server machine...
I am trying to add another SQL Server Agent Job to copy the .bak files to remote (non-windows, i.e. Linux) share with non-Windows (non-AD) user/password credentials. I do not have any access to configuring or changing that access which is under control of other, quite remote people.
For this (copying) I created local user with the same user name and password, gave it permissions to the (source or local) backup-folders upon which all perfecly works from command line (Win + К
or cmd
) if to enter the command manually:
RUNAS /user:UserName /savecred "robocopy d:\SQLBACKUP \\10.195.xx.yyy\backup /S /purge /MAXAGE:7 /MT:1 /Z"
but fails to run as SQL Server Agent job (type of step is "Operating System(CmdExec)
". SQL Service Agent (with standard configuration of running under [NT Service/SQLServiceAgent]
account, the job is owned by SA
SQL Server superuser).
Can anybody explain me why it is failing and how to correctly make it running (taking into account that I do not have access to domain users configuration)?
eventvwr.msc
; the copying takes hours);