Sqlserver locate SQL statements with high resource consumption, and sqlserver locate SQL statements

Source: Internet
Author: User

Sqlserver locate SQL statements with high resource consumption, and sqlserver locate SQL statements

SQL Server views the SQL statements that consume resources, as follows:


You can use SQL to quickly locate the CPU in the database, with high IO consumption:

1. Locate the process information with the highest I/O consumption

Selectspid, dbid, cpu, physical_io, login_time, last_batch, status,

Hostname, program_name, hostprocess, cmd, nt_usernamefrom sysprocesses order by cpu, physical_io desc;

 

2. Locate the SQL statement executed by the Process

Select name, dbid from sysdatabases wheredbid = & dbid;

Run the following command in the database:

Dbcc inputbuffer (& spid );


You can also view the SQL Execution Plan from the event probe.


The SQL server 2005 queryer can quickly locate characters or tables.

Plug-ins, such as SQL assistant or SQL prompt
Cracked version on the Internet

Which of the SQL Server 2005 Standard Edition and Development edition occupy more computer resources?

Yes. We recommend that you install one-click restoration. You can use the development edition with many features. Installing the database software will generate system logs and occupy system space. If you do not install one-click restoration, even if you uninstall the software, you cannot clear the system.

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.