1
votes

I don't want to get the outpt message from this execution of sp_configure. How can I do to get no message?

I haven't found anything useful about this.

I use the procedure in an application and I have to stop the message in sql(t-sql).

exec master..sp_configure 'show advanced options', 1 reconfigure

Messages Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.

1
Please show us your application code that is calling/executing this SQL statement, inlcuding the part that receives the message output from the SQL commands. - RBarryYoung

1 Answers

1
votes

The only way I know of to suppress output from any of the system procedures like sp_configure, sp_rename and others is to create a small CLR assembly to run them. That "eats" the output unless you spend extra effort to preserve it.

The assembly could be something simple that just executes the passed in command on the context connection similar to sp_executesql. Be aware however, that any result sets will not get returned either.

If you need example code, check out the tSQLt testing framework. It is using this technique during the FakeTable and SpyProcedure methods.