复制和默认跟踪性能问题

发布于 2024-11-08 13:18:31 字数 1485 浏览 0 评论 0原文

在我的服务器(SQL2005)上设置复制后,我注意到默认系统跟踪日志充满了复制条目,这会导致性能问题。

由于默认跟踪始终记录任何 DBCC SP,并且您无法修改此行为,因此我们最终得到如下结果:

16  2011-05-18 22:45:40.137 dbcc addinstance ("SQL Replication Logreader", @agent_name)          
17  2011-05-18 22:45:40.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Trans/sec", @agent_name, @latest_delivered_transactions)          
18  2011-05-18 22:45:40.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Cmds/sec", @agent_name, @latest_delivered_commands)          
19  2011-05-18 22:45:40.137 dbcc setinstance ("SQL Replication Logreader", "Logreader:Delivery Latency", @agent_name, @delivery_latency)      
20  2011-05-18 22:45:45.137 dbcc addinstance ("SQL Replication Logreader", @agent_name)          
21  2011-05-18 22:45:45.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Trans/sec", @agent_name, @latest_delivered_transactions)          
22  2011-05-18 22:45:45.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Cmds/sec", @agent_name, @latest_delivered_commands)          
23  2011-05-18 22:45:45.137 dbcc setinstance ("SQL Replication Logreader", "Logreader:Delivery Latency", @agent_name, @delivery_latency)      

另一个问题是跟踪文件的位置。它存储在 SQL Server 实例的 LOG 目录 (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG) 中 就我而言,C 驱动器的 IO 效率不如专用 D 分区(高性能阵列 (RAID 10))。

我应该禁用服务器上的默认跟踪吗? 或者,在这种情况下最佳实践是什么?

After setting up a replication on my server (SQL2005) I have noticed that default system trace log is full of replication entries which cause a performance issue.

As default trace always logs any DBCC SPs and you cannot modify this behaviour we ended up with something like the following:

16  2011-05-18 22:45:40.137 dbcc addinstance ("SQL Replication Logreader", @agent_name)          
17  2011-05-18 22:45:40.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Trans/sec", @agent_name, @latest_delivered_transactions)          
18  2011-05-18 22:45:40.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Cmds/sec", @agent_name, @latest_delivered_commands)          
19  2011-05-18 22:45:40.137 dbcc setinstance ("SQL Replication Logreader", "Logreader:Delivery Latency", @agent_name, @delivery_latency)      
20  2011-05-18 22:45:45.137 dbcc addinstance ("SQL Replication Logreader", @agent_name)          
21  2011-05-18 22:45:45.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Trans/sec", @agent_name, @latest_delivered_transactions)          
22  2011-05-18 22:45:45.137 dbcc incrementinstance ("SQL Replication Logreader", "Logreader:Delivered Cmds/sec", @agent_name, @latest_delivered_commands)          
23  2011-05-18 22:45:45.137 dbcc setinstance ("SQL Replication Logreader", "Logreader:Delivery Latency", @agent_name, @delivery_latency)      

Another problem is the location of the trace file. It is stored in the LOG directory for the SQL Server instance (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG) and
in my case the C drive is not as much IO efficient as dedicated D partition which is the high performance array (RAID 10).

Should I disable the default trace on my server?
Alternatively, What are the best practices in this situation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赠我空喜 2024-11-15 13:18:31

据我所知,您无法更改默认跟踪。我在网上查了一下,没有看到相反的信息。

当然,您可以禁用它并自行推出。

一些更多信息

也许有一些跟踪标志来控制默认跟踪的功能会很好。没有任何 MS Connect 文章...还;-)

As far as I know, you can't change the default trace. I've had a poke around on the interwebs and I see no information to the contrary.

You can disable it and roll your own of course.

Some more info

It'd be nice to have some Trace flag to control what the default trace does, perhaps. There isn't any MS Connect article... yet ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文