0

I am calling stored procedure using SQLCMD which will insert data into multiple tables. And output of that procedure is captured in log file using -o. But, i can't see Row(s) affected any where in the log file. And same when I am executing procedure I am getting Row(s) affected.

Is there any other way to print Row(s) affected in log file along with print statement. I have tried using SET NOCOUNT OFF as well but no use.

2
  • Have you tried -Q "SET NOCOUNT OFF;EXEC YourProcedure" Nov 3, 2016 at 9:42
  • Yes i tried with that too. Still i am not getting.
    – Syed Yunus
    Nov 3, 2016 at 13:07

1 Answer 1

1

I'm not sure if this is your problem, but check your 'Connections' options for your Sql Server instance.

Using Sql Server Management Studio, right-click your instance and select 'Properties'. Then select 'Connections'. Under 'Default connection options', scroll down and make sure that 'no count' is NOT checked.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.