forked from devops-collective-inc/PSHSummit2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request devops-collective-inc#6 from nocentino/main
Added Anthony's stuff
- Loading branch information
Showing
7 changed files
with
517 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file added
BIN
+2.65 MB
...ack in One Line of Code/Building an Observability Stack in One Line of Code PSHSummit.pdf
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+5.7 MB
anthony-nocentino/favorite-dbatools-cmdlets/favorite-dbatools-cmdlets.pdf
Binary file not shown.
38 changes: 38 additions & 0 deletions
38
anthony-nocentino/favorite-dbatools-cmdlets/tests/PostInstallationChecks.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Param( | ||
[Parameter( | ||
Mandatory = $true, | ||
Position = 0, | ||
HelpMessage = 'Specify a servername', | ||
ValueFromPipeline = $true | ||
)] | ||
[pscredential] $SqlCredential, | ||
[ValidateNotNullOrEmpty()] | ||
[string[]] $SqlInstance | ||
) | ||
foreach ($pSqlInstance in $SqlInstance) { | ||
Describe "Test for Instance Level Settings" { | ||
Context "$pSqlInstance`: Memory Configuration" { | ||
$Memory = (Test-DbaMaxMemory -SqlInstance $pSqlInstance -SqlCredential $SqlCredential) | ||
$RecommendedValue = ($Memory.RecommendedValue) | ||
$MaxValue = ($Memory.MaxValue) | ||
It "Checking the Max Memory setting for the instance should be $RecommendedValue" { | ||
$MaxValue | Should -Be $RecommendedValue | ||
} | ||
} | ||
|
||
Context "$pSqlInstance`: MaxDOP Configuration" { | ||
$dop = (Test-DbaMaxDop -SqlInstance $pSqlInstance -SqlCredential $SqlCredential) | ||
$DopInstance = ($dop | Where-Object { $_.Database -eq 'n/a' }) | ||
$DopDatabase = ($dop | Where-Object { $_.Database -ne 'n/a' }) | ||
|
||
It "$pSqlInstance`: Checking if Instance MAXDOP exceeds the number of cores in a NUMA node" { | ||
$DopInstance.CurrentInstanceMaxDop | Should -BeLessOrEqual $($DopInstance.RecommendedMaxDop) -Because "we do not want to span a NUMA Node. Resource: Instance. Suggested value: $($DopInstance.RecommendedMaxDop)" | ||
} | ||
@($DopDatabase.Database).foreach{ | ||
It "$pSqlInstance`: Checking if database: $($DopDatabase.Database) MAXDOP exceeds the number of cores in a NUMA node" { | ||
$DopDatabase.DatabaseMaxDop | Should -BeLessOrEqual $($DopDatabase.RecommendedMaxDop) -Because "We do not want to span a NUMA Node. Resource: $($DopDatabase.Database). Suggested value: $($DopDatabase.RecommendedMaxDop)" | ||
} | ||
} | ||
} | ||
} | ||
} |