PAM360 supports creating query-based reports, allowing users to extract specific data from the database by either writing custom SQL queries or modifying existing ones. This functionality empowers users to fetch information from various tables and format it into actionable reports. For example, you can create reports for scenarios like:
PAM360 provides pre-defined query reports organized by categories such as:
Each category consists of multiple query reports, and users can add new reports or create custom categories. To create a new custom query report category, navigate to Reports >> Query Reports >> Manage Categories and click Add Category. In the pop-up that opens, enter the category name and click Save.
This document will walks you through the following topics:
You can generate query-based reports in two ways:
While creating a new query report, you can use the default reports as such or edit the queries and save them as new reports. Or, to create a new query from scratch using your own SQL query, follow the steps given below:



While writing your own SQL query, following are the placeholders that can be used:
Additional Detail
Encrypted columns can be identified by the SCHAR data type, which is visible in the Tables Schema.

Here are some SQL queries for common use cases:
This query report identifies passwords that have not been rotated after being used for auto-logon to a target system. Regular password resets after auto-login are critical for security.
SELECT Ptrx_Resource.RESOURCENAME AS "Resource Name", Ptrx_Account.LOGINNAME AS "Account Name", Ptrx_DummyPwdNotChan.retrievedtime AS "Lastaccessedtime", Ptrx_ResourceSystem.OPERATINGSYSTEM AS "Type", Ptrx_Resource.LOCATION AS "Location", Ptrx_Resource.RESOURCEDESC AS "Description" FROM ( SELECT accountid, retrievedtime FROM ( SELECT Ptrx_DummyPwdRetr.accountid AS accountid, Ptrx_DummyPwdRetr.accessedtime AS retrievedtime, Ptrx_DummyPwdChanged.time AS time FROM ( SELECT RESOURCEID, ACCOUNTID, MAX(LASTACCESSEDTIME) AS accessedtime FROM Ptrx_UserAudit INNER JOIN Ptrx_AuditConfiguration ON Ptrx_AuditConfiguration.CONF_ID = Ptrx_UserAudit.OPERATIONTYPE WHERE Ptrx_AuditConfiguration.OPERATION_TYPE = 'Password Retrieved' AND REASON LIKE '%auto logon helper reason%' GROUP BY RESOURCEID, ACCOUNTID ) Ptrx_DummyPwdRetr LEFT JOIN ( SELECT ACCOUNTID, MAX(LASTACCESSEDTIME) AS time FROM Ptrx_UserAudit INNER JOIN Ptrx_AuditConfiguration ON Ptrx_AuditConfiguration.CONF_ID = Ptrx_UserAudit.OPERATIONTYPE WHERE Ptrx_AuditConfiguration.OPERATION_TYPE = 'Password Changed' GROUP BY ACCOUNTID ) Ptrx_DummyPwdChanged ON Ptrx_DummyPwdRetr.accountid = Ptrx_DummyPwdChanged.accountid AND Ptrx_DummyPwdChanged.time %GREATERTHAN% Ptrx_DummyPwdRetr.accessedtime ) AS Ptrx_DummyPwdRetrAndChan WHERE Ptrx_DummyPwdRetrAndChan.time IS NULL ) AS Ptrx_DummyPwdNotChan INNER JOIN Ptrx_Account ON Ptrx_DummyPwdNotChan.accountid = Ptrx_Account.ACCOUNTID INNER JOIN Ptrx_Resource ON Ptrx_Resource.RESOURCEID = Ptrx_Account.RESOURCEID INNER JOIN Ptrx_ResourceSystemMembers ON Ptrx_ResourceSystemMembers.RESOURCEID = Ptrx_Resource.RESOURCEID INNER JOIN Ptrx_ResourceSystem ON Ptrx_ResourceSystem.OSID = Ptrx_ResourceSystemMembers.OSID ORDER BY Ptrx_Resource.RESOURCENAME;
This query helps you track resources whose passwords have not been changed even once since their creation. Periodic password resets are important and this report helps track all the resources that have outdated passwords.
You can also rewrite the following query to find out the passwords have not been changed for resources, added during a particular period.
SELECT Ptrx_Resource.RESOURCENAME AS "Resource Name", Ptrx_Account.LOGINNAME AS "Account Name", Ptrx_ResourceSystem.OPERATINGSYSTEM AS "Type", Ptrx_Resource.LOCATION AS "Location", Ptrx_Resource.RESOURCEDESC AS "Description" FROM ( SELECT Ptrx_Account.ACCOUNTID AS accountid, Ptrx_Resource.RESOURCEID FROM Ptrx_Account INNER JOIN Ptrx_Resource ON Ptrx_Resource.RESOURCEID = Ptrx_Account.RESOURCEID WHERE accountid NOT IN ( SELECT Ptrx_UserAudit.ACCOUNTID FROM Ptrx_UserAudit FULL OUTER JOIN ( SELECT accountid, lastaccessedtime, OPERATION_TYPE FROM Ptrx_UserAudit INNER JOIN Ptrx_AuditConfiguration ON Ptrx_AuditConfiguration.CONF_ID = Ptrx_UserAudit.OPERATIONTYPE WHERE Ptrx_AuditConfiguration.OPERATION_TYPE LIKE 'Account Added' ) AS Ptrx_DummyAccAdded ON Ptrx_UserAudit.ACCOUNTID = Ptrx_DummyAccAdded.accountid AND Ptrx_UserAudit.lastaccessedtime %GREATERTHAN% Ptrx_DummyAccAdded.lastaccessedtime WHERE Ptrx_DummyAccAdded.OPERATION_TYPE LIKE 'Password Changed' AND Ptrx_UserAudit.lastaccessedtime BETWEEN Ptrx_DummyAccAdded.lastaccessedtime AND ( Ptrx_DummyAccAdded.lastaccessedtime ::timestamp::date + INTERVAL '5' day ) ) ) AS Ptrx_DummyPwdNotChan INNER JOIN Ptrx_Account ON Ptrx_DummyPwdNotChan.accountid = Ptrx_Account.ACCOUNTID INNER JOIN Ptrx_Resource ON Ptrx_Resource.RESOURCEID = Ptrx_Account.RESOURCEID INNER JOIN Ptrx_ResourceSystemMembers ON Ptrx_ResourceSystemMembers.RESOURCEID = Ptrx_Resource.RESOURCEID INNER JOIN Ptrx_ResourceSystem ON Ptrx_ResourceSystem.OSID = Ptrx_ResourceSystemMembers.OSID ORDER BY Ptrx_Resource.RESOURCENAME;
You can schedule an existing query report or a new query report for automatic generation. Here is how:


To cancel an existing schedule, follow the below steps:
To manage categories, go to Reports >> Query Reports >> Manage Categories.
Additional Detail
In order to delete a category, you have to first ensure that no reports exist under it. If there are reports, you can move them to another category.