6 Replies Latest reply on Jul 14, 2009 7:12 PM by Gaff

    What is Oracle context

    user10754555
      Can anyone please tell me what is oracle Context and what is the use of it?

      Thanks
        • 1. Re: What is Oracle context
          6363
          Not easily without context.

          It is either the obsolete name for what is now known as Oracle Text

          http://download-west.oracle.com/docs/cd/A87860_01/doc/inter.817/a77061/newfeat2.htm#17331

          http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/content.htm#CNCPT1537

          Or it is an application context

          http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/security.htm#CNCPT1594
          • 2. Re: What is Oracle context
            user10754555
            Actually some times you will see code like:

            CREATE CONTEXT PAYROLL_CONTEXT USING PACK_PAYROLL_CONTEXT;

            also SYS_CONTEXT is used to set attributes.

            but i am not sure what exactly is this and what is the use of this. I just got the requirement that since our system is using larger chunck of Oracle Shared Pool, its been suggested to create and use the ORACLE CONTEXT.

            but m not sure how to use and wht d purpose?
            • 3. Re: What is Oracle context
              Frank Kulash
              Hi,
              user10754555 wrote:
              Actually some times you will see code like:

              CREATE CONTEXT PAYROLL_CONTEXT USING PACK_PAYROLL_CONTEXT;
              That creates a namespace, which can be used in conjuction with the "application context" (the second meaning from Pointless' message). These namespaces have other uses, too: parameterized views are one example. You can think of this as a way to store session-specific global variables.
              also SYS_CONTEXT is used to set attributes.
              Actually, SYS_CONTEXT is used to get values. The values are set by some user-defined PL/SQL (PACK_PAYROLL_CONTEXT in the example you posted), which calls dbms_session.set_context.
              but i am not sure what exactly is this and what is the use of this. I just got the requirement that since our system is using larger chunck of Oracle Shared Pool, its been suggested to create and use the ORACLE CONTEXT.

              but m not sure how to use and wht d purpose?
              Sorry, I'm not sure what you're getting at here.
              • 4. Re: What is Oracle context
                Hoek
                Hi,

                Besides Pointless' links to the docs, you may want to search this forum on context or check the explanation and examples over here:
                http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5669294472933
                I just got the requirement that since our system is using larger chunck of Oracle Shared Pool, its been suggested to create and use the ORACLE CONTEXT
                Who's been suggesting that and why/how is context related to a shared_pool? Never heard of such a relation, but it's always good to learn something every day.
                • 5. Re: What is Oracle context
                  6363
                  user10754555 wrote:

                  but i am not sure what exactly is this and what is the use of this. I just got the requirement that since our system is using larger chunck of Oracle Shared Pool, its been suggested to create and use the ORACLE CONTEXT.
                  Sounds like you have code that builds dynamic SQL without bind variables which fragments the shared pool

                  Here is an example of using application contexts to bind an unknown number of inputs to a dynamic query

                  http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1288401763279

                  Note the link to an alternate solution not using application context at the top of the page and see if you can use that instead.

                  http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1669972300346534908
                  • 6. Re: What is Oracle context
                    Gaff
                    Let me piggyback and ask a related question: If I want to create a global application context for, say , a web based application. Does the session using it have to be an "enterprise" user? I've seen reference to this in some Oracle related docs and they hint that an "Enterprise User" is a user in an LDAP. Suppose I don't have an LDAP, e.g., I just have something like a PKI service that authenticates the user and returns a certificate? Can I still use a global application context or must I load an application context for each user? Does "enterprise user" have some Oracle-specific meaning or were they probably just using the LDAP as an example implementation of "enterprise user"?

                    Thanks.