Closed hfleitas closed 6 years ago
Hmm, I havent seen this before. Could you run with -Verbose and attach the output.
You may need to run
$tests = Invoke-DbcCheck -AllChecks -ExcludeCheck TestLastBackupVerifyOnly,LinkedServerConnection -show Summary -PassThru -Verbose
$tests | clip
to get it into the clipboard to paste
k trying it now. Will share output shortly.
@SQLDBAWithABeard this was from yesturday's run. I turned on sql agent on my workstation and trying again now. Takes about 3hrs to finish and I'll post the new output.
TagFilter : {}
ExcludeTagFilter : {TestLastBackupVerifyOnly, LinkedServerConnection}
TestNameFilter :
TotalCount : 22784
PassedCount : 21452
FailedCount : 1293
SkippedCount : 39
PendingCount : 0
InconclusiveCount : 0
Time : 03:09:54.5112513
TestResult : {@{ErrorRecord=Expected strings to be the same, because The agent service is required to run SQL Agent jobs, but they were different.
String lengths are both 7.
Strings differ at index 0.
Expected: 'Running'
But was: 'Stopped'
-----------^; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=False; Show=Summary; FailureMessage=Expected strings to be the same, because The agent service is required to run SQL Agent jobs, but they were different.
String lengths are both 7.
Strings differ at index 0.
Expected: 'Running'
But was: 'Stopped'
-----------^; Time=00:00:02.9892947; Name=SQL Agent Should Be running on HIRAMWKS; Result=Failed; Context=Testing SQL Agent is running on HIRAMWKS; StackTrace=at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\dbachecks\1.1.127\checks\Agent.Tests.ps1: line 10
10: $psitem.State | Should -Be "Running" -Because 'The agent service is required to run SQL Agent jobs'}, @{ErrorRecord=Expected strings to be the same, because Otherwise the Agent Jobs wont run if the server is restarted, but they were different.
Expected length: 9
Actual length: 6
Strings differ at index 0.
Expected: 'Automatic'
But was: 'Manual'
-----------^; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=False; Show=Summary; FailureMessage=Expected strings to be the same, because Otherwise the Agent Jobs wont run if the server is restarted, but they were different.
Expected length: 9
Actual length: 6
Strings differ at index 0.
Expected: 'Automatic'
But was: 'Manual'
-----------^; Time=00:00:00.0554735; Name=SQL Agent service should have a start mode of Automatic on HIRAMWKS; Result=Failed; Context=Testing SQL Agent is running on HIRAMWKS; StackTrace=at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\dbachecks\1.1.127\checks\Agent.Tests.ps1: line 13
13: $psitem.StartMode | Should -Be "Automatic" -Because 'Otherwise the Agent Jobs wont run if the server is restarted'}, @{ErrorRecord=; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=True; Show=Summary; FailureMessage=; Time=00:00:02.0861657; Name=SQL Agent Should Be running on FLDSVRSDV01; Result=Passed; Context=Testing SQL Agent is running on
DEVSQLSVR01; StackTrace=}, @{ErrorRecord=; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=True; Show=Summary; FailureMessage=; Time=00:00:00.0064521; Name=SQL Agent service should have a start mode of Automatic on DEVSQLSVR01; Result=Passed; Context=Testing SQL Agent is running on DEVSQLSVR01; StackTrace=}...}
@SQLDBAWithABeard Here's the one ran now. Lmk if you need anything else. Thx!
TagFilter : {}
ExcludeTagFilter : {TestLastBackupVerifyOnly, LinkedServerConnection}
TestNameFilter :
TotalCount : 22785
PassedCount : 21452
FailedCount : 1295
SkippedCount : 38
PendingCount : 0
InconclusiveCount : 0
Time : 01:05:18.7467663
TestResult : {@{ErrorRecord=; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=True; Show=Summary; FailureMessage=; Time=00:00:01.3739215; Name=SQL Agent Should Be running on HIRAMWKS; Result=Passed; Context=Testing SQL Agent is running on HIRAMWKS; StackTrace=}, @{ErrorRecord=Expected strings to be the same, because Otherwise the Agent Jobs wont run if the server is restarted, but
they were different.
Expected length: 9
Actual length: 6
Strings differ at index 0.
Expected: 'Automatic'
But was: 'Manual'
-----------^; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=False; Show=Summary; FailureMessage=Expected strings to be the same, because Otherwise the Agent Jobs wont run if the server is restarted, but they were different.
Expected length: 9
Actual length: 6
Strings differ at index 0.
Expected: 'Automatic'
But was: 'Manual'
-----------^; Time=00:00:00.0084901; Name=SQL Agent service should have a start mode of Automatic on HIRAMWKS; Result=Failed; Context=Testing SQL Agent is running on HIRAMWKS; StackTrace=at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\dbachecks\1.1.127\checks\Agent.Tests.ps1: line 13
13: $psitem.StartMode | Should -Be "Automatic" -Because 'Otherwise the Agent Jobs wont run if the server is restarted'}, @{ErrorRecord=; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=True; Show=Summary; FailureMessage=; Time=00:00:01.4749571; Name=SQL Agent Should Be running on DEVSQLSVR01; Result=Passed; Context=Testing SQL Agent is running on
DEVSQLSVR01; StackTrace=}, @{ErrorRecord=; ParameterizedSuiteName=; Describe=SQL Agent Account; Parameters=System.Collections.Specialized.OrderedDictionary; Passed=True; Show=Summary; FailureMessage=; Time=00:00:00.0046799; Name=SQL Agent service should have a start mode of Automatic on DEVSQLSVR01; Result=Passed; Context=Testing SQL Agent is running on DEVSQLSVR01; StackTrace=}...}
So there was no error for the test drive this time?
Correct
Issue
This is a bug or unexpected behaviour.
Bug Report
General Troubleshooting steps
Do versions match?
Yes: 1.1.127
[ ] Verified errors are not related to permissions? Not sure.
[ ] Can duplicate in new/clean PowerShell session (clean =
powershell -NoProfile
)? NoVersion Information
Steps to Reproduce
Tests completed in 12775.49s Tests Passed: 20765, Failed: 1225, Skipped: 60, Pending: 0, Inconclusive: 0 [15:29:45][Update-DbcPowerBiDataSource] Wrote results to C:\WINDOWS\temp\dbachecks\dbachecks_1_SQL.json