Skip to content

Commit d7967f9

Browse files
committed
release notes and version 0.4.0
1 parent 9ee77a3 commit d7967f9

6 files changed

Lines changed: 93 additions & 9 deletions

File tree

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,50 @@ The current release is available to [download as a .vsix file](https://github.co
99
## Features
1010

1111
### Import
12-
Import a script from the First Responder Kit to a new editor by opening the command palette (`ctrl/command+shift+p`) and selecting an option under `First Responder Kit: Import <some script>`
12+
Import a script from the First Responder Kit to a new editor by opening the command palette (`ctrl/command+shift+p`) and selecting an option under `First Responder Kit: Import <some script>`. To import all scripts at once, select `First Responder Kit: Import sp_Blitz and all its friends`.
1313

1414

1515
![Import a Script](https://raw.githubusercontent.com/dzsquared/sqlops-firstresponderkit/master/images/frk_import.gif)
1616

1717
### Run
18-
Already have the current scripts loaded to the database? Great! Take the shortcut to execution by opening the command palette (`ctrl/command+shift+p`) and selecting an option under `First Responder Kit: Run <some script>`
18+
Already have the current scripts loaded to the database? Great! Take the shortcut to execution by opening the command palette (`ctrl/command+shift+p`) and selecting an option under `First Responder Kit: Run <some script>`. Several scripts are available in Object Explorer at Server, Database, and Table nodes.
1919

2020
![Execute](https://raw.githubusercontent.com/dzsquared/sqlops-firstresponderkit/master/images/frk_run.gif)
2121

22-
## Requirements
22+
### Check Your Current Version
23+
Want to check the sp_Blitz version on a server? You can check your current connection or a server in object explorer and find out if you have the current version.
24+
25+
26+
![Check Version](https://raw.githubusercontent.com/dzsquared/sqlops-firstresponderkit/master/images/checkFRKversion.gif)
27+
![Version Results](https://raw.githubusercontent.com/dzsquared/sqlops-firstresponderkit/master/images/newVersionAvailable.gif)
28+
29+
30+
-----------------------------------------------------------------------------------------------------------
31+
32+
## Extension Requirements
2333

2434
Internet connectivity is required for any of the "Import" commands, which connect to GitHub to fetch recent versions of the scripts. A GitHub account is NOT required.
2535

36+
First Responder Kit scripts require SQL Server 2008 or newer. See current requirements for the scripts at http://firstresponderkit.org/.
2637

2738
-----------------------------------------------------------------------------------------------------------
2839

2940
## Known Issues
3041

31-
None yet.
42+
No open issues at this time.
3243

3344
## Unknown Issues
3445
Can be raised here: https://github.com/dzsquared/sqlops-firstresponderkit/issues
3546

3647
## Release Notes
3748

49+
### 0.4.0
50+
51+
- Adds sp_blitzlock and sp_whoisactive
52+
- Adds version check for sp_blitz
53+
- Adds single command to get sp_blitz and all associated scripts
54+
- Adds menu items for object explorer for sp_blitz, sp_blitzindex, sp_blitzfirst, sp_blitzlock, and sp_whoisactive
55+
3856
### 0.3.0
3957

4058
- Adds code snippets for execute scripts
@@ -51,3 +69,9 @@ Can be raised here: https://github.com/dzsquared/sqlops-firstresponderkit/issues
5169
### 0.1.0
5270

5371
- Initial release.
72+
73+
74+
-----------------------------------------------------------------------------------------------------------
75+
76+
## Special Thanks
77+
A very important thank you to [Brent Ozar Unlimited](https://www.brentozar.com/) for supporting this extension.

images/checkFRKversion.gif

40.4 KB
Loading

images/newVersionAvailable.gif

47.5 KB
Loading

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@
9797
"when": "connectionProvider == MSSQL && nodeType && nodeType == Server",
9898
"group": "FRK"
9999
},
100+
{
101+
"command": "extension.run_sp_blitz",
102+
"when": "connectionProvider == MSSQL && nodeType && nodeType == Server",
103+
"group": "FRK"
104+
},
105+
{
106+
"command": "extension.run_sp_blitzfirst",
107+
"when": "connectionProvider == MSSQL && nodeType && nodeType == Server",
108+
"group": "FRK"
109+
},
100110
{
101111
"command": "extension.run_sp_blitzlock",
102112
"when": "connectionProvider == MSSQL && nodeType && nodeType == Database",

snippets/snippets.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,42 @@
4949
],
5050
"description": "sp_blitzfirst execution script"
5151
},
52+
"FRK spBlitzLock": {
53+
"prefix": "sqlFRKspBlitzLock",
54+
"body": [
55+
"EXEC [dbo].[sp_BlitzLock]",
56+
"--@DatabaseName = '',",
57+
"@Top = 10",
58+
"-- for more info: https://www.brentozar.com/archive/2017/12/introducing-sp_blitzlock-troubleshooting-sql-server-deadlocks/"
59+
]
60+
},
5261
"FRK sp_whoisactive": {
5362
"prefix": "sqlFRKspWhoIsActive",
5463
"body": [
5564
"EXEC sp_WhoIsActive ",
5665
"@find_block_leaders = 1,",
5766
"@sort_order = '[blocked_session_count] DESC'",
67+
"-- @filter = '',",
68+
"-- @filter_type = 'session', ",
69+
"-- @not_filter = '', ",
70+
"-- @not_filter_type = 'session',",
71+
"-- @show_own_spid = 0, ",
72+
"-- @show_system_spids = 0, ",
73+
"-- @show_sleeping_spids = 1, ",
74+
"-- @get_full_inner_text = 0,",
75+
"-- @get_plans = 0, ",
76+
"-- @get_outer_command = 0, ",
77+
"-- @get_transaction_info = 0, ",
78+
"-- @get_task_info = 1, ",
79+
"-- @get_locks = 0, ",
80+
"-- @get_avg_time = 0, ",
81+
"-- @get_additional_info = 0, ",
82+
"-- @delta_interval = 0, ",
83+
"-- @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][%]', ",
84+
"-- @format_output = 1, ",
85+
"-- @destination_table = '', ",
86+
"-- @return_schema = 0, ",
87+
"-- @help = 0",
5888
"-- for more info: http://whoisactive.com/docs/"
5989
]
6090
}

src/extension.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function activate(context: vscode.ExtensionContext) {
104104
context.subscriptions.push(disposable_spblitzwho);
105105

106106
//creating the quickrun script
107-
var runspblitz = async () => {
107+
var runspblitz = async (context?: sqlops.ObjectExplorerContext) => {
108108
console.log('Preparing sample run script.');
109109
let fileName = "exec_sp_blitz.sql";
110110
const scriptText = `EXEC [dbo].[sp_Blitz]
@@ -120,7 +120,7 @@ export function activate(context: vscode.ExtensionContext) {
120120
-- for more info: https://www.brentozar.com/blitz/
121121
`;
122122
var setting: vscode.Uri = vscode.Uri.parse("untitled:" + fileName);
123-
new placeScript().placescript(fileName,scriptText);
123+
new placeScript().placescript(fileName,scriptText,context);
124124
};
125125
var disposable_runspblitz = vscode.commands.registerCommand('extension.run_sp_blitz', runspblitz);
126126
context.subscriptions.push(disposable_runspblitz);
@@ -209,7 +209,7 @@ export function activate(context: vscode.ExtensionContext) {
209209
context.subscriptions.push(disposable_runspblitzcache);
210210

211211
//creating the quickrun script for blitzfirst
212-
var runspblitzfirst = async () => {
212+
var runspblitzfirst = async (context?: sqlops.ObjectExplorerContext) => {
213213
let fileName = "exec_sp_blitzfirst.sql";
214214
console.log('Preparing sample run script.');
215215
const scriptText = `EXEC [dbo].[sp_BlitzFirst]
@@ -219,7 +219,7 @@ export function activate(context: vscode.ExtensionContext) {
219219
220220
-- for more info: https://www.brentozar.com/askbrent/
221221
`;
222-
new placeScript().placescript(fileName,scriptText);
222+
new placeScript().placescript(fileName,scriptText,context);
223223
};
224224
var disposable_runspblitzfirst = vscode.commands.registerCommand('extension.run_sp_blitzfirst',runspblitzfirst);
225225
context.subscriptions.push(disposable_runspblitzfirst);
@@ -237,7 +237,6 @@ export function activate(context: vscode.ExtensionContext) {
237237
case "Database": {
238238
scriptText = `EXEC [dbo].[sp_BlitzLock]
239239
@DatabaseName = '${dbName}',
240-
--@TableName = '',
241240
@Top = 10`;
242241
break;
243242
}
@@ -267,6 +266,27 @@ export function activate(context: vscode.ExtensionContext) {
267266
const scriptText = `EXEC sp_WhoIsActive
268267
@find_block_leaders = 1,
269268
@sort_order = '[blocked_session_count] DESC'
269+
-- @filter = '',
270+
-- @filter_type = 'session',
271+
-- @not_filter = '',
272+
-- @not_filter_type = 'session',
273+
-- @show_own_spid = 0,
274+
-- @show_system_spids = 0,
275+
-- @show_sleeping_spids = 1,
276+
-- @get_full_inner_text = 0,
277+
-- @get_plans = 0,
278+
-- @get_outer_command = 0,
279+
-- @get_transaction_info = 0,
280+
-- @get_task_info = 1,
281+
-- @get_locks = 0,
282+
-- @get_avg_time = 0,
283+
-- @get_additional_info = 0,
284+
-- @delta_interval = 0,
285+
-- @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][%]',
286+
-- @format_output = 1,
287+
-- @destination_table = '',
288+
-- @return_schema = 0,
289+
-- @help = 0
270290
271291
-- for more info: http://whoisactive.com/docs/
272292
`;

0 commit comments

Comments
 (0)