Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

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.
0
joevi
Asked:
joevi
  • 2
  • 2
  • 2
1 Solution
 
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
 
AkAlanCommented:
I would need to see the script before I could try and determine what is going on.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
from what I know: yes.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now