MCPcopy Create free account
hub / github.com/dzsquared/sqlops-firstresponderkit / runspwhoisactive

Function runspwhoisactive

src/runScripts.ts:143–174  ·  view source on GitHub ↗
(context?: sqlops.ObjectExplorerContext)

Source from the content-addressed store, hash-verified

141
142//creating the quickrun script for whoisactive
143let runspwhoisactive = async (context?: sqlops.ObjectExplorerContext) => {
144 let fileName = "exec_sp_whoisactive.sql";
145 console.log('Preparing sample run script.');
146 const scriptText = `EXEC sp_WhoIsActive
147 @find_block_leaders = 1,
148 @sort_order = '[blocked_session_count] DESC'
149 -- @filter = '',
150 -- @filter_type = 'session',
151 -- @not_filter = '',
152 -- @not_filter_type = 'session',
153 -- @show_own_spid = 0,
154 -- @show_system_spids = 0,
155 -- @show_sleeping_spids = 1,
156 -- @get_full_inner_text = 0,
157 -- @get_plans = 0,
158 -- @get_outer_command = 0,
159 -- @get_transaction_info = 0,
160 -- @get_task_info = 1,
161 -- @get_locks = 0,
162 -- @get_avg_time = 0,
163 -- @get_additional_info = 0,
164 -- @delta_interval = 0,
165 -- @output_column_list = '[dd%][session_id][sql_text][sql_command][login_name][wait_info][tasks][tran_log%][cpu%][temp%][block%][reads%][writes%][context%][physical%][query_plan][locks][%]',
166 -- @format_output = 1,
167 -- @destination_table = '',
168 -- @return_schema = 0,
169 -- @help = 0
170
171 -- for more info: http://whoisactive.com/docs/
172 `;
173 new placeScript().placescript(fileName,scriptText,context);
174};
175export let disposable_runspwhoisactive = vscode.commands.registerCommand('extension.run_sp_whoisactive',runspwhoisactive);

Callers

nothing calls this directly

Calls 1

placescriptMethod · 0.80

Tested by

no test coverage detected