Workbench's "Find Version" tool, and the "hsv" command line utility only allow searching for files one project at a time. If I need to search multiple projects, or all projects, this can become cumbersome and time consuming. For example, we need a query to produce a listing of all jar files in all repositories. Fields to be reported: project name, repo name, path to file and file name. Only need *.jar files.
How can this be accomplished?
Harvest Software Change Manager all versions and platforms
Oracle and SQL Server databases
The following SQL will produce the requested listing of all files with a "*.jar" file extension in the Harvest database. Using this as an example, you can make modifications to search for other types of files as well.
SELECT DISTINCT HARENVIRONMENT.ENVIRONMENTNAME AS "PROJECT NAME",
HARREPOSITORY.REPOSITNAME AS "REPO NAME",
HARPATHFULLNAME.PATHFULLNAME AS "PATH TO FILE",
HARITEMNAME.ITEMNAME AS "FILE NAME"
FROM HARVERSIONS
INNER JOIN HARPATHFULLNAME ON HARVERSIONS.PATHVERSIONID = HARPATHFULLNAME.VERSIONOBJID
INNER JOIN HARITEMNAME ON HARITEMNAME.NAMEOBJID = HARVERSIONS.ITEMNAMEID
INNER JOIN HARVERSIONINVIEW ON HARVERSIONS.VERSIONOBJID = HARVERSIONINVIEW.VERSIONOBJID
INNER JOIN HARVIEW ON HARVIEW.VIEWOBJID = HARVERSIONINVIEW.VIEWOBJID
INNER JOIN HARREPINVIEW ON HARVIEW.VIEWOBJID = HARREPINVIEW.VIEWOBJID
INNER JOIN HARREPOSITORY ON HARREPOSITORY.REPOSITOBJID = HARREPINVIEW.REPOSITOBJID
INNER JOIN HARENVIRONMENT ON HARENVIRONMENT.ENVOBJID = HARVIEW.ENVOBJID
WHERE
HARENVIRONMENT.ENVIRONMENTNAME != ''
AND
HARITEMNAME.ITEMNAMEUPPER LIKE '%.JAR'
ORDER BY HARREPOSITORY.REPOSITNAME
More about the "hsv" command line utility can be found here: hsv Command-Select Version
More about Workbench's "Find Version" tool can be found here: Find Versions