The purpose of Row-Level-Security is to hide certain data[based on some conditions]. RLS does so by appending a where clause to the secured object.
1. MO_GLOBAL.ORG_SECURITY is a function that returns a predicate for the WHERE CLAUSE
2. The where clause will be appended to Table/Synonym/View for which Multi Org Row Level security is enabled
1. MO_GLOBAL.ORG_SECURITY is a function that returns a predicate for the WHERE CLAUSE
2. The where clause will be appended to Table/Synonym/View for which Multi Org Row Level security is enabled
This procedure has two parameters
1. p_access_mode
Pass a value "S" in case you want your current session to work against
Single ORG_ID
Pass a value of "M" in case you want your current session to work
against multiple ORG_ID’s
2. p_org_id
Only applicable if p_access_mode is passed value of "S"
In SQL*Plus, I wish to set my session to work against a specific Org [one single org]. How do I do that in R121. p_access_mode
Pass a value "S" in case you want your current session to work against
Single ORG_ID
Pass a value of "M" in case you want your current session to work
against multiple ORG_ID’s
2. p_org_id
Only applicable if p_access_mode is passed value of "S"
SQL>> exec MO_GLOBAL.SET_POLICY_CONTEXT(’S’,101);
In the above case, ORG_ID 101 will be assigned as current org for your session.
Internally, following code in blue will be executed by Oracle when you set your context to single Org,dbms_session.set_context(’multi_org2’, ’current_org_id’, 101);
If the current database session is initialised for Single Org[as in above step], then Where clause appended to object by Row-Level-Security will be
WHERE org_id = sys_context(’multi_org2’,’current_org_id’)
begin
apps.mo_global.set_policy_context('S','101');
end;
No comments:
Post a Comment