Checking SQL Best Practices

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
Import-Module DBATools
$SqlInstance = $env:COMPUTERNAME

Test-DbaDatabaseCollation -SqlInstance $SqlInstance -Detailed | Select Database,ServerCollation,DatabaseCollation | Out-GridView
Test-DbaDatabaseCompatibility -SqlInstance $SqlInstance -Detailed | Select Database,DatabaseCompatibility | Out-GridView
Test-DbaDatabaseOwner -SqlInstance $SqlInstance -Detailed | Select Database,DBState,CurrentOwner | Out-GridView
Test-DbaFullRecoveryModel -SqlInstance $SqlInstance -Detailed | Select Database,ConfiguredRecoveryModel,ActualRecoveryModel | Out-GridView
Test-DbaTempDbConfiguration -SqlInstance $SqlInstance -Detailed | Out-GridView
Test-SqlDiskAllocation -SqlInstance $SqlInstance -Detailed | Out-GridView
Test-SqlNetworkLatency -SqlInstance $SqlInstance | Out-GridView
Test-DbaDiskAlignment -SqlInstance $SqlInstance | Out-GridView
#Test-DbaBackupInformation -SqlInstance $SqlInstance | Out-GridView
Test-DbaDiskSpeed -SqlInstance $SqlInstance | Out-GridView
Test-DbaMaxDop -SqlInstance $SqlInstance | Out-GridView
Test-DbaMaxMemory -SqlInstance $SqlInstance | Out-GridView
Test-DbaPowerPlan -SqlInstance $SqlInstance | Out-GridView
Test-DbaRepLatency -SqlInstance $SqlInstance | Out-GridView
Test-DbaSpn -ComputerName $env:COMPUTERNAME | Select ComputerName,InstanceName,InstanceServiceAccount,Error,RequiredSPN | Out-GridView