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.
-
Have you tried -Q "SET NOCOUNT OFF;EXEC YourProcedure"Scott Hodgin - Retired– Scott Hodgin - Retired2016年11月03日 09:42:40 +00:00Commented Nov 3, 2016 at 9:42
-
Yes i tried with that too. Still i am not getting.Syed Yunus– Syed Yunus2016年11月03日 13:07:57 +00:00Commented Nov 3, 2016 at 13:07
1 Answer 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.