SYS_CONTEXT attributes

Is there anything in the Data Dictionary that can give me info on any given NAMESPACE and its attributes used? Not just for the current session (i.e v$context) but all namespaces that have been created/used in SYS_CONTEXT?
I need to get a handle on the available attributes for a namespace that was created by the client so that I can use the same ones in a custom procedure.

  1  select table_name, column_name
  2  from dba_tab_columns
  3  where column_name like '%NAMESPACE%'
  4* order by 1,2
SQL> /
TABLE_NAME                 COLUMN_NAME
ALL_CONTEXT                 NAMESPACE
ALL_POLICY_CONTEXTS            NAMESPACE
DBA_CONTEXT                 NAMESPACE
DBA_GLOBAL_CONTEXT            NAMESPACE
DBA_HIST_LIBRARYCACHE            NAMESPACE
DBA_POLICY_CONTEXTS            NAMESPACE
DBA_REGISTRY                 NAMESPACE
DBA_REGISTRY_HIERARCHY            NAMESPACE
DBA_REGISTRY_HISTORY            NAMESPACE
DBA_REGISTRY_LOG            NAMESPACE
DBMS_APPS_UPG_WORKING            W_NAMESPACE
DBMS_UPG_CAT_C0$            C_NAMESPACE
DBMS_UPG_CAT_CS$            C_NAMESPACE
DBMS_UPG_CAT_CT$            C_NAMESPACE
DBMS_UPG_OBJAUTH_C0$            NAMESPACE
DBMS_UPG_OBJAUTH_CS$            NAMESPACE
DBMS_UPG_OBJAUTH_CT$            NAMESPACE
DBMS_UPG_RLS_C0$            NAMESPACE
DBMS_UPG_RLS_CS$            NAMESPACE
DBMS_UPG_RLS_CT$            NAMESPACE
EXU81OBJ                 NAMESPACE
EXU9ACTIONOBJ                 NAMESPACE
EXU9PCT                  NAMESPACE
GLOBAL_CONTEXT                 NAMESPACE
GV_$CONTEXT                 NAMESPACE
GV_$DB_OBJECT_CACHE            NAMESPACE
GV_$GLOBALCONTEXT            NAMESPACE
GV_$JAVA_LIBRARY_CACHE_MEMORY  LC_NAMESPACE
GV_$LIBRARYCACHE            NAMESPACE
GV_$LIBRARY_CACHE_MEMORY       LC_NAMESPACE
KU$_INC_TYPE_VIEW            NAMESPACE
KU$_JAVA_OBJNUM_VIEW            NAMESPACE
KU$_PROCOBJ_OBJNUM_VIEW        NAMESPACE
KU$_SCHEMAOBJ_VIEW            NAMESPACE
KU$_VIEW_OBJNUM_VIEW            NAMESPACE
LOGMNRG_OBJ$                 NAMESPACE
LOGMNRT_OBJ$                 NAMESPACE
LOGMNR_OBJ$                 NAMESPACE
OBJ$                      NAMESPACE
REG$                      NAMESPACE
REGISTRY$                 NAMESPACE
REGISTRY$HISTORY            NAMESPACE
REGISTRY$LOG                 NAMESPACE
REGISTRY$SCHEMAS            NAMESPACE
SESSION_CONTEXT             NAMESPACE
TTS_OBJ_VIEW                 NAMESPACE
USER_POLICY_CONTEXTS            NAMESPACE
USER_REGISTRY                 NAMESPACE
UTL_RECOMP_ALL_OBJECTS            NAMESPACE
UTL_RECOMP_INVALID_ALL            NAMESPACE
UTL_RECOMP_INVALID_JAVA_SYN    NAMESPACE
UTL_RECOMP_INVALID_PARALLEL    NAMESPACE
UTL_RECOMP_INVALID_SEQ            NAMESPACE
UTL_RECOMP_SORTED            NAMESPACE
V_$CONTEXT                 NAMESPACE
V_$DB_OBJECT_CACHE            NAMESPACE
V_$GLOBALCONTEXT            NAMESPACE
V_$JAVA_LIBRARY_CACHE_MEMORY   LC_NAMESPACE
V_$LIBRARYCACHE             NAMESPACE
V_$LIBRARY_CACHE_MEMORY        LC_NAMESPACE
WRH$_LIBRARYCACHE            NAMESPACE
61 rows selected.Answer is contained in above clue

