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.
LVL 4
joeviAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
from what I know: yes.
0
 
AkAlanCommented:
CAn you post your code?
0
 
joeviAuthor Commented:
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
0
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
AkAlanCommented:
I would need to see the script before I could try and determine what is going on.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
what about:
Update runs set PostRunBPM = PostRunBPM
select @@rowcount 'rows updated'

Open in new window

0
 
joeviAuthor Commented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.