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?
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 😉