Skip to content

Commit 7f74c8d

Browse files
authored
Merge pull request #2795 from BrentOzarULTD/202102_installer_scripts
2021-02 release installer scripts
2 parents 2a3c62f + 568ab09 commit 7f74c8d

4 files changed

Lines changed: 42854 additions & 42688 deletions

File tree

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
11
#Set your file path
22
$FilePath = "C:\temp\SQL-Server-First-Responder-Kit"
33
$SqlVersionsPath = "$FilePath\SqlServerVersions.sql"
4+
$BlitzFirstPath = "$FilePath\sp_BlitzFirst.sql"
45

56
#All Core Blitz Without sp_BlitzQueryStore
67
Get-ChildItem -Path "$FilePath" -Filter "sp_Blitz*.sql" |
7-
Where-Object { $_.FullName -notlike "*sp_BlitzQueryStore.sql*" -and $_.FullName -notlike "*sp_BlitzInMemoryOLTP*"} |
8+
Where-Object { $_.FullName -notlike "*sp_BlitzQueryStore.sql*" -and $_.FullName -notlike "*sp_BlitzInMemoryOLTP*" -and $_.FullName -notlike "*sp_BlitzFirst*" -and $_.FullName -notlike "*sp_BlitzAnalysis*"} |
89
ForEach-Object { Get-Content $_.FullName } |
910
Set-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Force
1011
#append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429)
1112
if ( test-path "$SqlVersionsPath")
1213
{ Add-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")}
14+
if ( test-path "$BlitzFirstPath")
15+
{ Add-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$BlitzFirstPath")}
1316

1417

1518
#All Core Blitz With sp_BlitzQueryStore
1619
Get-ChildItem -Path "$FilePath" -Filter "sp_Blitz*.sql" |
17-
Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*"} |
20+
Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*" -and $_.FullName -notlike "*sp_BlitzFirst*" -and $_.FullName -notlike "*sp_BlitzAnalysis*"} |
1821
ForEach-Object { Get-Content $_.FullName } |
1922
Set-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Force
2023
#append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429)
2124
if ( test-path "$SqlVersionsPath")
2225
{ Add-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")}
26+
if ( test-path "$BlitzFirstPath")
27+
{ Add-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$BlitzFirstPath")}
2328

2429

2530
#All Scripts
2631
Get-ChildItem -Path "$FilePath" -Filter "sp_*.sql" |
27-
Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*"} |
32+
Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*" -and $_.FullName -notlike "*sp_BlitzFirst*" -and $_.FullName -notlike "*sp_BlitzAnalysis*"} |
2833
ForEach-Object { Get-Content $_.FullName } |
2934
Set-Content -Path "$FilePath\Install-All-Scripts.sql" -Force
3035
#append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429)
3136
if ( test-path "$SqlVersionsPath")
3237
{ Add-Content -Path "$FilePath\Install-All-Scripts.sql" -Value (Get-Content -Path "$SqlVersionsPath")}
38+
if ( test-path "$BlitzFirstPath")
39+
{ Add-Content -Path "$FilePath\Install-All-Scripts.sql" -Value (Get-Content -Path "$BlitzFirstPath")}

0 commit comments

Comments
 (0)