MSSQL Server discovery does not discover databasesIssue MSSQL Server discovery does not discover databases Symptoms The discovery log does not show specific errors.The “MSSql DB On Windows” pattern runs the WMI query but returns zero rows. Release All Applicable Releases Cause The pattern gets database names through WMI. If the query returns no rows, Discovery has nothing to create. Resolution This issue can be resolved by fixing the WMI query on the server. Try this: Run the query from an elevated PowerShell prompt on the host:Get-WmiObject -Namespace root\cimv2 -Query "SELECT name FROM Win32_PerfFormattedData_MSSQLSERVER_SQLServerDatabases" Returns databases: go to step 4.Returns nothing or errors: go to step 3. Repair WMI and performance counters: winmgmt /verifyrepository, and salvage or rebuild if it reports inconsistencylodctr /R (back up the registry first)Restart WMI and SQL Server services, then repeat step 2 Confirm the Discovery credential has WMI query rights in root\cimv2.Run Discovery on the server and check db_sql_database for new records.