cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AdmJLovejoy
Champion Sweeper
In version 4.2 tblDiskPartition.DeviceID gave the result: 'Disk #1, Partition #0'. What is the equitant in 5.2 to achieve same result?
Thanks, Jim Lovejoy __________________________________________________________________________________________________ James W. Lovejoy | IBM - Cloud Managed Services Delivery | Infrastructure Architect (Windows Server ...
1 ACCEPTED SOLUTION
Michael_V
Champion Sweeper III
Fields:
Diskindex
Index

View solution in original post

2 REPLIES 2
AdmJLovejoy
Champion Sweeper
Thanks, that did it.

Here is a Disk Partition Alignment view I used it in.

Select Top (1000000) tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysOS.OSname,
Cast(Round(tblDiskPartition.Size / 1024 / 1024 / 1024, 2, 0) As DECIMAL(20,1))
As 'Size (GB)',
'Disk #' + Cast(tblDiskPartition.DiskIndex As Varchar(5)) + ' : Partition #' +
Cast(tblDiskPartition.[Index] As Varchar(5)) As DeviceID,
tblDiskPartition.StartingOffset,
Case
When (tblDiskPartition.StartingOffset / 4096 !=
Round(tblDiskPartition.StartingOffset / 4096, 0)) Then 'FALSE' Else 'TRUE'
End As 'Is Aligned?',
tsysOS.Image As icon
From tblDiskPartition
Inner Join tblAssets On tblDiskPartition.AssetID = tblAssets.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where (tblDiskPartition.StartingOffset / 4096 <>
Round(tblDiskPartition.StartingOffset / 4096, 0) And
tblDiskPartition.BootPartition = 0 And Round(tblDiskPartition.Size /
1024 / 1024 / 1024, 2) > 1) Or
(tblDiskPartition.StartingOffset / 4096 <>
Round(tblDiskPartition.StartingOffset / 4096, 0) And
tblDiskPartition.BootPartition = Null And Round(tblDiskPartition.Size / 1024 /
1024 / 1024, 2) > 1 And tblAssetCustom.State = 1)
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysOS.OSname,
'Disk #' + Cast(tblDiskPartition.DiskIndex As Varchar(5)) + ' : Partition #' +
Cast(tblDiskPartition.[Index] As Varchar(5)),
tblDiskPartition.StartingOffset,
tsysOS.Image,
tblDiskPartition.StartingOffset / 4096,
tblDiskPartition.Size
Order By tblAssets.AssetID,
DeviceID
Thanks, Jim Lovejoy __________________________________________________________________________________________________ James W. Lovejoy | IBM - Cloud Managed Services Delivery | Infrastructure Architect (Windows Server ...
Michael_V
Champion Sweeper III
Fields:
Diskindex
Index

New to Lansweeper?

Try Lansweeper For Free

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

Try Now