Output of SQLAgent Job Steps -
08-25-2004
, 08:54 AM
In Enterprise Manager, when configuring a job you can choose (in the
Advanced tab) to copy the output of the step to a file (either overwriting
or appending a text file).
I have a job that has 3 steps whose output I want appended to the one file,
say "Errors.txt"
Step 1: A T-SQL Step.
Step 2: A CmdExec Step (using DTSRun to run a DTS Package)
Step 3: A T-SQL Step.
Each of these steps is configured to append their output to the same file.
After the job has been run, the text file DOES contain the collated output
from each of the steps, but it seems that T-SQL Steps output in Unicode, but
CmdExec steps output in ASCII. This results in an unreadable file
containing a mishmash of single-byte and double-byte text. It is viewable
in a Hex editor, but this is hardly desirable.
So, does anyone know a quick way to make the Steps' output format consistant
with the file that is being appended to?
Thanks in advance.
Regards,
Adam
PS. I suppose a solution would be to choose another file with overwrite for
the CmdExec job and add another step (ActiveX) that uses the
FileSystemObject or something to append that file onto the big log. |