Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AndreaR
Engaged Sweeper

Do I need to create one query to show all instances DB SQL e no SQL (ex.MariaDB) it's possible?

 

1 ACCEPTED SOLUTION
Jacob_H
Lansweeper Employee
Lansweeper Employee

We currently only scan/inventory Microsoft SQL Server databases - if you need to inventory other databases, we have a free database scanning tool https://www.lansweeper.com/resources/free-tools/database-scanner/

for SQL databases, you could run this query:

Select Top 1000000 tsysOS.Image As icon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tblSqlServers.displayVersion As Edition,
  tblSqlServers.skuName As License,
  tblSqlServers.spLevel As [SQL SP],
  tblSqlServers.serviceName As Service,
  tblSqlDatabases.name As [Database Name],
  tblAssets.Domain,
  tblAssets.IPAddress,
  tblAssetCustom.Location,
  tsysIPLocations.IPLocation,
  tsysOS.OSname As OS,
  tblAssets.SP As SP,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  tblSqlDatabases.dataFilesSizeKb,
  tblSqlDatabases.logFilesUsedSizeKb,
  tblSqlDatabases.Lastchanged
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
  Inner Join tblSqlServers On tblAssets.AssetID = tblSqlServers.AssetID
  Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
  Inner Join tblSqlDatabases On tblSqlServers.sqlServerId =
      tblSqlDatabases.sqlServerId
Where tblSqlDatabases.name Not In ('tempdb', 'mssqlsystemresource', 'master',
  'model', 'msdb') And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
  Edition

View solution in original post

1 REPLY 1
Jacob_H
Lansweeper Employee
Lansweeper Employee

We currently only scan/inventory Microsoft SQL Server databases - if you need to inventory other databases, we have a free database scanning tool https://www.lansweeper.com/resources/free-tools/database-scanner/

for SQL databases, you could run this query:

Select Top 1000000 tsysOS.Image As icon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tblSqlServers.displayVersion As Edition,
  tblSqlServers.skuName As License,
  tblSqlServers.spLevel As [SQL SP],
  tblSqlServers.serviceName As Service,
  tblSqlDatabases.name As [Database Name],
  tblAssets.Domain,
  tblAssets.IPAddress,
  tblAssetCustom.Location,
  tsysIPLocations.IPLocation,
  tsysOS.OSname As OS,
  tblAssets.SP As SP,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  tblSqlDatabases.dataFilesSizeKb,
  tblSqlDatabases.logFilesUsedSizeKb,
  tblSqlDatabases.Lastchanged
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
  Inner Join tblSqlServers On tblAssets.AssetID = tblSqlServers.AssetID
  Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
  Inner Join tblSqlDatabases On tblSqlServers.sqlServerId =
      tblSqlDatabases.sqlServerId
Where tblSqlDatabases.name Not In ('tempdb', 'mssqlsystemresource', 'master',
  'model', 'msdb') And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
  Edition

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now