Discovery failed for windows server in MSSql DB On Windows pattern

Justin Diraviam
Tera Contributor

I tried to discover windows server and it has MSSQL also. Windows CI information discovered, but when running MSSql DB On Windows pattern it's failed. I have checked in the Horizontal Discovery Log, it was failed Identification on MS SQL server.  Below is the log. Kindly help

Process Detection I got below error

 Error during execution of Windows command: executeQuery -Namespace root/cimv2 -Query "Select * From Win32_Process WHERE (ProcessId = 3428) ". com.snc.automation_common.integration.exceptions.UnauthorizedAccessException: Test-Path : Access is denied
At E:\agent\scripts\PowerShell\SecureTempFolder.psm1:64 char:9

In Identification of for MS SQL Server got below error

verify we have sqlservr process
2023-08-16 11:27:50: setAttribute(mssql_commamd,[ProcessDTO [executable='sqlservr.exe', commandLine='', executablePath='', executableDir='', currentDir='null', pid='3428', parentProcessId='788', userName='', domain='', image type='null']])
2023-08-16 11:27:50: Execution time: 0 ms
Parse instance name
2023-08-16 11:27:50: Step condition is false. step not executed. False Condition(s): [(${process.commandLine} : value=) IS NOT EMPTY ]
2023-08-16 11:27:50: Execution time: 0 ms
set instance name from EP if exist
2023-08-16 11:27:50: Step condition is false. step not executed. False Condition(s): [(${entry_point.instance} : value=) IS NOT EMPTY ]
2023-08-16 11:27:50: Execution time: 0 ms
get instance_name from WMI if empty
2023-08-16 11:27:50: null
java.lang.NullPointerException
at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.handleNameSpaceCollection(RunWmiQueryToVariableClosure.java:132)
at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.function(RunWmiQueryToVariableClosure.java:69)
at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.function(RunWmiQueryToVariableClosure.java:16)

4 REPLIES 4

Niklas Peterson
Mega Sage
Mega Sage

No it is not working.  I have checked in the process Detection. I get below error, Is there any permission need give for Mid server user?

 Error during execution of Windows command: executeQuery -Namespace root/cimv2 -Query "Select * From Win32_Process WHERE (ProcessId = 3428) ". com.snc.automation_common.integration.exceptions.UnauthorizedAccessException: Test-Path : Access is denied
At E:\agent\scripts\PowerShell\SecureTempFolder.psm1:64 char:9

Try doing a wbem or wmic test and run the wmi query in it. Check whether it is returning the output, if not then make sure that you have correct privilege added for the credentials you are using.

Anonymus
Tera Contributor

Hi, Is this issue resolved? I am facing the same error.