From d758125ca080ac8ae8935b8d9a4ba6a449ecc7de Mon Sep 17 00:00:00 2001 From: Rob Sewell Date: Fri, 18 Aug 2023 14:36:24 +0100 Subject: [PATCH] so we have a demo [no ci] --- developing/Oslo Demo.ps1 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 developing/Oslo Demo.ps1 diff --git a/developing/Oslo Demo.ps1 b/developing/Oslo Demo.ps1 new file mode 100644 index 00000000..cd9c6f3c --- /dev/null +++ b/developing/Oslo Demo.ps1 @@ -0,0 +1,37 @@ +# Oslo Demo + +./build.ps1 -tasks build + +#region setup +$containers = $SQLInstances = $dbachecks1, $dbachecks2, $dbachecks3 = 'dbachecks1', 'dbachecks2', 'dbachecks3' +$password = ConvertTo-SecureString "dbatools.IO" -AsPlainText -Force +$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "sqladmin", $password +$show = 'All' +#endregion + +# lets run a couple of tests + +Invoke-DbcCheck -SqlInstance $Sqlinstances -SqlCredential $cred -Check InstanceConnection, DatabaseStatus -legacy $true -Show $show + +# that failed but shouldnt have - set config +Set-DbcConfig -Name policy.connection.authscheme -Value SQL + +# run again + +# what about skips? +Set-DbcConfig -Name skip.connection.remoting -Value $true + +# run again + +# ok now in v5 mode +Invoke-DbcCheck -SqlInstance $Sqlinstances -SqlCredential $cred -Check InstanceConnection, DatabaseStatus -legacy $false -Show $show + +# So much quicker !!! + +# show our perf test ???? + +$Checks = 'ErrorLogCount', 'XESessionExists', 'XESessionStopped', 'XpCmdShellDisabled', 'WhoIsActiveInstalled', 'CLREnabled', 'TwoDigitYearCutoff', 'MaxDopInstance', 'ErrorLogCount', 'ModelDbGrowth', 'DefaultBackupCompression', 'SaExist', 'SaDisabled', 'SaRenamed', 'DefaultFilePath', 'AdHocDistributedQueriesEnabled', 'AdHocWorkload', 'DefaultTrace', 'OleAutomationProceduresDisabled', 'CrossDBOwnershipChaining', 'ScanForStartupProceduresDisabled', 'RemoteAccessDisabled', 'SQLMailXPsDisabled', 'DAC', 'OLEAutomation', 'ServerNameMatch', 'OrphanedFile', 'MaxMemory', 'NetworkLatency', 'PublicPermission' + +Invoke-PerfAndValidateCheck -Checks $Checks + +# question turn off a container adn talk about hte fails? \ No newline at end of file