Sql-server – SQLCMD does not print Rows affected in log file

sql serversqlcmd

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.

Best Answer

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