sp_WhoIsActive

--Tempdb contention and blocking
EXEC sp_WhoisActive
@sort_order= '[tempdb_current] DESC',
@get_plans= 1,
@Output_Column_List= '[start_time][session_id][sql_text][query_plan][wait_info][temp%]';
GO
EXEC sp_Whoisactive
@find_block_leaders=1,
@sort_order = '[blocked_session_count] DESC',
@get_plans= 1,
@Get_additional_info=1,
@Output_Column_list = '[start_Time][session_id][sql_text][query_plan][wait_info][block%][additional_info]';
go
EXEC sp_Whoisactive
@get_avg_time = 1,
@Get_outer_Command = 1,
@Get_plans = 1
/*
Valid filter types are: session, program, database, login, host
*/
EXEC sp_whoisactive
@filter_type = 'session',
@filter= 196,
@get_additional_info=1
GO
EXEC sp_whoisactive
@filter_type = 'database',
@filter= 'dbnamehere'
go

/*
@show_sleeping_spids=1 -->Sleeping with Opentran
@show_sleeping_spids=2 pulls all sleeping SPIDs
--@get_full_inner_text
--If 1, gets the full stored procedure or running batch, when available
--If 0, gets only the actual statement that is currently running in the batch or procedure
@sort_order VARCHAR(500) = '[start_time] ASC'
*/
EXEC sp_whoisactive
@filter_type = 'session',
@show_sleeping_spids=1,
@filter=179,
@get_plans=1,
@get_full_inner_text = 1

Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server