简体   繁体   English

如何记录从客户端发送到SQL Server的所有查询?

[英]How to log all queries sent to SQL Server from the client side?

I'm aware SQL Profiler will tell you everything you need to know about queries going on at the server side. 我知道SQL Profiler会告诉您有关服务器端查询的所有信息。 But, can you do something similar to log queries from the client side in the SQL Native Client? 但是,您可以执行与SQL Native Client中来自客户端的日志查询类似的操作吗?

This would be helpful for tracing failing SQL statements that originate from third party assemblies, where it's not possible to step through code, in an environment where profiler access is relegated only to busy DBAs. 在探查器访问权限仅委派给繁忙的DBA的环境中,这对于跟踪源自第三方程序集的失败的SQL语句(将无法单步执行代码)很有帮助。

Try using SqlExpressProfiler. 尝试使用SqlExpressProfiler。 It has worked well for me. 对我来说效果很好。

http://code.google.com/p/sqlexpressprofiler http://code.google.com/p/sqlexpressprofiler

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM