SSO  Using Sys_Context function in Discoverer to validate

We are using a calculation which uses the function SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') in 10G, we are now upgrading to 11G and this function does not work. Can someone direct me to what action I need to change 'Client_Identifier" to or how to make this work in 11G

Hello
Are you talking about upgrading Discoverer from 10g to 11g or the database from 10g to 11g?
Also, when you say "it does not work" can you be more specific? Do you get any error messages and have you been able to test this using something like TOAD?
Perhaps it is as simple as a missing grant to the Discoverer user? Here's the script I use, perhaps you can take a look and see if your users have the same privileges.
accept username prompt'Enter Username: '
accept pword prompt'Enter Password: '
create user &username identified by &password;
grant connect, resource to &&username;
grant analyze any to &&username;
grant create procedure, create sequence to &&username;
grant create session, create table, create view to &&username;
grant execute any procedure to &&username;
grant global query rewrite to &&username;
grant select any table, unlimited tablespace to &&username;
grant execute on sys.dbms_job to &&username;
grant select on sys.v_$parameter to &&username;
Does this help?
Michael

Similar Messages

  • 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

  • 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 Pl/Sql function in Discoverer report

    Hi Everybody,
    Would you be able to provide a workflow/guidance how to use sql function in Discoverer right from creating the function using PLSQL Developer.
    (I am new to Oracle environment... prev. worked as analyst with Microsoft Access... took PL/Sql class in school a few years ago)
    We are using Discoverer Desktop.
    a) Just emailed dba for permission to create pl/sql function.
    b) Recently got Discoverer Administrator installed on my pc.
    can you pls add to the list:
    c)....
    d)....
    etc.?
    tx for your help, sandra

    Hi Kranthi,
    Thx for your warm words....
    The links you provided are great! Thx soooo much!
    Thanks to you and the rest of forum members, am able to use what you've all taught me
    with other Discoverer reports.... so i was able to do more on my own....
    About a month ago, I got access to Discoverer Admin, and was able to paste SQL to create a custom folder.
    Then i joined the custom folder to an existing baseline folder.
    I have found that sometimes when I use calc within a calc when the calcs use analytic functions, that Discoverer
    just displays null in the column. I thought that maybe instead I could create my own function as a work-around.
    I wrote IT for permissions to create views, functions etc. Hopefully, they'll approve and can move toward learning
    pl/sql functions for Discoverer.
    tx again, sandra

  • Query regarding sys_context function

    Hello
    I have created report with custom folder and parameters are passed using sys_context function. I have few queries regarding this.
    1) How to see actual sql query executed by report. I can see from discover administorator - sql inspector. But it is not showing which is value passed for sys_context parameter. If want to see query with full parameter then what to do? I have also tried to look it from toad - session browser, there also it is not showing parameter value.
    2) If anything special needed to manage sys_context variable. i.e i have executed report with parameter 1 = A and now next time executed with parameter 1 =b. Will it takes proper value, i mean sys_context parameter will be refreshed itself, or need to do somehting..
    Please help me out.
    Thanks in advance

    Hi,
    How to see actual sql query executed by reportSYS_CONTEXT returns values from a namespace. Normally you create a local namespace and values in this namespace can only be retrieved by the session. So there is no way to see the values for a Discoverer session from Toad. Normally, one would create a Discoverer report that returns all the values in your namespace that you can use for debugging.
    If anything special needed to manage sys_context variableNo, once you have set the context in the namespace using DBMS_SESSION.set_context then it is there for the rest of the session.
    Rod West

  • Use of DECODE function in Discoverer 3.1

    Hi all,
    Is there any better way of using DECODE in Discoverer 3.1, i dont want to use that function in my Discoverer User edition or Admin ed.
    Many of my queries use the DECODE function.
    Your help is greatly appreciated.

    If you created an instance of your time class that you called myTime
    var myTime:Time = new Time(15,15,0);
    and later you wanted another instance with the same time you could write
    var myTime2:Time = myTime.clone()
    It is just there for convienience and doesn't have anything much to do with MVC

  • Passing parameter into select statement by using function in discoverer

    I have created two functions in database named Period_in and Period_out and a global variable  g_period_name
    I have called Period_out function in VIEW(Select statement where condition).
    I have registered Period_in function in discoverer admin then created calculation (called Period_in(:input parameter))in discoverer plus.
    My expectation is user will enter period name and that will hit Period_in function and returns 1 and stores entered period name in g_period_name at runtime. then VIEW will executed and fetches data.
    But i am getting no data found.
    Problem is 2 functions running at the same time in select statement. Please help me to overcome this. Thanks in advance
    FUNCTION period_in (p_period VARCHAR2)
          RETURN NUMBER
       AS
       BEGIN
          g_period_name := p_period;
          RETURN 1;
       END period_in;
       FUNCTION period_out
          RETURN VARCHAR2
       AS
       BEGIN
          RETURN g_period_name;
       END period_out;

    You can use this code: 
    WITH cte
    AS ( SELECT EmpID ,
    EmpName ,
    [dbo].[udf_testFunction](EmpID) AS testfunctionvalue
    FROM #Temp
    SELECT EmpID ,
    EmpName ,
    testfunctionvalue ,
    testfunctionvalue * EmpID ,
    testfunctionvalue + 2
    FROM cte
    But using scalar functions in select clause can hurt the performance. Please see this link: 
    SQL Server Scalar User Defined Function Performance
    T-SQL Articles
    T-SQL e-book by TechNet Wiki Community
    T-SQL blog

  • How to use pl/sql procedure or function as part of validate the entity obj?

    Hi,
    we are migrating from oracle forms to jdeveloper 11g.
    I have a req. that,i wanted to use oracle pl/sql procedure to validate a attribute in an entity created with ADF BC?
    Is it possible to implement this?
    And how to show the error message from pl/sql procedure?
    Regards
    Murali.

    Hi,
    It is possible by using a method validator for the entity attribute.
    Create a transient attribute 'X'.
    In the validation section of the attribute to be validate, choose method validator.
    In the Error Message tab set error message as {0}.
    Below the value for tokentoken should source.X (X is the transient attribute name)
    In the java code of method validator, call the stored procedure and set the value of transient attribute X with the error message from SP.
    Use setX("ErrorMessage").
    Regards,
    Srinidhi

  • SSO Using SAP GUI Logon

    Here's my question gurus...
    Is there a way to enable SSO so that, after a user authenticates themselves within the portal, go back to the standard Windows SAP GUI Logon(pad) select the system enter the desired client and logon with having to provide a username and password? The credentials would be passed from the portal to the connected backend system.
    We currently have a slew of systems and there corresponding clients it would be awesome to sync all systems with the portal and only have to administer passwords from and for the portal. Consequently the portal would handle the rest. The folks here have not fully embraced using the html version of the gui hence the reason for this posting.

    Hi Mike,
       If i understood your requirement, You want to use SAP functionality form portal.
      You Can do that, by creating a SAP System from your portal and you can call any Transactions from the portal it self, by using that System.
      How to create System and User mapping for that System you can find in the below link. It may helpful to you. Ping me back, if you have any doubts.
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/b5f9c2ea65c242957ee504ca4a37a9/frameset.htm
    Transaction Iview with integrated ITS.
    Please correct me, if i am wrong.
    Regards,
    Sridhar

  • Implementing SSO using Microsoft IIS with OBIEE 10.1.3.3.2

    We are running OBIEE 10.1.3.3.2 on Windows 2003 server and want to impement Single-Sign-On (SSO) using Microsoft IIS. We set up the SSO according to chapter #8 of the deployment guide but it doesn't work :when opening the web login pages of the OBI application it still ask the user for authentication.
    Also, according to the installation guide the SSO feature is deployed when chosing "Advanced installation type" during the installation. This advanced installation type requires the Oracle Application server. We have not installed Oracle Application server in our environment, and we chose "Basic" installation.
    Is the SSO functionality available without Oracle Application server? What are the steps to setup SSO in our environment?

    Hi,
    I'm experiencing the same issue with IIS. Did you find any resolution in the meanwhile?
    Please let me know...
    Thanks a lot,
    GL

  • How to use DECODE function in Exspression?

    Hi,
    Can we use DECODE in Expression?
    I'm trying to use DECODE function but there is an error during the validation. But when i validate the mapping, it is successfully compiled but it is failed during deployment.
    But if I use CASE instead of DECODE, it works fine.
    Can we use DECODE in OWB???
    Thanks
    Raj

    Hi,
    In OWB 10gR2, if your are using only one DECODE in an expression, it's working. The package will compile when deploying the mapping. OWB will replace the DECODE by a CASE.
    But when you are using nested decode in an expression ( for example : decode(col1, 1, 'M', decode(col2, 'Madame', 'Mme', null)) ) only the first one is replaced by a case at deployment.
    In ROW_BASED mode, text of the expression is used outside of an sql statement and deployment will fails with "PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL statement only."
    If operating mode for the mapping is set to SET_BASED, it's working because the expression is used in an sql statement.
    I have logged a SR in metalink for this issue and a bug is opened (bug 5414112).
    But I agree with you, it's better to use case statement.
    Bernard

  • Importing PL/SQL function in Discoverer Admin

    Gents
    I'm trying to import a PL/SQL function. In fact this functions is in a package.
    When I try to import in Discoverer Admin, I'm not able to see this package and the function.
    It's possible import a function from a package in Discoverer?
    Must a grant some privilege in package or create a synonym?
    Regards
    Honorio

    Hey,
    I have a similar problem.
    I created a PL/SQL Function which i registered in my EUL. Bun when I'm using this function on an item in a custom folder, this custom folder disappeared from my Discoverer Plus list of folders? When I delete the item which uses this function the folder shows up in my Discoverer Plus list of folders.

  • Issue in SYS_CONTEXT function

    Dear Friends,
    I have an issue in SYS_CONTEXT function. If I run the SYS_CONTEXT function SQL query in SQL PLUS and SQL Developer Tool, the values are showing differently in both the tools.
    CASE 1: In SQL Developer Tool,
    SQL> SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') from dual;
    SYS_CONTEXT('USERENV','IP_ADDRESS')
    10.1.118.101
    SQL> SELECT SYS_CONTEXT('USERENV','OS_USER') from dual;
    SYS_CONTEXT('USERENV','OS_USER')
    Administrator
    CASE 2: In SQL * PLUS Tool,
    SQL> SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') from dual;
    SYS_CONTEXT('USERENV','IP_ADDRESS')
    192.168.12.164
    SQL> SELECT SYS_CONTEXT('USERENV','OS_USER') from dual;
    SYS_CONTEXT('USERENV','OS_USER')
    Oracle
    Important Details
    OS Login User: Administrator
    DB Connect User: Oracle
    Server IP Address: 192.168.12.164
    System IP Address: 10.1.118.101
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I am using the same queries in both the tools, but the output is coming differently, Can you help me to solve the issue.
    Thanks

    IP_ADDRESS
    IP address of the machine from which the client is connected. If the client and server are on the same machine and the connection uses IPv6 addressing, then ::1 is returned.

  • OSB11g - using Concatenation function in report key - Xpath

    Hi,
    I am trying to use Concatenation function on Report key Xpath. For that i am using Following Xpath Expressions But this expressions not valid when trying to validate. But same expressions are valid under different scenarios in OSB.
    1.fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
    error msg(when validate):_
    error: XPath expression invalid, not a selection: declare namespace jca = 'http://www.bea.
    com/wli/sb/transports/jca'; declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
    declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms'; declare namespace tp = 'http:
    //www.bea.com/wli/sb/transports'; declare namespace wsa05 = 'http://www.w3.
    org/2005/08/addressing'; declare namespace jejb = 'http://www.bea.com/wli/sb/transports/jejb';
    declare namespace xs = 'http://www.w3.org/2001/XMLSchema'; declare namespace sftp = 'http://www.
    bea.com/wli/sb/transports/sftp'; declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
    declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/'; declare namespace wsu
    = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'; declare
    namespace dsp = 'http://www.bea.com/dsp/transport/sb'; declare namespace ejb = 'http://www.bea.
    com/wli/sb/transports/ejb'; declare namespace bpel = 'http://xmlns.oracle.
    com/Bpel_Actvities/Assign_Activity/BPELProcess'; declare namespace wsa = 'http://schemas.xmlsoap.
    org/ws/2004/08/addressing'; declare namespace bpel-10g = 'http://www.bea.
    com/wli/sb/transports/bpel10g'; declare namespace tuxedo = 'http://www.bea.
    com/wli/sb/transports/tuxedo'; declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
    declare namespace ctx = 'http://www.bea.com/wli/sb/context'; declare namespace fn = 'http://www.w3.
    org/2004/07/xpath-functions'; declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-
    encoding'; declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope'; declare
    namespace fn-bea = 'http://www.bea.com/xquery/xquery-functions'; declare namespace mq = 'http:
    //www.bea.com/wli/sb/transports/mq'; declare namespace ws = 'http://www.bea.
    com/wli/sb/transports/ws'; declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
    declare namespace soa-direct = 'http://www.bea.com/wli/sb/transports/soa'; declare namespace email
    = 'http://www.bea.com/wli/sb/transports/email'; declare namespace sb = 'http://www.bea.
    com/wli/sb/transports/sb'; declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
    declare namespace xsd = 'http://www.w3.org/2001/XMLSchema'; declare namespace soap-enc = 'http:
    //schemas.xmlsoap.org/soap/encoding/'; declare namespace xsi = 'http://www.w3.
    org/2001/XMLSchema-instance'; fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
    2. op:concatenate(./bpel:process/bpel:input, ./bpel:process/bpel:input)
    While using this Xpath expression validation is sucessfull but concatenation operation is not working when checked in the message reports under operations tab.
    Can any one help me on this.
    Thanks in advance.

    can you try assign concatenated value to some xml element first, like
    assign : <value>{fn:concat(a,b)}</value> to e.g. value
    and then report key ./text() in variable $value
    Edited by: AigarsP on Jun 12, 2012 4:12 AM

  • How to use analytical functions inside a mapping

    Hello everybody. Here Isend you a trick that we are using for two years.
    If you want to use a function (for instance :ROW_NUMBER() OVER (PARTITION BY ... ORDER BY ...)) inside a mapping you must create an expression with in the INGRP1 the fields you are going to use in the window function and in the OUTGRP1 the function you want. Create an Out -attribute with the expressión and link it to a distinct operator (using a "distinct" you encapsulte the sql and you will be able to use the function inside a filter - in the where clause.). The distinct can eliminate some register (depends on the function). If you validate the expression an error will appear (don't worry about that, the mapping will be ok).
    But there is a limitation, you will not be able tou sum over, min over, max over (it detect that they are aggregator functions). Other limitation: the debugger doesn't run with this kind of functions.
    Please publish this information on "The Warehouse Builder Utility Exchange". Mi email is [email protected] (if you need more information)

    It is possible to add SUM, MIN, MAX functions also to OWB releases prior to Paris - You have to put them in double quotes - write "MIN" "MAX" "SUM" etc. The rest of the rules (adding cut-off operator after the expression - as DISTINCT, or UNION ALL) is analogical to with ROW_NUMBER()
    That means You can create mapping with following functionality:
    SELECT
    sum (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    writing it this way in OWB:
    SELECT
    "SUM" (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    Regards,
    Martin

Maybe you are looking for