When Lansweeper scans a Windows computer, it automatically retrieves software information found in Add/Remove Programs (Programs & Features) on the client machine itself. As information listed in Add/Remove Programs for installations of Microsoft SQL Server is limited, Lansweeper retrieves additional SQL Server data from WMI. WMI, Windows Management Instrumentation, is a management infrastructure built into Windows operating systems. Scanned SQL Server data includes SQL edition, version, service pack, service names and statuses, authentication mode, language, installed databases, database sizes, cluster information (from Lansweeper 7.1 onward) and more.
If SQL Server data is not listed in the Software\SQL Server Information tab of your Windows computers, the WMI provider storing the SQL Server information may be missing and you may need to recompile it. Instructions on how to do this can be found further down this article.
To recompile the WMI provider storing SQL Server information, do the following:
- On the client machine whose SQL Server information isn't scanned, locate the folder that contains the .mof file of the SQL Server installation. This file contains the definitions of the WMI classes Lansweeper uses to retrieve SQL Server information. Its path follows the format below, but the exact directory depends on the installed SQL Server version. In the sample screenshot below, SQL Server 2016 is installed and hence the .mof file can be found in the 130 folder.Program Files (x86)\Microsoft SQL Server\<version>\SharedThis is a list of folder numbers and the SQL Server versions they belong to:
• 80: SQL Server 2000
• 90: SQL Server 2005
• 100: SQL Server 2008 and SQL Server 2008 R2
• 110: SQL Server 2012
• 120: SQL Server 2014
• 130: SQL Server 2016
• 140: SQL Server 2017
- Run Command Prompt as an administrator.
- Submit the command below and hit Enter, replacing <version> with the folder number containing your specific .mof file. The sample screenshot below uses the folder path for SQL Server 2016.mofcomp "%programfiles(x86)%\Microsoft SQL Server\<version>\Shared\sqlmgmproviderxpsp2up.mof"
- Rescan the client machine by clicking the Assets link at the top of the web console, ticking the checkbox in front of the machine and hitting the Rescan button on the left.
- If after the rescan SQL Server information is found, but certain databases are not listed, make sure Auto Close is turned off for these databases. Right-click the databases in SQL Server Management Studio, select Properties, then the Options tab and make sure Auto Close is set to False. Rescan the client machine afterwards.