MSSQL databases not getting discovered

Karthik37
Tera Contributor

Hi Folks,

We are trying to discover our MSSQL databases and while doing the discovery we are able to discover the instances, DBs for few servers and for few servers we are able to discover only the instances and not DBs. While checking the pattern we get the below error. Any suggestions on this error?

WMI query on host xx.xx.xx.xx failed. query: SELECT Name FROM Win32_PerfFormattedData_MSSQLSERVER_SQLServerDatabases error: Invalid class

WMI query on host xx.xx.xx.xx failed. query: SELECT Name FROM Win32_PerfFormattedData_MSSQLMSSQLSERVER_MSSQLMSSQLSERVERDatabases error: Invalid class

 

Little more detail:

This is getting executed in pattern "MSSql DB On Windows" and step "Get list of db from wmi" under identification for MS SQL server.

 

10 REPLIES 10

Is this link still valid?

I'm getting error message "You do not have sufficient privileges to access this knowledge item" but I suspect it's not a permission issue.

 

So the issue persists for me. 

 

 

Gaurav Shirsat
Mega Sage

Hi Karthik

Please refer the below document

https://docs.servicenow.com/bundle/orlando-it-operations-management/page/product/discovery/concept/c...

Please Mark Correct and Helpful

Thanks and Regards

Gaurav Shirsat

Hi Gaurav,

 

This link is for MySQL and i have already gone through the documentation but couldn't get anything related to this error.

Gokul Explorer
Tera Contributor

Hi @Karthik37 

 

I'm also facing the same issue now, Have you find any solution ?

 

Thanks in advance !

Gokul

hz2
Tera Expert
This is likely a WMI permission issue. Take a close look at the logs on Discovery Status or maybe the midserver. This is the error I got when facing the same issue.

 

Error during execution of Windows command: executeQuery -Namespace Root\Microsoft\SqlServer 
-Query "SELECT Name FROM __NAMESPACE" due to com.snc.automation_common.integration.exceptions.InvalidCommandException: executeQuery : Could not get query SELECT Name FROM __NAMESPACE on namespace=Root\Microsoft\SqlServer through the remote session. Original Exception: Invalid namespace "Root\Microsoft\SqlServer"

 

The solution was to role out Windows Security Policies to SQL Servers