SQL Server 2000 是否有 SQL Profiler 的替代方案
我正在尝试优化 SQL Server 2000 数据库上的一些存储过程,当我尝试使用 SQL Profiler 时,我收到一条错误消息“为了对 SQL Server 运行跟踪,您必须是 sysadmin 固定服务器角色的成员”。 。 似乎只有 sysadmin 角色的成员才能在服务器上运行跟踪(这在 SQL Server 2005 中已修复),而且我根本不可能被授予该服务器角色(公司策略)
我现在在做什么插入当前时间减去过程在代码的各个阶段启动的时间,但我发现这非常乏味
我还考虑将数据库复制到 SQL Server 的本地安装,但存储过程使用来自许多不同数据库的数据我会花很多时间在本地复制数据
所以我想知道是否有其他方法来分析 SQL 代码? (第三方工具,不同的做法,其他)
I am trying to optimize some stored procedures on a SQL Server 2000 database and when I try to use SQL Profiler I get an error message "In order to run a trace against SQL Server you have to be a member of sysadmin fixed server role.". It seems that only members of the sysadmin role can run traces on the server (something that was fixed in SQL Server 2005) and there is no way in hell that I will be granted that server role (company policies)
What I'm doing now is inserting the current time minus the time the procedure started at various stages of the code but I find this very tedious
I was also thinking of replicating the database to a local installation of SQL Server but the stored procedure is using data from many different databases that i will spend a lot of time copying data locally
So I was wondering if there is some other way of profiling SQL code? (Third party tools, different practices, something else )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果没有分析器,你的手就会被束缚。
但是,您可以首先使用查询分析器或
任何查询工具并检查执行计划。 通过质量检查,您可以使用
显示执行计划选项。 从其他工具中,您可以使用
Your hands are kind of tied without profiler.
You can, however, start with tuning your existing queries using Query Analyzer or
any query tool and examining the execution plans. With QA, you can use
the Show Execution Plan option. From other tools you can use the
在查询分析器中:
运行查询并查看消息选项卡。
我认为这可能需要相同的权限,但值得一试。
In query analyser:
Run query and look in the messages tab.
It occurs to me this may require same privileges, but worth a try.
SQL 2000 上有一个解决方法,可以混淆 Profiler 连接对话框,以将 sysadmin 连接限制为仅运行跟踪。
SQLTeam
博客
There is a workaround on SQL 2000 to obfuscate the Profiler connection dialogue box to limit the sysadmin connection to running traces only.
SQLTeam
Blog