To minimize compliance risks and prevent accidental data damage, you should avoid querying data through the highly privileged APPS schema. A safer, compliant alternative is to create a dedicated read-only database user (such as query_apps)
CREATE USER query_apps IDENTIFIED BY query_apps;
GRANT CONNECT TO query_apps;
GRANT SELECT ANY TABLE TO query_apps;
GRANT SELECT ANY DICTIONARY TO query_apps;
GRANT SELECT_CATALOG_ROLE TO query_apps;
GRANT SELECT ON SYS.USER$ TO query_apps;
—————————————–
CREATE OR REPLACE TRIGGER apps.query_apps_logon_trg
AFTER LOGON ON query_apps.SCHEMA
BEGIN
— This is essential for EBS to resolve object names correctly
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = APPS';
— Initialize the Multi-Org context for R12.2.x
— This is crucial for views that filter data by Operating Unit
apps.mo_global.init('M');
END;
/
———————————
GRANT EXECUTE ON apps.fnd_global TO query_apps;
GRANT EXECUTE ON apps.mo_global TO query_apps;
GRANT ALL ON apps.mo_glob_org_access_tmp TO query_apps;
Comments
Tags: #immam_dba, #oracle, dba immam, Immam Dba, Oracle DBA, Oracle DBA APPS
