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