Experience sharing with SQL Profiler Trace (2005) (new Trace, parse trace file)

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

Reprint: Experience sharing using SQL Profiler Trace (2005) (new trace, analysis trace file)

The use of SQL Server Profiler can be seen in this article Sql2005 performance tools (SQL Server Profiler and Database Engine Tuning Advisor) using a detailed approach

Yesterday, the SQL execution of a program was followed, and the TRC (trace file for SQL Server Profiler) was opened, and 800 data were recorded in 2 minutes.

The vast majority are not the data I want, this tool also has no filtering function, it is really troublesome to find out what I want from so much data.

Bing took a piece on the stack overflow there's an is there a-way to filter a SQL Profiler trace?

Share the experience of others here.

1. How can I track it more effectively?

Add the "Application Name"/"app" key to the application's connection string, so that when you create a new trace,

can be filtered according to ApplicationName in the "column filter" (e.g.)

2. What if the TRC file is filtered?

As I said at the beginning, I get a 800-line file, and if I filter out what I need from it?

You can perform this section in SQL Server Management Studio

SELECT * INTO TraceTableFROM ::fn_trace_gettable(‘d:\sqlLog.trc‘, default)
(d:\sqlLog.trc:跟踪文件的全路径)
然后数据库里就会多了张TraceTable表,跟踪文件里的内容写到这张表里去了。

(tracetable table)

After that, you'll be able to analyze this tracetable.

Experience sharing with SQL Profiler Trace (2005) (new Trace, parse trace file)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.