SQL Server stored procedures and commands
          The items in this section can be used to return information related to performance. 
         
         
          Note: This topic applies only to on-premises environments.
         
         sp_whoandsp_who2: The stored proceduresp_whoshows what SPID is blocked.sp_who2shows who is blocking.sp_helpindex (table_name): Gives index information for a table.DBCC OPENTRAN: Determines whether an open transaction exists within the log.DBCC INPUTBUFFER (SPID): Displays the last statement sent from a client to SQL Server.DBCC Trace On: Enables specified trace flags.