开发者

How can I write a message to SQL profiler from Sql a query?

I am troubleshooting for some SQL issue and I use SQL Profiler in order to diagnose some problem.

Is it pos开发者_StackOverflowsible to write some messages into SQL Profiler by adding some lines in a TSQL query?

thanks!


you can do by adding comment to your t-sql like

 -- My message
select * from table1

and send all to sql


The Application Name should also be different. For our installation, activity on the website gives an application name of ".Net SqlClient Data Provider", while queries from SQL Server Management Studio are designated as... well... "SQL Server Management Studio"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