Is there a query we can use to find out the amount of space a project's Working state is using?
Harvest Software Change Manager 12.6 and up
To find the data size in the working views:
SELECT HARENVIRONMENT.ENVIRONMENTNAME,
HARSTATE.STATENAME,
HARVIEW.VIEWNAME,
HARVIEW.VIEWTYPE,
VIEWDATASIZE.Sum_DATASIZE
FROM HARENVIRONMENT
INNER JOIN HARVIEW ON HARENVIRONMENT.ENVOBJID = HARVIEW.ENVOBJID
LEFT JOIN HARSTATE ON HARVIEW.VIEWOBJID = HARSTATE.VIEWOBJID
INNER JOIN
(SELECT HARVIEW.VIEWOBJID,
SUM(HARVERSIONDATA.DATASIZE) AS Sum_DATASIZE
FROM HARVIEW
INNER JOIN HARVERSIONINVIEW ON HARVIEW.VIEWOBJID = HARVERSIONINVIEW.VIEWOBJID
INNER JOIN HARVERSIONS ON HARVERSIONS.VERSIONOBJID = HARVERSIONINVIEW.VERSIONOBJID
INNER JOIN HARVERSIONDATA ON HARVERSIONS.VERSIONDATAOBJID = HARVERSIONDATA.VERSIONDATAOBJID
GROUP BY HARVIEW.VIEWOBJID
) VIEWDATASIZE ON VIEWDATASIZE.VIEWOBJID = HARVIEW.VIEWOBJID
WHERE HARVIEW.VIEWTYPE IN ('Baseline', 'Working')
AND HARENVIRONMENT.ENVIRONMENTNAME = 'SampleProject' /* <--- Project Name goes here */
To find the data size in packages in each state
SELECT DISTINCT HARENVIRONMENT.ENVIRONMENTNAME,
HARSTATE.STATENAME,
SUM(HARVERSIONDATA.DATASIZE) AS Sum_DATASIZE
FROM HARENVIRONMENT
INNER JOIN HARSTATE ON HARENVIRONMENT.ENVOBJID = HARSTATE.ENVOBJID
INNER JOIN HARPACKAGE ON HARSTATE.STATEOBJID = HARPACKAGE.STATEOBJID
INNER JOIN HARVERSIONS ON HARPACKAGE.PACKAGEOBJID = HARVERSIONS.PACKAGEOBJID
INNER JOIN HARVERSIONDATA ON HARVERSIONS.VERSIONDATAOBJID = HARVERSIONDATA.VERSIONDATAOBJID
WHERE HARENVIRONMENT.ENVIRONMENTNAME = 'SampleProject' /* <--- Project Name goes here */
GROUP BY HARENVIRONMENT.ENVIRONMENTNAME,
HARSTATE.STATENAME