Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL query for lansweepr to find Server HDD with 85% used.

$
0
0

I have tried the below to try and mash some of the things I found on the Lansweeper site together, but to no avail, any advice is gratefully received

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname,
tblAssets.Description,
tblDiskdrives.Caption,
Cast(Cast(tblDiskdrives.Freespace As bigint) / 1024 / 1024 As numeric) As
free,
Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric) As
[total size],
Ceiling((tblDiskdrives.Size - tblDiskdrives.Freespace) /
(Case tblDiskdrives.Size
When 0 Then 1
Else tblDiskdrives.Size
End) * 100) As UsedPCT,
tblDiskdrives.Lastchanged As [last changed],
tsysOS.Image As icon,
tblAssets.OScode
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>