Hi, Pleae help me to write a query to generate a report to get the folder size by going through the folder heirarchy.
Thanks in advance!
That would involve getting the DataSize from the DVERSDATA table. You could have two reports: 1). Only the current Version or 2). All versions.
Select dtan.dataid, dtp.name, sum(dv.datasize)
From dtreeancestors dtan
Join dtree dtp on dtan.dataid = dtp.dataid and dtp.subtype = 0
Join dtree dtd on dtp.dataid = dtp.parentid and dtp.subtype <> 0
Join dversdata dv on dtd.dataid = dv.docid
Where dtan.ancestorid = %1
If you want the Folder hierarchy in the folder, you’ll need to go one of two routes: 1). Find or develop a function that you can call with a given DataID and have it return the path; 2). Manually create a way of reporting it from within the Script….this can be done, but it can look messy, if not done cleanly. It would also depend upon how deep your system is in Folders.
Colin J
From: eLink Entry: Content Server LiveReports Forum <livereportsdiscussion@elinkkc.opentext.com>Sent: Friday, January 25, 2019 3:17 AMTo: eLink Recipient <devnull@elinkkc.opentext.com>Subject: report to get the size of a folder using MS SQL
report to get the size of a folder using MS SQL
Posted bydmarothu@rambus.com (Marothu, Dhana) On 01/25/2019 05:13 AM
[To post a comment, use the normal reply function]
Forum:
Content Server LiveReports Forum
Content Server:
My Support