you just need to add the following parameters and execute, and it will create a "CREATE Table" statement: at the top, add this: DECLARE @Schema VARCHAR(MAX); EXEC sp_whoisactive... with whatever format you like for this procedure, but at the end add the following variables: @return_schema = 1, @SCHEMA = @schema OUTPUT PRINT @Schema
Then when you execute it to log to your table, add this parameter: @destination_table = '.dbo.<whatever you want to name the table'