1.建查询是否有阻塞的视图 create view [dbo].[VW_WaitingCount] as SELECT s.session_id, r.blocking_session_id, s.host_name, s.login_name, databasename = db_name(r.database_id), r.command, r.status AS sqlexecstatus, current_execute_sql , THEN len(t .text) , s.reads…