SQL Server performance drops sharply to see the status and wait type of all sessions---LATCH_EX

Source: Internet
Author: User

When a database file space is exhausted, do automatically grow, at the same time only one user person can do the file autogrow action, other tasks must wait, there will be latch resources waiting. When using sp_helpdb to view the business database, it was found that the database settings were unreasonable, each time the data file grew by 2M, the log file grew by 10% and the maximum limit was set. Modified to 200M each time, no limit size, system return to normal, problem solved.

The wait type for SQL Server blocking is as follows:

By the way. View SQL scripts for blocking, session state, and wait types:

--View SQL blocking information withTmp as (    Select *  fromMaster.. sysprocesses TwhereT.blocked!= 0    Union  All    SelectB.*  fromMaster.. sysprocesses bJoinTMP T onB.spid=t.blocked)Selectt.spid, t.blocked, T.status, T.waittype, T.lastwaittype , T.waitresource, T.waittime,db_name(t.dbid) DbName, T.login_time, T.loginame, T.program_name, DC.text from(Selectspid fromTmpGroup  byspid) sJoinMaster.. sysprocesses T onS.spid=T.spid Crossapply Master.sys.dm_exec_sql_text (t.sql_handle) DC--View the status of all sessions, wait types, and currently executing SQL scriptsSelectt.spid, t.blocked, T.status, T.waittype, T.lastwaittype , T.waitresource, T.waittime,db_name(t.dbid) DbName, T.login_time, T.loginame, T.program_name, DC.text fromMaster.. sysprocesses T Crossapply Master.sys.dm_exec_sql_text (t.sql_handle) DCwhereT.spid>  -

SQL Server performance drops sharply to see the status and wait type of all sessions---LATCH_EX

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.