Here is a big SQL query I use to get all users and/or roles that have admin or use rights to existing document trays. It should be run against the "dwsystem" database on your DocuWare server (our database is MS SQL Server):
==============================
SELECT fcs.SetID AS ID, fcs.Name AS DocTray, fc.name AS FileCabinet,
fcs.settings.value('(/WebBasketSettings/@DiskNumber)[1]', 'int') AS DiskNumber,
r.name COLLATE SQL_Latin1_General_CP1_CI_AS AS UserOrRole, 'Role' AS Type,
IIF(UPPER(fcp.settings.value('(/BasketProfile/GeneralRights)[1]', 'varchar(500)')) LIKE '%ADMIN_OPERATOR,%', 'Administrate', 'Use') AS Access
FROM DWFCSettings fcs
INNER JOIN DWFileCabinet fc ON fcs.settings.value('(/WebBasketSettings/@AssignedFileCabinetGuid)[1]', 'varchar(50)') = fc.Guid
INNER JOIN DWFCSettingsToFCProfile fcsp ON fcs.setid = fcsp.setid
INNER JOIN DWFCProfile fcp ON fcsp.fpid = fcp.fpid
INNER JOIN DWFCProfileToRole fcpr ON fcsp.fpid = fcpr.fpid
INNER JOIN DWRoles r ON fcpr.rid = r.rid
WHERE UPPER(fcs.Type) LIKE '%WEBBASKETSETTINGS%'
UNION ALL
SELECT fcs.SetID AS ID, fcs.Name AS DocTray, fc.name AS FileCabinet,
fcs.settings.value('(/WebBasketSettings/@DiskNumber)[1]', 'int') AS DiskNumber,
u.name COLLATE SQL_Latin1_General_CP1_CI_AS AS UserOrRole, 'User' AS Type,
IIF(UPPER(fcp.settings.value('(/BasketProfile/GeneralRights)[1]', 'varchar(500)')) LIKE '%ADMIN_OPERATOR,%', 'Administrate', 'Use') AS Access
FROM DWFCSettings fcs
INNER JOIN DWFileCabinet fc ON fcs.settings.value('(/WebBasketSettings/@AssignedFileCabinetGuid)[1]', 'varchar(50)') = fc.Guid
INNER JOIN DWFCSettingsToFCProfile fcsp ON fcs.setid = fcsp.setid
INNER JOIN DWFCProfile fcp ON fcsp.fpid = fcp.fpid
INNER JOIN DWFCProfileToUser fcpu ON fcsp.fpid = fcpu.fpid
INNER JOIN DWUser u ON fcpu.uid = u.uid
WHERE UPPER(fcs.Type) LIKE '%WEBBASKETSETTINGS%'
ORDER BY DocTray, Type DESC, UserOrRole
==============================
It's ugly, but seems to work. This information can be subsequently used to get number of documents and total size in bytes, if you need those queries. But this should list all document trays and their backing file cabinets, along with User and Role rights.
Thanks,
Joe Kaufman