May 23, 2012 at 8:06 am
Hi Folks,
Here is the error Im recieving
Executed as user: Domain\Account. Warning: cannot write logfile c:\Log.txt. Writing to log files is only allowed to jobs that are owned by sysadmin. Please consider writing log to table. The step failed
The above error is killing me. I dont want to give sysadmin rights to the account just because its need to write output of the job to a file.
Is their any workaround other than giving admin rights?
Any help is really appreciated.
May 23, 2012 at 8:19 am
Two things I can think of,
1 - have a secondary job which is fired from the completion of Job 1, which pulls the information from the sysjobstepslogs table and runs as SA and outputs to the file system,
2 - have a second step which runs under a proxy account which has access to dump to the file system, then use something like BCP to query sysjobstepslogs and dump it to a file on the filesystem.
May 23, 2012 at 8:26 am
Thanks Anthony. The reason I am looking for log file because SQL doesnt put complete log in table as it will be truncated after its limit.
May 23, 2012 at 8:31 am
the log column of sysjobstepslog is nvarchar(max) so can hold up to 2gb of data, so should be more than enough when logging to the table.
May 23, 2012 at 11:36 am
thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply