This makes it much easier to work with the trace file comapred to opening the file within SQL Server Profiler. It means it is also possible to sort, filter, apply aggregations (sums, counts, etc) against the data. Of course, you could always save the trace data to a table from within SQL Server Profiler, and then perform these sorts of SQL queries against that table, but using fn_trace_gettable, you don't need to.SELECT *FROM ::fn_trace_gettable('c:\TraceFile.trc', default)
Monday, 7 November 2016
Profiler - Querying Trace Files From SSMS
If you have trace data that has been saved to a file, it is possible to query this data via SQL Server Management Studio, and run SQL commands against the file. Example SQL:
Subscribe to:
Post Comments (Atom)
Updating massive amount of rows whilst avoiding blocking
The following SQL is a good means to split an update on a massive table into smaller chunks, whilst reducing blocking. The method is to upda...
-
Microsoft Distributed Transaction Coordinator (abbreviated to MSDTC, or DTC) is usually very quick and simple to set up. However, it isn...
-
Migrations between SQL Servers can be laborious, and doing them manually leaves a lot of room for human error. Scripting a migration using t...
-
Scheduling SSIS packages from SQL Agent can produce the following error on a new installation of SQL Server: “Connecting to the Integration...
No comments:
Post a Comment