
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2016 02:56 AM
What is the WMI query that is used to list the databases on an SQL server?
We have a number of SQL installations but one of them (SQL Express 2008 R2) is not listing any databases. LANSweeper finds the instances fine, but the database section is empty.
I would like to run the WMI manually on the server to see if I can list the the databases that way and compare the results to a known good SQL server.
Thanks
We have a number of SQL installations but one of them (SQL Express 2008 R2) is not listing any databases. LANSweeper finds the instances fine, but the database section is empty.
I would like to run the WMI manually on the server to see if I can list the the databases that way and compare the results to a known good SQL server.
Thanks
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2016 08:41 AM
dbpath = "Win32_PerfRawData_" + a suffix depending on the instance name.
"select dataFilesSizeKb, logFilesSizeKb, logFilesUsedSizeKb, Name from " + dbPath + " where name != \"_Total\""
You can try repairing the .mof files on your sql server first: http://www.lansweeper.com/kb/37/SQL-server-not-detected.html
"select dataFilesSizeKb, logFilesSizeKb, logFilesUsedSizeKb, Name from " + dbPath + " where name != \"_Total\""
You can try repairing the .mof files on your sql server first: http://www.lansweeper.com/kb/37/SQL-server-not-detected.html
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 02:53 PM
I have the same issue.
Only if I recsan the asset the SQL server information becomes visible.
Repairing the mof-files does not help.
How can I list the databases without an rescan? I need this information for an SQL-Report.
Thanks
Only if I recsan the asset the SQL server information becomes visible.
Repairing the mof-files does not help.
How can I list the databases without an rescan? I need this information for an SQL-Report.
Thanks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 09:06 AM
Try repairing the .mof files as Michael mentioned, worked for me too.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 09:16 AM
Thanks. That works on the server and I can see all the databases with WMI Explorer so I'm not sure why LANSweeper is not seeing them.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2016 08:41 AM
dbpath = "Win32_PerfRawData_" + a suffix depending on the instance name.
"select dataFilesSizeKb, logFilesSizeKb, logFilesUsedSizeKb, Name from " + dbPath + " where name != \"_Total\""
You can try repairing the .mof files on your sql server first: http://www.lansweeper.com/kb/37/SQL-server-not-detected.html
"select dataFilesSizeKb, logFilesSizeKb, logFilesUsedSizeKb, Name from " + dbPath + " where name != \"_Total\""
You can try repairing the .mof files on your sql server first: http://www.lansweeper.com/kb/37/SQL-server-not-detected.html
