04-12-2017 08:40 AM
I am still new to Transactional SQL and was wondering if anyone has written an SQL Query that gives you the current spaced used by your Disk Groups? I've looked at Report Services but the pre-packaged reports for Disk Groups does not have what I'm looking for. Thanks in advance for anyone's assistance on this.
04-12-2017 09:57 AM
Hi Renoldo,
I think this is roughly what you're looking for, giving both counts and sizes-
set transaction isolation level read uncommitted;
select
hsi.diskgroup.diskgroupname,
count(filesize) filecount,
sum(cast(filesize as bigint))/ 1000000000 sizeGBs,
sum(cast(filesize as bigint))/ 1000000 sizeMBs
from hsi.itemdatapage
left join hsi.diskgroup
on hsi.itemdatapage.diskgroupnum = hsi.diskgroup.diskgroupnum
group by hsi.diskgroup.diskgroupname;
UPDATE: I added the setting of the transaction level based on Ansley's point below, and as she points out the count() is not grouping by document id, so the count represents individual files on disk, not separate OnBase documents.
04-12-2017 08:50 AM
If you knew where your files were located on the file server file system, you could find out exactly how much file space they take.
04-12-2017 09:48 AM
04-12-2017 09:54 AM
04-12-2017 09:57 AM
Hi Renoldo,
I think this is roughly what you're looking for, giving both counts and sizes-
set transaction isolation level read uncommitted;
select
hsi.diskgroup.diskgroupname,
count(filesize) filecount,
sum(cast(filesize as bigint))/ 1000000000 sizeGBs,
sum(cast(filesize as bigint))/ 1000000 sizeMBs
from hsi.itemdatapage
left join hsi.diskgroup
on hsi.itemdatapage.diskgroupnum = hsi.diskgroup.diskgroupnum
group by hsi.diskgroup.diskgroupname;
UPDATE: I added the setting of the transaction level based on Ansley's point below, and as she points out the count() is not grouping by document id, so the count represents individual files on disk, not separate OnBase documents.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.