‎03-05-2019 12:57 PM
Select Top 1000000 tblSqlServerCluster.Name As ClusterName,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblSqlServers.displayVersion As Edition,
tblSqlServers.skuName As License,
tblSqlServers.spLevel As [SQL SP],
tblSqlServers.serviceName As Service,
tblLanguages.Language As [SQL Language],
(Case
When tblSqlServers.Authentication = 0 Then 'Unkown'
When tblSqlServers.Authentication = 1 Then 'Windows Authentication'
Else 'SQL Server and Windows Authentication'
End) As [SQL Authentication],
tblAssets.IPAddress,
Case
When tblAssetCustom.Location Is Null Then ''
Else tblAssetCustom.Location
End As Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblSqlServers.AssetID
From tblSqlServers
Inner Join tblAssets On tblSqlServers.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSqlServerCluster On tblSqlServers.ClusterId =
tblSqlServerCluster.Id
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblLanguages On tblSqlServers.language = tblLanguages.LanguageCode
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.State = 1
Order By ClusterName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now