How to grant select on PXRPTUSER views to non-primavera p6 user
Sometimes, Other database schemas require Select access to PXRPTUSER views. For example, a data warehouse (EDW) might require access to PXRPTUSER to produce an analytical report or a custom database schema may require select access. The PXRPTUSER views are referring to ADMUSER tables so the grant VIEW access will not work. Follow the steps for how to grant VIEW access
- Login as ADMUSER and run the below query. It grants SELECT table access with grant option to PXRPTUSER
declare cursor tab_names is select table_name from user_tables; begin for tab in tab_names loop execute immediate 'GRANT SELECT ON '||tab.table_name||' to PXRPTUSER with GRANT OPTION '; end loop; end;
2. Also, run the below query. The package SECPAC is used by PXRPTUSER
GRANT EXECUTE ON SECPAC TO PXRPTUSER;
3. Finally, Login as PXRPTUSER and Grant Select ON VIEW access to the user you want SELECT ON access and test it.
declare cursor tab_names is select view_name from user_views; begin for tab in tab_names loop --Replace USER_NAME with your user name execute immediate 'GRANT SELECT ON '||tab.view_name||' to'; end loop; end;
This post first appeared on Oracle ADF, BPM, BI And Primavera P6 Tutorials, please read the originial post: here