Monday, August 1, 2011

AnjLab Profiler and “master.mdf…trc” files

SQL Profiler is a very useful tool to trace the execution of instructions over a database, however , it is not available for express edition of SQL Server databases
An alternate for this is a profiler from AnjLab which provides features quite similar to that of SQL Profiler.
Both SQL Profiler and AnjLab Profiler make use of the “Trace” facility available in the database engine of SQL Server.

Overall this profiler is harmless, however, there are two issues that must be considered when using the profiler

1. The profiler creates “master.mdf..yyyy.mm.dd.hh.min.sec.trc” file but (at least in our case it) does not delete the file when tracing is finished. These files are created in the default “DATA” folder of SQL Server instance (in our case). Since the files are not deleted automatically therefore a number of trace executions consume a lot of valuable space

2. In our scenario, if the profiler executes for a long time then it starts going into “Not Responding” states. Eventually the user is forced to close the application. In this case the “Trace” in SQL Server is not deleted thus it continues to execute and keeps on creating files unless explicitly closed using “sp_trace_setstatus”. (For more information on finding, stopping and closing traces see the article in this blog “SQL Server Trace Files Consuming Lot of Space”).

No comments:

Post a Comment