Set DB role in oracle report
I create a role in oracle database and I am able to set role to user in SQLPLUS as below:
SQL> set role all_temper_role;
Role set.
But I need to set this role in oracle report and I use:
HOLD_CMD := 'ALL_TEMPer_ROLE';
DBMS_SESSION.SET_ROLE(HOLD_CMD);
But this is not working. Please advise me how set this role in开发者_StackOverflow中文版side of my oracle report program.
You probably want to make your role name uppercase, unless you know for a fact you created it with lower case characters:
HOLD_CMD := 'ALL_TEMPER_ROLE';
DBMS_SESSION.SET_ROLE(HOLD_CMD);
Oracle offers a better way to achieve this through its built-in row level security (RLS) mechanism (also known as fine grained access control or FGAC).We have done FGAC for our report.
According to previous documents,
1) added a user parameter P_CONC_REQUEST_ID 2) added "srw.user_exit('FND SRWINIT');" to the BeforeReport trigger 3) added "srw.user_exit('FND SRWEXIT');" to the AfterReport trigger
We hope it may help you.
The Property Inspector (at the report level) contains a "Role Name" property. Experience has taught me that this is the best solution.
精彩评论