cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
talomer40
Engaged Sweeper
Hi,

I have a report with all my physical servers, somehow i see there XEN virtual machines, anyone with the same issue>?
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Try:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssets.Lastseen,
tblAssetCustom.Manufacturer
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where (tsysIPLocations.IPLocation Like '%lab%' And tblAssetCustom.State = 1 And
tblAssetCustom.Model Not Like '%virtual%' And tblAssets.Assettype = -1) Or
(tsysAssetTypes.AssetTypename = 'linux' And tsysIPLocations.IPLocation Like
'%lab%' And tblAssetCustom.Manufacturer Not Like '%vmware%' And
tblAssetCustom.State = 1 And tblAssetCustom.Model Not Like '%virtual%') Or
(tsysAssetTypes.AssetTypename = 'xen server' And
tsysIPLocations.IPLocation Like '%lab%' And tblAssetCustom.Manufacturer Not Like '%vmware%' And tblAssetCustom.State = 1 And tblAssetCustom.Model Not Like '%virtual%')
Order By tblAssets.IPAddress

View solution in original post

3 REPLIES 3
Hemoco
Lansweeper Alumni
Try:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssets.Lastseen,
tblAssetCustom.Manufacturer
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where (tsysIPLocations.IPLocation Like '%lab%' And tblAssetCustom.State = 1 And
tblAssetCustom.Model Not Like '%virtual%' And tblAssets.Assettype = -1) Or
(tsysAssetTypes.AssetTypename = 'linux' And tsysIPLocations.IPLocation Like
'%lab%' And tblAssetCustom.Manufacturer Not Like '%vmware%' And
tblAssetCustom.State = 1 And tblAssetCustom.Model Not Like '%virtual%') Or
(tsysAssetTypes.AssetTypename = 'xen server' And
tsysIPLocations.IPLocation Like '%lab%' And tblAssetCustom.Manufacturer Not Like '%vmware%' And tblAssetCustom.State = 1 And tblAssetCustom.Model Not Like '%virtual%')
Order By tblAssets.IPAddress
talomer40
Engaged Sweeper
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssets.Lastseen,
tblAssetCustom.Manufacturer
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where (tsysIPLocations.IPLocation Like '%lab%' And tblAssetCustom.State = 1 And
tblAssetCustom.Model Not Like '%virtual%' And tblAssets.Assettype = -1) Or
(tsysAssetTypes.AssetTypename = 'linux' And tsysIPLocations.IPLocation Like
'%lab%' And tblAssetCustom.Manufacturer Not Like '%vmware%' And
tblAssetCustom.State = 1 And tblAssetCustom.Model Not Like '%virtual%') Or
(tsysAssetTypes.AssetTypename = 'xen server' And
tsysIPLocations.IPLocation Like '%lab%' And tblAssetCustom.State = 1)
Order By tblAssets.IPAddress
Hemoco
Lansweeper Alumni
Please post the SQL query you are running.

New to Lansweeper?

Try Lansweeper For Free

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

Try Now