patternsqlMinor
sp_BlitzWho saving to a table
Viewed 0 times
tablesavingsp_blitzwho
Problem
How to save result of
sp_BlitzWho to a table? An option to save to table is not there compared to other procs like sp_Blitz.Solution
You can declare table variable with fields fully equal to SP output and save results to it. E.g.:
After that, you can do everything you want with data in table variable.
DECLARE @who_results TABLE
([run_date] DATETIME,
...
)
INSERT INTO @who_results EXEC sp_blitzwhoAfter that, you can do everything you want with data in table variable.
Code Snippets
DECLARE @who_results TABLE
([run_date] DATETIME,
...
)
INSERT INTO @who_results EXEC sp_blitzwhoContext
StackExchange Database Administrators Q#166686, answer score: 7
Revisions (0)
No revisions yet.