→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sisman
Engaged Sweeper II
Hi,
is it possible to have SQL database sizes in report?
In this report I managed to include instance names, but I can not find in which table is info of database size - IF SUCH INFO EXIST.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
tsysOS.Image As icon,
tblSqlServers.displayVersion As Edition,
tblSqlServers.skuName As License,
tblSqlServers.spLevel As SP,
tblSqlServers.serviceName As Service,
tblSqlServers.lastChanged,
tblAssets.IPAddress,
tblSqlServers.version,
tblAssetCustom.LastPatched,
tblSqlDatabases.name
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
Inner Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblSqlDatabases On tblSqlServers.sqlServerId =
tblSqlDatabases.sqlServerId
Where tblAssetCustom.State = 1 And tblComputersystem.Roles Like N'%sqlserver%'
Order By tblAssets.AssetName,
Edition
1 ACCEPTED SOLUTION
MikeMc
Champion Sweeper II
You can add the data and log file sizes recorded by Lansweeper.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
tsysOS.Image As icon,
tblSqlServers.displayVersion As Edition,
tblSqlServers.skuName As License,
tblSqlServers.spLevel As SP,
tblSqlServers.serviceName As Service,
tblSqlServers.lastChanged,
tblAssets.IPAddress,
tblSqlServers.version,
tblAssetCustom.LastPatched,
tblSqlDatabases.name,
tblSqlDatabases.dataFilesSizeKb,
tblSqlDatabases.logFilesSizeKb
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
Inner Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblSqlDatabases On tblSqlServers.sqlServerId =
tblSqlDatabases.sqlServerId
Where tblAssetCustom.State = 1 And tblComputersystem.Roles Like N'%sqlserver%'
Order By tblAssets.AssetName,
Edition

View solution in original post

2 REPLIES 2
sisman
Engaged Sweeper II
Works like a charm !
Thank you !

MikeMc
Champion Sweeper II
You can add the data and log file sizes recorded by Lansweeper.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
tsysOS.Image As icon,
tblSqlServers.displayVersion As Edition,
tblSqlServers.skuName As License,
tblSqlServers.spLevel As SP,
tblSqlServers.serviceName As Service,
tblSqlServers.lastChanged,
tblAssets.IPAddress,
tblSqlServers.version,
tblAssetCustom.LastPatched,
tblSqlDatabases.name,
tblSqlDatabases.dataFilesSizeKb,
tblSqlDatabases.logFilesSizeKb
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
Inner Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblSqlDatabases On tblSqlServers.sqlServerId =
tblSqlDatabases.sqlServerId
Where tblAssetCustom.State = 1 And tblComputersystem.Roles Like N'%sqlserver%'
Order By tblAssets.AssetName,
Edition