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.

asked Nov 3, 2016 at 9:23
2
  • Have you tried -Q "SET NOCOUNT OFF;EXEC YourProcedure" Commented Nov 3, 2016 at 9:42
  • Yes i tried with that too. Still i am not getting. Commented 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

answered Nov 3, 2016 at 11:14

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.