Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Not able to discovered the MSSQL Dataase through discovery

Aman Trivedi1
Tera Contributor

Hi All

I am currently testing MSSQL Database Discovery on a Windows Server and are encountering an issue during the Windows OS - Servers pattern execution, specifically within the Collect MSSQL Info extension

Error observed

When the pattern attempts to execute commands such as:

 
wmic /NAMESPACE:\\root\Microsoft\SqlServer\ComputerManagement15 PATH SqlServiceAdvancedProperty GET PropertyName,PropertyNumValue,PropertyStrValue,ServiceName,SqlServiceType /VALUE

receive the following error:

Test-Path : Access is denied

At:
...\agent\scripts\PowerShell\SecureTempFolder.psm1:64 char:9

if (Test-Path -Path $folder -PathType Container)

CategoryInfo          : NotSpecified: (:) [Test-Path], UnauthorizedAccessException
FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.TestPathCommand

Current Validation

The following has been confirmed:

  • Windows Server Discovery is successful.
  • sqlservr.exe is detected on the target server.
  • The root\Microsoft\SqlServer WMI namespace is accessible.
  • ComputerManagement15 is successfully identified.
  • Failure occurs when the pattern attempts further command execution during Collect MSSQL Components Info using Utility.
  • The error consistently references SecureTempFolder.psm1 and Test-Path : Access is denied.
  • Because this MSSQL collection step fails, the complete MSSQL Database Discovery flow is not proceeding successfully.

    Any idea about this?
  • Does this error indicate that the Discovery credential requires additional access to a remote temporary folder or Windows administrative share on the target server?
  • What minimum permissions are required for the Discovery credential to allow the MSSQL pattern commands to execute successfully without granting full administrator access
0 REPLIES 0