1

I would like to know if SQL Server store all messages related to T-SQL in a system table or in other object from Database Engine.

Because, I don't know if this is a response of engine or some other stuff.

enter image description here

enter image description here

Now, I did this to capture transactions

enter image description here

And I need to do that for each transaction that I want to "control" (number of register inserted, deleted or updated)

  • I believe the answer is no. – jyao Sep 25 '18 at 15:19
  • U mean for number of rows affected ? – Kin Shah Sep 25 '18 at 15:19
  • 3
    No, SQL Server does not keep track of these transient output messages anywhere... – Aaron Bertrand Sep 25 '18 at 15:20
  • 1
    I suspect you might get a better answer if you explain what you are trying to achieve. – mustaccio Sep 25 '18 at 15:28
  • Hi, I would like to catch the transaction that I execute without alter my script. I was working with a Stored procedure or Trigger to do that but I need to configure my script to do that. – LeoGastiaburu Sep 25 '18 at 15:35
0

The message you're seeing is not generated by SQL Server itself; it just returns "12".

SQL Server Management Studio generates the complete message; it's a .NET application so it's probably coming from a .resx file which gets compiled into the application package. With a decompiler or DLL analyzer you might be able to find it among the other messages.

| improve this answer | |
  • What about of response from sqlcmd? because if you execute a script in a sqlcmd, console shows a similar response. – LeoGastiaburu Sep 25 '18 at 16:42
0

Based on your screenshot, the highlight message that you are seeing is called DONE_IN_PROC messages and that is from the client - in your case SSMS.

You can suppress it using set nocount on.

setting SET NOCOUNT to ON can provide a significant performance boost, because network traffic is greatly reduced.

The error messages (system-defined and user-defined messages) that are stored in sql server can be queried using sys.messages

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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