Similar Messages

  • Need to reduce no of calling same  function  in update statment

      update tab1 set
        col1  =  FN1(a),
        col2  =  FN2(a),
        col3  =  FN3( FN1(a), FN2(a) , c )
    here  FN1 and FN2 is called two time .. or only once ,, ??
    if 2 time then how to make it once call only ...
    can we change it like this
         update tab1 set
        col1  =  FN1(a),
        col2  =  FN2(a),
        col3  =  FN3( col1  , col2   , c )
    both r same or differnt ..??Edited by: user12108669 on Dec 11, 2009 4:31 AM

    Hi,
    Those are very good questions.
    Riedelme has told you who is the best person to answer thiose questions: you.
    To see how ofte a function is called, you can have it display something (using dmbs_output) or increment a sequence, package variable or SYS_CONTEXT attribute.
    CREATE TABLE tab1
    (        a      NUMBER
    ,        col1    NUMBER
    ,            col2      NUMBER
    ,      col3      NUMBER
    ,      c      NUMBER
    INSERT INTO tab1 (a) VALUES (1);
    INSERT INTO tab1 (a) VALUES (2);
    INSERT INTO tab1 (a) VALUES (3);
    CREATE SEQUENCE      fn1_seq    START WITH 1;
    CREATE SEQUENCE      fn2_seq    START WITH 1001;
    CREATE OR REPLACE FUNCTION      fn1
    (      in_num       IN        NUMBER
    RETURN NUMBER
    IS
         seq_val     NUMBER;
    BEGIN
         SELECT  fn1_seq.NEXTVAL
         INTO     seq_val
         FROM     dual;
         RETURN     seq_val;
    END     fn1;
    SHOW ERRORS
    CREATE OR REPLACE FUNCTION     fn2
    (      in_num       IN        NUMBER
    RETURN NUMBER
    IS
         seq_val     NUMBER;
    BEGIN
         SELECT  fn2_seq.NEXTVAL
         INTO     seq_val
         FROM     dual;
         RETURN     seq_val;
    END     fn2;
    SHOW ERRORS
    CREATE OR REPLACE FUNCTION     fn3
    (      in_x       NUMBER
    ,      in_y       NUMBER
    ,      in_z       NUMBER
    RETURN     NUMBER
    IS
    BEGIN
         RETURN  in_x + in_y;
    END     fn3;
    SHOW ERRORSTo avoid calling the functions repeatedly, you can use MERGE instead of UPDATE, like this:
    MERGE INTO  tab1    dst
    USING  (
           SELECT  a
           ,       fn1 (a)     AS fn1_a
           ,       fn2 (1)     AS fn2_a
           ,       c
           FROM    tab1
           )         src
    ON     (src.a         = dst.a)
    WHEN MATCHED THEN UPDATE
    SET  dst.col1       = src.fn1_a
    ,    dst.col2       = src.fn2_a
    ,    dst.col3       = fn3 (src.fn1_a, src.fn2_a, src.c)
    SELECT       *
    FROM       tab1
    ORDER BY  a;Output:
    .        A       COL1       COL2       COL3          C
             1          1       1001       1002
             2          2       1002       1004
             3          3       1003       1006

  • Isdba attribute for sys_context

    The isdba attribute always returns a value of
    FALSE, even when the dba role is enabled. Is there a known problem with it or is there some nuance I'm unaware of? Thanks.

    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/functions150.htm#sthref1809

  • How to see all attributes of a particular namespace in a context

    I can see the value of a attribute for a partiuclar namespace using following query
    select sys_context ('USERENV','TERMINAL') FROM DUAL;
    select sys_context ('USERENV','DB_NAME') FROM DUAL;
    but, how to find out all attributes for a given namesapce like here 'USERENV' or any user defined namespace. Is there any query or dba view which will list all attributes for a given namespace
    Thanks for your help

    This is table called DICT, where you can find many other things.
    SS
    SQL> select * from dict where table_name like '%CONTEX%'
      2  /
    TABLE_NAME
    COMMENTS
    ALL_CONTEXT
    Description of all active context namespaces under the current session
    USER_EVALUATION_CONTEXTS
    rule evaluation contexts owned by user
    ALL_EVALUATION_CONTEXTS
    rule evaluation contexts seen by user
    USER_EVALUATION_CONTEXT_TABLES
    tables in user rule evaluation contexts
    ALL_EVALUATION_CONTEXT_TABLES
    tables in all rule evaluation contexts seen by the user
    USER_EVALUATION_CONTEXT_VARS
    variables in user rule evaluation contexts
    ALL_EVALUATION_CONTEXT_VARS
    variables in all rule evaluation contexts seen by the user
    ALL_POLICY_CONTEXTS
    All policy driving context defined for all synonyms, tables, or views accessable to the user
    USER_POLICY_CONTEXTS
    All policy driving context defined for synonyms, tables, or views in current schema
    9 rows selected.

  • Oracle Discoverer integrate with SSO, SYS_CONTEXT function does not work?

    Here is the summary of steps I have already completed:
    1. Following the Discoverer configuration guide, I modified mod_osso.conf file.
    2. So right now, when I typed
    http:\\host: 7778\discoverer\plus, it will direct me to the single-sign-on page.
    3. Then I login as "orcladmin" (a user in OID), and I will be direct to the standard Connection page.
    4. And I already create a private connection using database user "EDW".
    5. So when I click the private connection, I can run the workbook and see all the data. So far so good.
    6. Now is the problem, since I am going to use VDP to restrict the data that SSO user can see. (for example, "orcladmin" can only see school1 data, but not school2 data) So I need to use some sort of function to return value "orcladmin" in the database so that I can use it to create security context and policy (for example, when "orcladmin" login, the SQL query discoverer generated will have a where clause school_id=1). And according to the configuration guide, if I run the following SQL, I should get back "orcladmin":
    Select SYS_CONTEXT('USERENV', 'CLIENT_IDENTIFIER') from dual;
    But instead, I got null. What is the problem? BTW, when I ran the above SQL, I login into the database as EDWPRD, who owns all the base tables that underlying all the workbooks.
    Thank you in advance for your help!!
    Ren

    Hi Ren
    When you say that you are testing this in SQL presumably you are doing this in SQL Plus. If this is true then the answer you got back is correct because connections to SQL Plus do not use the App Server SSO login and so the CLIENT_IDENTIFIER attribute will always return NULL. Try switching this to OS_USER and you should see the user name from the operating system. Switching this to SESSION_USER will tell you the database user name, while switching it to TERMINAL will tell you the name of the machine that you are logged on, and so on.
    For a full list of attribute values to SYS_CONTEXT take a look here:
    http://www.psoug.org/reference/sys_context.html
    To take advantage of any of this inside Discoverer you would have to register the PL/SQL SYS_CONTEXT function with Discoverer.
    Hope this helps
    Regards
    Michael

  • How to use SYS_CONTEXT Function/procedures

    Hello, I am not familiar with this function and am trying to get a better understanding of how it works and how to find WHERE the data is being stored.
    I understand that this is an Oracle Function as well as how its parameters are used, but I don't understand where the data is stored:
    Example (my client created this query - in part):
    SELECT
    COLUMN1,
    COLUMN 2
    from TABLEA A
    where a.company = sys_context('USER_CONTEXT','SL_OJSQ_COMP_CODE')
    and a.job_code = sys_context('USER_CONTEXT','SL_OJSQ_JOB_CODE')
    and a.phase = sys_context('USER_CONTEXT','SL_OJSQ_PHS_CODE')
    and a.category = nvl(sys_context('USER_CONTEXT','SL_OJSQ_CAT_CODE'), a.category)
    I am trying to figure out how the JOIN is being used. How can I find the table/data for sys_context('USER_CONTEXT','SL_OJSQ_COMP_CODE') or maybe it is not a table/data but a package...?
    Any guidance is appreciated,

    Hello, I am not familiar with this function and am
    trying to get a better understanding of how it works
    and how to find WHERE the data is being stored.
    I understand that this is an Oracle Function as well
    as how its parameters are used, but I don't
    understand where the data is stored:
    Example (my client created this query - in part):
    SELECT
    COLUMN1,
    COLUMN 2
    from TABLEA A
    where a.company =
    sys_context('USER_CONTEXT','SL_OJSQ_COMP_CODE')
    and a.job_code =
    sys_context('USER_CONTEXT','SL_OJSQ_JOB_CODE')
    and a.phase =
    sys_context('USER_CONTEXT','SL_OJSQ_PHS_CODE')
    and a.category =
    nvl(sys_context('USER_CONTEXT','SL_OJSQ_CAT_CODE'),
    a.category)
    I am trying to figure out how the JOIN is being used.
    How can I find the table/data for
    sys_context('USER_CONTEXT','SL_OJSQ_COMP_CODE') or
    maybe it is not a table/data but a package...?
    Any guidance is appreciated,There is no JOIN in your statement.
    USER_CONTEXT is the name of an application context which is already created and should be initialized in your session. It is simply a set of attributes and your query shows some of them : SL_OJSQ_COMP_CODE, SL_OJSQ_CAT_CODE, ...
    you can query the view session_context to see attributes and values of contexts initialized in your session

  • Problem with SYS_CONTEXT in WHERE clause in 10g

    I am running the following SELECT statement in 9i and 10g
    SELECT COUNT(*)
    FROM mapinfo.mapinfo_mapcatalog
    WHERE tablename IN ('ESU_GRAPHICS', 'STREETS', 'ASD_STREETS', 'NSG_ARCHIVE_ESU_GRAPHICS')
    AND ownername = sys_context('USERENV','CURRENT_SCHEMA');
    When running in 9i it returns 4, the correct answer, but in 10g it always returns 0. I have tried populating a variable with the result from sys_context('USERENV','CURRENT_SCHEMA') such as:
    SELECT sys_context('USERENV','CURRENT_SCHEMA')
    INTO currentschema
    FROM dual;
    I have checked the variable and it is giving me the correct result in 10g, but I still get 0 returned from the select statement.
    What am I missing to get this working in 10g?
    Cheers
    Sean

    - Does the value for CURRENT_SCHEMA actually match
    the ownername column for the tables in your IN
    clause? Yes
    >
    - Is there anything different between 9i and 10g?
    E.g. did you have any fine grained access control?Not that I know of, but I am not a DBA so I could not say for sure.
    Were you setting CURRENT_SCHEMA with an ALTER SESSION
    statement in 9i that you have missed in your 10g
    environment?No we do not use any ALTER SESSION statements.
    >
    - What do you get if you run the following?
    select user from dual;
    select sys_context('USERENV','CURRENT_SCHEMA') from
    dual;
    Exactly the same result
    >
    - What do you get if you run the following?
    SELECT tablename, ownername FROM
    mapinfo.mapinfo_mapcatalog
    WHERE tablename IN ('ESU_GRAPHICS', 'STREETS',
    'ASD_STREETS', 'NSG_ARCHIVE_ESU_GRAPHICS');
    380 rows of data including the 4 that I am interested in
    - Can you also show the value of your variable when
    you use a SELECT INTO in PL/SQL... Were you using
    uppercase for USERENV and CURRENT_SCHEMA in PL/SQL
    (there was an incorrect results bug when using
    lowercase attributes in PL/SQL SYS_CONTEXT calls)?I am showing the value of the variable and it is holding the correct value, and yes I am using uppercase USERENV and CURRENT_SCHEMA.
    After more investigation it looks like it is not SYS_CONTEXT, it is using a variable in the WHERE clause. If I set the variable to a hard coded value I still get the same result. If I replace the variable for a hard-coded string in the WHERE clause I get the correct result.

  • Sys_context not working from APEX application / environment

    I am struggling to retrieve a user-defined context value using sys_context(...) from APEX application / environment
    I have created a global context to be used as a storage mechanism for log severity to be recorded.
    CREATE OR REPLACE CONTEXT PA_LOGGER_CTX USING PA_LOGGER ACCESSED GLOBALLY;It is seeded through a function pa_logger.set_severity(1) within the package pa_logger through (excerpt):
      dbms_session.set_context(c_ctx_context_label, c_ctx_severity_label, TO_CHAR(p_severity_in));
      with:
      c_ctx_context_label     CONSTANT NVARCHAR2(16) := 'PA_LOGGER_CTX';
      c_ctx_severity_label    CONSTANT NVARCHAR2(8) := 'SEVERITY';
      p_severity_in   IN  PLS_INTEGERusing the following from sqlplus, other DB-tools, works as expected:
    -- setting it
    BEGIN
      pa_logger.set_severity(2);
    END;
    -- displaying it
    SELECT sys_context('PA_LOGGER_CTX', 'SEVERITY') FROM DUAL;returns 2
    This works from different sessions, different users ... no problem.
    Using it from within an APEX (accessed via embedded gateway/XE11.2 or OHS/11.2.0.2.0 ) application or even from the "SQL Commands" from the APEX Workspace returns a NULL value for :
    SELECT sys_context('PA_LOGGER_CTX', 'SEVERITY') FROM DUAL;And
       SELECT value  FROM GLOBAL_CONTEXT WHERE NAMESPACE='PA_LOGGER_CTX' and ATTRIBUTE = 'SEVERITY';returns the right value, which obviously defies the purpose of using the CONTEXT.
    It is as well possible to set the CONTEXT to a different value, which is picked up outside APEX, but even so using sys_context does not work, always returning NULL
    As a note aside: using sys_context with a standard CONTEXT, e.g. SELECT sys_context('USERENV', 'NLS_DATE_FORMAT') from DUAL works without any problems.
    I guess I have a conceptual break somewhere. Does this have to do with the APEX user used, wrapping within the APEX environment, the way the context is defined ....
    Any help is appreciated.
    Many thanks,
    - Thomas

    Hi Rod,
    Thanks for the time to answer. Meanwhile I found some more hints on the subject (Retrieve values from my own global context in Apex and I do now understand the concept.
    I understand that I can even clear the specific CLIENT_IDENTIFIER by issuing a "dbms_session.clear_identifier()", which then subsequently works
    Looking at the CLIENT_IDENTIFIER as set by APEX it is "<apex_login_user><apex_session>";
    I understand it is set for every DISPLAY-SUBMIT it is reset by the APEX framework.
    Hence it is not sufficient to set it for a user session; it needs to be changed for every display-submit. I can achieve this through application processes, but I am really reluctant to do so, because I do not know, if APEX relies on the CLIENT_IDENTIFIER to be set the way it is done. I suspect a purpose behind this, causing me problems elsewhere. I post this as a seprate question as this question has been answered.
    On to your point about: Using a table variable. This is the way it works currently, but allegedly using the CONTEXT would give us for the logging configuration a performance gain of about 1 dimension..... but unfortunately other problems..
    Thanks!
    - Thomas

  • Sys_context issue

    I need a sys_context which can be accessed globally across the instance.
    And this does just that:
    dbms_session.set_context( namespace  => 'my_ctx',  attribute  => 'key', value  => theKey)Every session can reterive the value with:
    sys_context('my_ctx', 'key') The problems comes after this:
      dbms_session.set_identifier( sessionId );Once this is issued, then getting the context stops working:
    sys_context('my_ctx', 'key') I understand why and can overcome it by resetting the context with the sessionId:
    dbms_session.set_context (  namespace  => 'my_ctx',   attribute  => 'key',  value  => theKey, client_id  => sessionId)Problem is I have some variables which are common to all and I’d rather not need to reset each one after set_identifier() is issued.
    Is there a way to grab the key value which is not associated with a sessionId?
    I've tried creating a 2nd sys_context for these instance wide globals and it behaves the same way.
    I'd like to solve this as a sys_context and not as global procedure variable. I'd like something which will not switch contexts when being used in a sql statement. Do I have to compromise and use a global temp table? The key value will not change...I have not tired a deterministic function or an authId function.....hummm, authId might work...wonder if that would cause a context switch? I'll try it now.

    sb92075 wrote:
    With any other exception code silently terminates just like normal successful completion.Really?
    SQL> declare
      2      kv varchar2(64);
      3  begin
      4      select  value
      5        into  kv
      6        from  v$parameter;
      7    exception
      8      when no_data_found then null;
      9  end;
    10  /
    declare
    ERROR at line 1:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 4
    SQL> declare
      2      kv varchar2(1);
      3  begin
      4      select  name
      5        into  kv
      6        from  v$parameter
      7        where rownum = 1;
      8    exception
      9      when no_data_found then null;
    10  end;
    11  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 4
    SQL>SY.

  • SYS_CONTEXT in JDeveloper

    I use sys_context and fine grain control in our application. However, sys_context doesn't seem to work fine for application running Java. My procedure to set predicate is as following:
    /* To set select predicate. */
    CREATE OR REPLACE
    FUNCTION SELECT_POLICY
    (P_OWNER VARCHAR2
    ,P_OBJECTNAME VARCHAR2
    RETURN VARCHAR2
    IS
    -- Program Data
    V_PREDICATE VARCHAR2(2000);
    -- PL/SQL Block
    BEGIN --Begin of function
    IF (sys_context('Apps','Responsibility')='Client') THEN
    v_predicate :='CLIENT_ID=sys_context(''Apps'',''Client'')';
    ELSE
    v_predicate := '0=1';
    END IF;
    RETURN(v_predicate);
    END; -- End of function;
    The function work fine in SQL* Plus, but in JSP application written using JDeveloper, the result set:
    rs = dbConnection.executeQuery("select client_id from clients");
    rs.next();
    always return no row.
    However, if we use:
    rs = dbConnection.executeQuery("select client_id from clients");
    rs = dbConnection.executeQuery("select client_id from clients");
    rs.next();
    then the result set woulc obtain correct result.
    It seems that the sys_context function doesn't work in the first query.
    I make us very inconvinient in codding because every query must be execute twice.
    If you have any idea on this, please give me a hand.
    Thanks and regards,
    Hien.
    null

    - Does the value for CURRENT_SCHEMA actually match
    the ownername column for the tables in your IN
    clause? Yes
    >
    - Is there anything different between 9i and 10g?
    E.g. did you have any fine grained access control?Not that I know of, but I am not a DBA so I could not say for sure.
    Were you setting CURRENT_SCHEMA with an ALTER SESSION
    statement in 9i that you have missed in your 10g
    environment?No we do not use any ALTER SESSION statements.
    >
    - What do you get if you run the following?
    select user from dual;
    select sys_context('USERENV','CURRENT_SCHEMA') from
    dual;
    Exactly the same result
    >
    - What do you get if you run the following?
    SELECT tablename, ownername FROM
    mapinfo.mapinfo_mapcatalog
    WHERE tablename IN ('ESU_GRAPHICS', 'STREETS',
    'ASD_STREETS', 'NSG_ARCHIVE_ESU_GRAPHICS');
    380 rows of data including the 4 that I am interested in
    - Can you also show the value of your variable when
    you use a SELECT INTO in PL/SQL... Were you using
    uppercase for USERENV and CURRENT_SCHEMA in PL/SQL
    (there was an incorrect results bug when using
    lowercase attributes in PL/SQL SYS_CONTEXT calls)?I am showing the value of the variable and it is holding the correct value, and yes I am using uppercase USERENV and CURRENT_SCHEMA.
    After more investigation it looks like it is not SYS_CONTEXT, it is using a variable in the WHERE clause. If I set the variable to a hard coded value I still get the same result. If I replace the variable for a hard-coded string in the WHERE clause I get the correct result.

  • How to get sys_context function

    hi,
    i m working on oracle 10g but i dont hav sys_context function on my sys user.
    how can i hav it & from where.
    can i create this kinda function on my oracle 9i ?
    thxs

    i m working on oracle 10g but i dont hav sys_context function on my sys user.How do you know its not there?
    Although this article is for Oracle 11g, but most of the attributes can also be used in Oracle 9i and 10g.
    http://www.psoug.org/reference/sys_context.html
    Execute the following command and paste the output on this thread.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> SELECT sys_context('USERENV', 'CURRENT_SCHEMA') FROM dual;
    SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
    TEST
    SQL>

  • SYS_CONTEXT('WEBDB_VPD_CTX','SUBSCRIBER_ID') does not work

    Hi all,
    In Portal30 tables, the column "SUBSCRIBER_ID NUMBER DEFAULT SYS_CONTEXT('WEBDB_VPD_CTX','SUBSCRIBER_ID') NOT NULL" which will be populated with SYS_CONTEXT function does not work while installing Oracle9iAS Portal30 repository.
    All tables that reference this column are empty.
    Any ideas please ?
    Thanks.
    Abdel

    Hi Ren
    When you say that you are testing this in SQL presumably you are doing this in SQL Plus. If this is true then the answer you got back is correct because connections to SQL Plus do not use the App Server SSO login and so the CLIENT_IDENTIFIER attribute will always return NULL. Try switching this to OS_USER and you should see the user name from the operating system. Switching this to SESSION_USER will tell you the database user name, while switching it to TERMINAL will tell you the name of the machine that you are logged on, and so on.
    For a full list of attribute values to SYS_CONTEXT take a look here:
    http://www.psoug.org/reference/sys_context.html
    To take advantage of any of this inside Discoverer you would have to register the PL/SQL SYS_CONTEXT function with Discoverer.
    Hope this helps
    Regards
    Michael

  • SYS_CONTEXT

    Can any one explain me what below code do how i can check context values.
    c_working_airport_predicate CONSTANT VARCHAR2 (500)
    := ' SYS_CONTEXT ('''
    || c_session_context
    || ''','''
    || c_airport
    || ''') IN '
    || '(pri_working_airport_code ,'
    || ' sec_working_airport_code)';
    Thanks,

    Seems like some kind of dynamic security predicate that is applied at run-time.
    A context is a namespace in a session, containing name-value pairs. E.g. I can create a namespace called EMPDATA. As part of the logon processing of the session, this context gets a name-value pair called ROLE, indicating the session user's role as per HR data. The name-value pair could for example be ROLE=SUPERVISOR.
    To view the value from this namespace for the attribute, role:
    SYS_CONTEXT( 'EMPDATA', 'ROLE' )
    Name values are typically compared with other values (from a table for example) at runtime - in order to make a query succeed or fail, or limit the data output of that query. For example, the above sys context function can be used to limit a query's output to rows only a user with supervisor access can see,
    select * from some_table where col123 = SYS_CONTEXT( 'EMPDATA', 'ROLE' )
    And that is what the code snippet you post does - dynamically. It gets the value from a namespace (value is in <i>c_session_context</i>) for attribute identified by c_airport. it then uses it in a predicate.
    What is unusual is that the context's name is variable, and that the attribute name is also variable. This points to a possible flawed implementation/solution.

  • Get Attribute values from a page and procedure exception handling?

    Hi All,
    I have created new page with two input attributes not based on any VO. This page is created to capture two values and pass these to an AM method upon pressing OK button. The method in AM will call a procedure with two in parameter expecting the two values captured from the above said page.
    I have two questions, first one how to capture the values entered by the page in the controller class and advises me how to handle exceptions when my procedure fails.
    I can not use something like this since this page is not based on a VO
    String fromName = (String)vo.getCurrentRow().getAttribute("FromName");
    Do I have to create a dummy VO like select '' name1, '' name2 from dual?
    Thanks for the help.

    Hi,
    Actually you can capture the parameters on the page like this way
    String test = (String)pageContext.getParameter("id of the text input bean");
    Now in procedure you can take an out parameter which stores the error messages on exception
    and return that out parameter in java.
    and then you can throw exception on page using OAException class.
    Thanks
    Gaurav Sharma

  • Encrypted="true" does not encrypt MBean attribute

    Hi,
    I have developed a Custom Weblogic Security Service Provider. I have also created
    an MBean
    to manage my provider. One of my MBean attributes is as follows:
    <MBeanAttribute
    Name = "JdbcPassword"
    DisplayMessage = "The JDBC Password to the security database"
    Type = "java.lang.String"
    Writeable = "true"
    Encrypted = "true"
    Default = ""password""
    />
    I have specified Encryped="true" above, however, the value I put in the Weblogic
    Console
    is still seen in cleartext in the config.xml. Why isnt it being encrypted? Or
    do I misunderstand
    the purpose of the Encrypted attribute?
    Thanks,
    Proneel.

    "Proneel Guptan" <[email protected]> wrote:
    >
    Hi,
    I have developed a Custom Weblogic Security Service Provider. I have
    also created
    an MBean
    to manage my provider. One of my MBean attributes is as follows:
    <MBeanAttribute
    Name = "JdbcPassword"
    DisplayMessage = "The JDBC Password to the security database"
    Type = "java.lang.String"
    Writeable = "true"
    Encrypted = "true"
    Default = ""password""
    />
    I have specified Encryped="true" above, however, the value I put in the
    Weblogic
    Console
    is still seen in cleartext in the config.xml. Why isnt it being encrypted?
    Or
    do I misunderstand
    the purpose of the Encrypted attribute?
    Thanks,
    Proneel.Hi Proneel,
    Could you please tell me what version of Weblogic are you using?
    Thanks,
    Carmen

Maybe you are looking for

  • I lose signal when I turn 3G on

    I lose signal when I turn 3G on

  • Migration doubt (Very Urgent)

    Hi we migrated FR and Webanalysis reports and users from 7.x to 9.3.1, after migrating to 9.3.1 we deleted all migrated databases and some users and some Reports in 9.3.1,,,, will this effect old reoports version 7.x, bcoz after deleting users, repor

  • TS4000 How to stop email notifications of calendar changes

    Every time I edit an event on a shared icloud calendar it sends emails notifying me of the change.  How do I stop these?

  • Opening Images from another converter in ACR

    I save the output from a RAW converter like DXO as a dng. It opens in ACR. What would I expect to see?

  • Why are URL Parameters null

    Hi: I thought this was a simple task, but it's not to me. I have a HTML region with two select lists and one button. The select lists are P103_SPORT and P103_YEAR. I want the user to make choices from the select lists and click the button to pass the