Simple use of SQL Server Profiler

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

SQL Server Profiler can detect statements executed on the data, especially if some projects do not directly use SQL statements, directly using the ORM framework of the system to process the database project, when debugging SQL statements, it is very helpful.

Previously wrote the article "SQL Server Profiler Tracking database deadlock" Using SQL Server Profiler to track deadlocks, and then simply write the features commonly used in the SQL Server Profiler usage process.

Use SQL Server version R2 here

1. When installing the SQL Server database, ensure that SQL Server Profiler is installed, and all installations will be installed automatically by default.

2. Open SQL Server Management Studio, in the menu, locate the "Tools" menu and locate the SQL Server Profiler menu item as shown in.

3. Select "Event Selection" and tick the frequently used items as shown in.

4. Select "Show all Columns", then in the list, tick the "DatabaseName" item.

5. Set the filter, where the settings just filter the database name, because if there is more than one database in a DB instance, then the database name is not filtered, then the execution statements on all the databases can be monitored.

You can also set duration to filter SQL statements for different execution times, such as SQL statements that can be filtered for longer execution times, and select to optimize SQL statements.

What if the same database, multi-person access, only want to detect the statement of their own actions? You can create a database account of your own login (you can delete this user after detection), and then, in the LoginName filter, filter your logged-in database account.

After setting, click "Run" to start monitoring, the monitoring screen is as follows.

For monitoring content, you can save, in the monitoring interface of the "File" menu, select Save As, select the format you want to save, the next time you want to see the data, you can open the saved file directly.

Simple use of SQL Server Profiler

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.