To create a trace with SQL Server Profiler

Source: Internet
Author: User
Tags how to use sql server how to use sql management studio sql server management sql server management studio

SQL Server Profiler (Profiler) helps database administrators track specific events that are performed by SQL Server databases, monitors the behavior of the database, and saves these valuable information to a file or table for later analysis to resolve problems with the database. Optimizes the performance of the database engine. This step-by-step article describes how to use SQL Server Profiler to create the entire process of SQL Server tracing.

To create a trace:

1, first from the Start menu point to All Programs, open SQL Server Management Studio.

2, choose Profiler from the Tools menu.

3. When the profiler main interface is open, select New Trace from the File menu.

4. At this point, SQL Server Profiler prompts you to connect to the instance of SQL Server where you want to sniff the trace. To provide the required details for the connection, click the "Connect" button to continue.

5. In the "Tracking name" text box, enter the name of the trace you want to create for this trace.

6. Select a template for the trace you created from the "template name" Drop-down menu. (The following tips will use information about the purpose of the common trace template).

7. Select the "Save to File" option to save the trace you created to a file on your local hard drive. After clicking the check box, enter a filename and its location in the "Save as" window that pops up.

8. Click on the "Events" tab to view the events you want to follow up in the tracking plan you created. Depending on the template you choose, the system will automatically select some events, but you can modify these default option settings. Look at other options by clicking the Show All events and show all columns check boxes.

9, click the "Run" button to start tracking. SQL Server starts creating the trace and displays the trace details in the saved file. When you are finished running, choose Stop Tracing from the File menu.

Tips:

1, the trace template option provides a "standard" (Standard) template for capturing a large amount of information about SQL Server connections, stored procedures, and Transact-SQL statements.

2, the tuning template is used to capture information that can be used by Database Engine Tuning Advisor to optimize SQL Server performance.

3, the "TSQL_Replay" template is used to capture the details of all Transact-SQL statements needed to rerun this trace in the future.

Related Article

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.