@@ -4,7 +4,7 @@ function Install-DbaDarlingData {
4
4
Installs or updates Erik Darling's stored procedures.
5
5
6
6
. DESCRIPTION
7
- Downloads, extracts and installs Erik Darling's stored procedures
7
+ Downloads, extracts and installs Erik Darling's stored procedures. It does not install anything else from the repository. For example, the WhatsUpMemory view is not installed.
8
8
9
9
DarlingData links:
10
10
https://www.erikdarling.com
@@ -32,10 +32,16 @@ function Install-DbaDarlingData {
32
32
. PARAMETER Procedure
33
33
Specifies the name(s) of the procedures to install
34
34
Allowed Values or Combination of Values:
35
- All (default, to install all 3 procedures)
36
- Human (to install sp_HumanEvents)
37
- Pressure (to install sp_PressureDetector)
38
- Quickie (to install sp_QuickieStore)
35
+ All (default, to install all procedures)
36
+ HumanEvents (to install sp_HumanEvents)
37
+ PressureDetector (to install sp_PressureDetector)
38
+ QuickieStore (to install sp_QuickieStore)
39
+ HumanEventsBlockViewer (to install sp_HumanEventsBlockViewer)
40
+ LogHunter (to install sp_LogHunter)
41
+ HealthParser (to install sp_HealthParser)
42
+ IndexCleanup (to install sp_IndexCleanup)
43
+ PerfCheck (to install sp_PerfCheck)
44
+ The following shorthands are allowed, ordered as above: Human, Pressure, Quickie, Block, Log, Health, Index, Perf.
39
45
40
46
. PARAMETER LocalFile
41
47
Specifies the path to a local file to install from. This *should* be the zip file as distributed by the maintainers.
@@ -74,7 +80,7 @@ function Install-DbaDarlingData {
74
80
. EXAMPLE
75
81
PS C:\> Install-DbaDarlingData -SqlInstance server1\instance1 -Database DBA
76
82
77
- Logs into server1\instance1 with Windows authentication and then installs tall of Erik's scripts in the DBA database.
83
+ Logs into server1\instance1 with Windows authentication and then installs all of Erik's scripts in the DBA database.
78
84
79
85
. EXAMPLE
80
86
PS C:\> Install-DbaDarlingData -SqlInstance server1\instance1 -Database master -SqlCredential $cred
@@ -104,7 +110,7 @@ function Install-DbaDarlingData {
104
110
[object ]$Database = " master" ,
105
111
[ValidateSet (' main' , ' dev' )]
106
112
[string ]$Branch = " main" ,
107
- [ValidateSet (' All' , ' Human' , ' Pressure ' , ' Quickie ' , ' HumanEvents ' , ' PressureDetector ' , ' QuickieStore' , ' HumanEventsBlockViewer' , ' LogHunter' , ' HealthParser' )]
113
+ [ValidateSet (' All' , ' Human' , ' HumanEvents ' , ' Pressure ' , ' PressureDetector ' , ' Quickie ' , ' QuickieStore' , ' Block ' , ' HumanEventsBlockViewer' , ' Log ' , ' LogHunter' , ' Health ' , ' HealthParser' , ' Index ' , ' IndexCleanup ' , ' Perf ' , ' PerfCheck ' )]
108
114
[string []]$Procedure = " All" ,
109
115
[string ]$LocalFile ,
110
116
[switch ]$Force ,
@@ -164,15 +170,21 @@ function Install-DbaDarlingData {
164
170
if ($Procedure -contains " Quickie" -or $Procedure -contains " QuickieStore" ) {
165
171
$sqlScripts += Get-ChildItem $localCachedCopy - Filter " sp_QuickieStore.sql" - Recurse
166
172
}
167
- if ($Procedure -contains " HumanEventsBlockViewer" ) {
173
+ if ($Procedure -contains " Block " -or $Procedure -contains " HumanEventsBlockViewer" ) {
168
174
$sqlScripts += Get-ChildItem $localCachedCopy - Filter " sp_HumanEventsBlockViewer.sql" - Recurse
169
175
}
170
- if ($Procedure -contains " LogHunter" ) {
176
+ if ($Procedure -contains " Log " -or $Procedure -contains " LogHunter" ) {
171
177
$sqlScripts += Get-ChildItem $localCachedCopy - Filter " sp_LogHunter.sql" - Recurse
172
178
}
173
- if ($Procedure -contains " HealthParser" ) {
179
+ if ($Procedure -contains " Health " -or $Procedure -contains " HealthParser" ) {
174
180
$sqlScripts += Get-ChildItem $localCachedCopy - Filter " sp_HealthParser.sql" - Recurse
175
181
}
182
+ if ($Procedure -contains " Index" -or $Procedure -contains " IndexCleanup" ) {
183
+ $sqlScripts += Get-ChildItem $localCachedCopy - Filter " sp_IndexCleanup.sql" - Recurse
184
+ }
185
+ if ($Procedure -contains " Perf" -or $Procedure -contains " PerfCheck" ) {
186
+ $sqlScripts += Get-ChildItem $localCachedCopy - Filter " sp_PerfCheck.sql" - Recurse
187
+ }
176
188
}
177
189
178
190
foreach ($script in $sqlScripts ) {
@@ -219,4 +231,4 @@ function Install-DbaDarlingData {
219
231
Write-Message - Level Verbose - Message " Finished installing/updating the DarlingData stored procedures in $database on $instance ."
220
232
}
221
233
}
222
- }
234
+ }
0 commit comments