joevi
asked on
TSQL row counts to a Job Output file.
How do I get TSQL script output to the job output file? I'm currently getting job messages but no rowcounts, etc.
CAn you post your code?
ASKER
This is just a test script:
Update runs set PostRunBPM = PostRunBPM
...and we get row counts when firing from SSMS.
It's in a job thats of TSQL type, that has an output file on a local server folder (using drive letter not UNC).
In one iteration I even set nocount off in the script but still get only the following in the output file.
Job 'Test' : Step 1, 'Test' : Began Executing 2011-03-20 09:14:36
Update runs set PostRunBPM = PostRunBPM
...and we get row counts when firing from SSMS.
It's in a job thats of TSQL type, that has an output file on a local server folder (using drive letter not UNC).
In one iteration I even set nocount off in the script but still get only the following in the output file.
Job 'Test' : Step 1, 'Test' : Began Executing 2011-03-20 09:14:36
I would need to see the script before I could try and determine what is going on.
what about:
Update runs set PostRunBPM = PostRunBPM
select @@rowcount 'rows updated'
ASKER
angelll: I should have mentioned this is part of a busy production environment where we're getting lot's of ad-hoc, long running scripts that I wanted to start parking in jobs (less workstation baby sitting) but I need the row counts (even if the job doesn't fail).
I didn't want to have to insert 'select @@rowcount' in the scripts and was hoping I was missing something in the job step configuration.
Is 'Select @@rowcount' my only option?
Thanks
I didn't want to have to insert 'select @@rowcount' in the scripts and was hoping I was missing something in the job step configuration.
Is 'Select @@rowcount' my only option?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.