Setting Organization Context in Oracle R12
February 3rd, 2009
For those of you who are trying to set the organization context within your SQL sessions or custom programs, there’s a new API you must call in R12.
The previous way of setting organization context in 11i was to execute the following statement:
dbms_application_info.set_client_info(ORG_ID);
However, in R12, the new way of setting the organization context is as follows:
mo_global.init(’AR’);
mo_global.set_policy_context(’S',ORG_ID);
The ‘S’ parameter indicates a single organization context. Replace ORG_ID with the ID of the operating unit you wish to use. You can also set a context for multiple operating units by setting the security profile. This is done by executing the following statement:
mo_global.set_org_access(NULL,SECURITY_PROFILE_ID,’ASO’);
Replace SECURITY_PROFILE_ID with the ID of the appropriate security profile. ‘ASO’ represents the application short name associated with the responsibility you’ll be using.

Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed