Tuesday, September 29, 2020

Query to fetch the Privilege required to access an ESS job

SELECT   P.CODE PRIVILEGE, 
  T.NAME, 
  PERM.CODE CODE, 
  PERM.RESOURCE_TYPE_NAME, 
  PERM.ACTION 
FROM   FUSION.ASE_PRIVILEGE_B P, 
  FUSION.ASE_PERMISSION_B PERM, 
  ASE_PRIVILEGE_TL T 
WHERE   P.PRIVILEGE_ID = PERM.PRIVILEGE_ID 
  AND P.PRIVILEGE_ID = T.PRIVILEGE_ID (+) 
  AND T.LANGUAGE = 'US' 
  AND SYSDATE BETWEEN P.EFFECTIVE_START_DATE 
  AND NVL(P.EFFECTIVE_END_DATE, SYSDATE) 
  AND SYSDATE BETWEEN PERM.EFFECTIVE_START_DATE 
  AND NVL(PERM.EFFECTIVE_END_DATE, SYSDATE
  AND PERM.CODE LIKE '%AsePrivilegeDiscovererReportJob' -- Enter Job Name

No comments:

Post a Comment