When running Get-CMHealthCheck I am receiving an "ERROR/EXCEPTION: general unhandled exception" in the logs immediately after "getting sql server info" completes
Invoke-CMHealthCheck failed to complete, so I started troubleshooting by running Get-CMHealthCheck only. This failed as well; confirming my issue was on the front end.
After verifying with DBA team my access is full admin for the server and instance and owner for the CM Databases, i went through the Get-CMHealthCheck code and determined line 170 parsing by instance and removing the instance from the database name, but Invoke-DbaQuery (line 181) fails to query because parameter -SqlInstance doesnt work without the DB instance declared with the DB server
Fails to Complete:
Invoke-DbaQuery -SqlInstance "SERVER" -Database "DATABASE" -Query "select * from dbo.v_r_system" -EnableException -ErrorAction SilentlyContinue
If this portion of the Get-CMHealthCheck fails to complete, the script will exit after line 181.
I'm still stepping through the code where it connects to the SQL Server
If there is more code involving the DB instance, I will simply declare the DB instance as a variable at line 170 during parsing for later use in the code.
I appreciate you providing this module and all it entails. I hope this helps others and is worth you checking into.
When running Get-CMHealthCheck I am receiving an "ERROR/EXCEPTION: general unhandled exception" in the logs immediately after "getting sql server info" completes
Invoke-CMHealthCheck failed to complete, so I started troubleshooting by running Get-CMHealthCheck only. This failed as well; confirming my issue was on the front end.
After verifying with DBA team my access is full admin for the server and instance and owner for the CM Databases, i went through the Get-CMHealthCheck code and determined line 170 parsing by instance and removing the instance from the database name, but Invoke-DbaQuery (line 181) fails to query because parameter -SqlInstance doesnt work without the DB instance declared with the DB server
Fails to Complete: Invoke-DbaQuery -SqlInstance "SERVER" -Database "DATABASE" -Query "select * from dbo.v_r_system" -EnableException -ErrorAction SilentlyContinue
Completes Successfully: Invoke-DbaQuery -SqlInstance "SERVER/INSTANCE" -Database "DATABASE" -Query "select * from dbo.v_r_system" -EnableException -ErrorAction SilentlyContinue
If this portion of the Get-CMHealthCheck fails to complete, the script will exit after line 181.
I'm still stepping through the code where it connects to the SQL Server If there is more code involving the DB instance, I will simply declare the DB instance as a variable at line 170 during parsing for later use in the code.
I appreciate you providing this module and all it entails. I hope this helps others and is worth you checking into.