Call to DBMS_SESSION.set_context throws 01031 Insuf. priv. error

DBMS_SESSION.set_context has public synonym and has granted execute to public.
Why do I get insufficient privileges error when it's called from the 10g form or 10g db?

So is this an accurate reflection of how you have this set up?
ME_XE?create procedure my_test
  2  as
  3  begin
  4  dbms_session.set_context('MYCTX', 'VALUE1','HELLO WERLD');
  5  end;
  6  /
Procedure created.
Elapsed: 00:00:08.10
ME_XE?create or replace context myctx using my_test;
Context created.
Elapsed: 00:00:00.26
ME_XE?grant execute on my_test to test;
Grant succeeded.
--logged in as TEST user now
exec tubby.my_test;
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.04
select sys_context('MYCTX','VALUE1') from dual;
SYS_CONTEXT('MYCTX','VALUE1')
HELLO WERLD
1 row selected.

Similar Messages

  • Dbms_session.sset_context throws error

    Hello All Gurus,
    I have created a function
    CREATE OR REPLACE function setCRDContext(iv_data_str VARCHAR2) RETURN INTEGER AS
    lv_error_msg VARCHAR2(200);
    lv_string VARCHAR2(20);
    lv_namespace VARCHAR2(50) := 'Context_Trig_CRD';
    lv_context VARCHAR2(50) := 'Trig_Crd';
    BEGIN
    dbms_session.set_context(lv_namespace,
    lv_context,
    iv_data_str);
    RETURN 1;
    EXCEPTION
    WHEN OTHERS THEN
    lv_error_msg := 'Error: '||SUBSTR(SQLERRM,1,200);
    dbms_session.set_context(lv_namespace,
    lv_context,
    NULL);
    RETURN 0;
    END setCRDContext;
    show errors;
    Create or Replace Context Context_CRD using setcrdcontext;
    grant execute on setcrdcontext to public;
    1 DECLARE
    2 lv_return_value VARCHAR2(10);
    3 l_crd NUMBER;
    4 l_vpd NUMBER;
    5 BEGIN
    6 l_crd := setCRDContext('Y');
    7 --l_vpd := setvpdcontext('DWP');
    8* END;
    SQL> /
    DECLARE
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_SESSION", line 90
    ORA-06512: at "R11_1_DOM_ODS.SETCRDCONTEXT", line 19
    ORA-01031: insufficient privileges
    ORA-06512: at line 6
    But in the same schema I have setvpdcontext function which works fine
    --Create or Replace Context Context_VPD using cis.setVPDContext;
    CREATE OR REPLACE function setVPDContext(iv_data_str VARCHAR2) RETURN INTEGER AS
    lv_error_msg VARCHAR2(200);
    lv_string VARCHAR2(20);
    lv_namespace VARCHAR2(50) := 'Context_VPD';
    lv_context VARCHAR2(50) := 'SYSTEM_IDENTIFIER';
    BEGIN
    IF NVL(TRIM(SYS_CONTEXT('Context_VPD', 'SYSTEM_IDENTIFIER')),'-1') != NVL(TRIM(iv_data_str),'-1') THEN
    dbms_session.set_context(lv_namespace,
    lv_context,
    iv_data_str);
    END IF;
    RETURN 1;
    EXCEPTION
    WHEN OTHERS THEN
    lv_error_msg := 'Error: '||SUBSTR(SQLERRM,1,200);
    dbms_session.set_context(lv_namespace,
    lv_context,
    NULL);
    RETURN 0;
    END setVPDContext;
    show errors;
    SQL> Create or Replace Context Context_VPD using setvpdcontext;
    Context created.
    SQL> grant execute on setvpdcontext to public;
    Grant succeeded.
    SQL> DECLARE
    2 lv_return_value VARCHAR2(10);
    3 l_crd NUMBER;
    4 l_vpd NUMBER;
    5 BEGIN
    6 l_vpd := setvpdcontext('DWP');
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from user_objects where object_type ='CONTEXT';
    no rows selected
    My questions is why setcrdcotext is giving me insufficient privileges and setvpdcontext works fine. Is it that only context is allowed schema?. In user_objects I can't see my context, is their any other data dictionary view to view the details of the context.
    Any help will be highly appreaciated.
    Regards,
    Rashida

    Sorry Rashida, I've misunderstood your code.
    Looking better into your code I notice there's a diffeence between the two procedures.
    In the former:
    CREATE OR REPLACE function setCRDContext(iv_data_str VARCHAR2) RETURN INTEGER AS
    lv_error_msg VARCHAR2(200);
    lv_string VARCHAR2(20);
    lv_namespace VARCHAR2(50) := 'Context_Trig_CRD';
    lv_context VARCHAR2(50) := 'Trig_Crd';
    BEGIN
    dbms_session.set_context(lv_namespace,
    lv_context,
    iv_data_str);
    RETURN 1;
    EXCEPTION
    WHEN OTHERS THEN
    lv_error_msg := 'Error: '||SUBSTR(SQLERRM,1,200);
    dbms_session.set_context(lv_namespace,
    lv_context,
    NULL);
    RETURN 0;
    END setCRDContext;
    /You execute set_context a first time, this raises the exception 1031 and sends you to the exception handler where you execute the set_context again and getting the 1031 error again.
    In the latter (successful) procedure :
    CREATE OR REPLACE function setVPDContext(iv_data_str VARCHAR2) RETURN INTEGER AS
    lv_error_msg VARCHAR2(200);
    lv_string VARCHAR2(20);
    lv_namespace VARCHAR2(50) := 'Context_VPD';
    lv_context VARCHAR2(50) := 'SYSTEM_IDENTIFIER';
    BEGIN
    IF NVL(TRIM(SYS_CONTEXT('Context_VPD', 'SYSTEM_IDENTIFIER')),'-1') != NVL(TRIM(iv_data_str),'-1') THEN
    dbms_session.set_context(lv_namespace,
    lv_context,
    iv_data_str);
    END IF;
    RETURN 1;
    EXCEPTION
    WHEN OTHERS THEN
    lv_error_msg := 'Error: '||SUBSTR(SQLERRM,1,200);
    dbms_session.set_context(lv_namespace,
    lv_context,
    NULL);
    RETURN 0;
    END setVPDContext;
    /You don't execute set_context at all if the condition
    NVL(TRIM(SYS_CONTEXT('Context_VPD', 'SYSTEM_IDENTIFIER')),'-1') != NVL(TRIM(iv_data_str),'-1')evaluates to false. So if the condition it's false your code goes straight to RETURN 1 and exits without errors.
    This can explain the different behaviour.
    To find you error I suggest you to read the following intresting note by Arup Nanda
    >
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_SESSION",
    Note the error, ORA-01031:insufficient privileges, which is actually a little misleading. The user does have the execute privilege on SYS.DBMS_SESSION, but the setting of a context attribute by calling it is illegal and hence the error occurs. However, when the user calls the trusted procedure to set the context attribute:
    SQL> execute set_my_app_ctx ('AAAA')
    PL/SQL procedure successfully completed.
    it is successful. Because the context attributes can be set only through its procedure, it is aptly called the trusted procedure. This is an important property of the application context and will be exploited in FGA.
    The context attribute, once set, can be retrieved by calling the function SYS_CONTEXT. After the context is set in the code above, it can be seen by
    select sys_context('MY_APP_CTX','APP_USERID') from dual;
    which returns the value of the attribute. If the context can be set in a secure manner, it can be used to set the client identifier.
    Based on what we know, a possible solution could look like this:
    The application executes the procedure code that sets the application context automatically to the correct value. In the above example, the context attribute for userid has been used, but another one — such as the role of the user — could have been used. You can define more than one attribute inside a context. The attribute can be used as the enabled role. The trusted procedure can include all types of security checks to make it secure and authentic. If these security checks fail, the desired role is not set. So even if the user can successfully log in using APPUSER account, he will not be able to manipulate data because the appropriate role will not be enabled. Note that the roles must be procedure-authenticated roles, not regular ones. Such roles are created by the command CREATE ROLE <role_name> USING <procedure_name>; and the user enables the role by calling the <procedure_name>, not SET ROLE command.
    This procedure also sets the client identifier; so there is no need to grant execute privileges on dbms_session to public, not even this user. Because the user does not have the privileges to call the API, they cannot set the client identifier directly—rather, it will be set automatically and carried forward to the fine-grained audit trails.
    >
    Max

  • In my dock there was this weird program called "tutorial". While throwing away this program I had to fill in my password. Afterwards I tried to change my password, but my old password doesn't work anymore. Who can help?

    In my dock there was this weird program called "tutorial". While throwing away this program I had to fill in my password. Afterwards I tried to change my password, but my old password doesn't work anymore. Who can help?

    What was this program for, or did you just assume it's something you shouldn't have and therefore arbitrarily decide to "throw it away"? Exactly how did you supposedly throw it away?
    If you didn't change your administrator password, there's no reason it shouldn't work now, so that suggests you did something else, or changed it and then forgot what it was.
    You can't recover that password; you can only change it. To do that, you would need to boot from your Snow Leopard DVD, choose your language, then choose Reset Password from the Utilities menu in the top menu bar.

  • Dbms_session.set_context from JDBC fails mysteriously, how can I trap it ?

    Hi gurus,
    Our ADF application connect via JDBC to Oracle DB and using VPD .
    This is done by executing dbms_session.set_context('vpd_new','loc_code', pLocCode) at the beginning of the session.
    Mysteriously, all loc_code succeed to be set resulting in the VPD is correctly working, EXCEPT for one loc_code, it doesn't work.
    dbms_session.set_context('vpd_new','loc_code', '010') -> works
    dbms_session.set_context('vpd_new','loc_code', '020') -> works
    dbms_session.set_context('vpd_new','loc_code', '030') -> works
    dbms_session.set_context('vpd_new','loc_code', '061') -> DOES NOT work.
    -> and it Seems to use the last value set, i.e : '030'
    Other loc_code also works perfectly.
    how can I know what happen when the application execute : dbms_session.set_context('vpd_new','loc_code', '061')
    Why does it fail ?
    Can I know what command is really sent to the Database ?
    or can it be other reason ?
    Thank you for your help,
    xtanto

    Hi,
    You can use [SQL tracing|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sessio.htm#i1010518] to get what exactly Oracle session is doing.

  • Dbms_session.set_context

    what is the purpose of dbms_session.set_context and what are the parameter of this package procedure???

    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sessio.htm#sthref7010

  • ORA-01031: Insufficient Privs with svrmgrl or DBA Studio. Didnt always happen!

    Hi,
    I'm running Oracle 816 EE on Win2k. All of a sudden, when I log in as svrmgrl and issue: connect internal, I get prompted for a password. I never had to enter a password before! Also, when logging into DBA Studio as system/manager with SYSBDA privs, I get ORA-01031 Insufficient Privs. I never got that error before. I used to be able to log in to DBA Studio and start/shutdown the DB just fine, but now I'm getting locked out for some reason. Aside from recreating a user schema from time to time, I didnt change any system-related info in the DB. Help!
    Rupal

    check these things -
    1) a full import of a database with remote_login_passwordfile=exclusive can cause this problem.
    2) Check your sqlnet.ora file for SQLNET.AUTHENTICATION_SERVICES parameter. Try setting this to (NONE), if that doesn't work, try setting it to (NTS), and if that doesn't work, try commenting it out. A corrupted "sqlnet.ora" file, or one with security options set, will cause a 'connect internal' request to prompt for a password.
    3) Also be sure you have AUTOMATIC_IPC=OFF in the file.
    hope this helps

  • Crystal Report throws Unexpected Database Connector error

    Hi,<br>
    <br>
    We are using Crystal report 2008 CR4E API to implement the crystal report in our application. We use the below code to reset the report data source with our application data source. It works fine for most of the simple queries. But if the query contains any function defined in the SELECT Clause it throws Unexpected Database Connector error. As per the log and analysis we believe the root cause of the exception is it consider that function as column in the table and throws the SQL Exception that "function is Invalid Identifier". Could you please help in resolving this issue?
    <br><br>
    Code:<br><br>
         Tables tables = clientDoc.getDatabaseController().getDatabase().getTables(); <br>
                for(int i = 0;i < tables.size();i++){<br>
                    origTable = tables.getTable(i);<br>
                    if (tableName == null || origTable.getName().equals(tableName)) {<br>
                        newTable = (ITable)origTable.clone(true);<br>
                        newTable.setQualifiedName(origTable.getAlias());<br>
                        connectionInfo = newTable.getConnectionInfo();<br>
                        propertyBag = new PropertyBag();<br>
                        propertyBag.put("Trusted_Connection", params.trustedCon);<br>
                        propertyBag.put("Server Type", params.serverType);<br>
                        propertyBag.put("Use JDBC", params.useJdbc);<br><br>
                        propertyBag.put("Database DLL",params.databaseDLL);<br>
                        propertyBag.put("Connection URL", params.connectionURL);<br>
                        propertyBag.put("Database Class Name", params.dbClassName);<br>
                        connectionInfo.setAttributes(propertyBag);<br>
                        connectionInfo.setUserName(params.userName);<br>
                        connectionInfo.setPassword(params.password);<br>
                        clientDoc.getDatabaseController().setTableLocation(origTable, newTable); // Exception is thrown here<br>
              }                    <br>
         }     <br>
    <br>
    SQL Query : <br><br>
    Select empno, Fun_getEmpAddress(empno) from employee where empno = ?<br><br><br>
    Error Log:<br><br>
    2011-04-26 16:30:41.926 89022900 CrystalReportParms_jsp._jspService(368) Error while generating crystal report<br>
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2285)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2305)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:737)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)<br>
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)<br>
         at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)<br>
         at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)<br>
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)<br>
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)<br>
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)<br>
         at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)<br>
         at com.crystaldecisions.sdk.occa.report.application.an.a(SourceFile:108)<br>
         at com.crystaldecisions.sdk.occa.report.application.b0.if(SourceFile:148)<br>
         at com.crystaldecisions.sdk.occa.report.application.b0.b(SourceFile:95)<br>
         at com.crystaldecisions.sdk.occa.report.application.bb.int(SourceFile:96)<br>
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)<br>
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)<br>
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)<br>
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:543)<br>
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3898)<br>
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(SourceFile:2906)<br>
         at com.mysystems.myapp.common.CRJavaHelper.changeDataSource(CRJavaHelper.java:157)<br>
         at com.mysystems.myapp.common.CrystalReport.print(CrystalReport.java:202)<br>
         at org.apache.jsp.english.CrystalReportParms_jsp._jspService(CrystalReportParms_jsp.java:368)<br>
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)<br>
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br>
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)<br>
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)<br>
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)<br>
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br>
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br>
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
         at com.mysystems.myapp.common.MyServletFilter.doFilter(MyServletFilter.java:107)<br>
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br>
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br>
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br>
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br>
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br>
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)<br>
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)<br>
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)<br>
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)<br>
         at java.lang.Thread.run(Thread.java:595)<br>
    Caused by: com.crystaldecisions.reports.common.QueryEngineException: Unexpected database connector error<br>
         at com.crystaldecisions.reports.queryengine.Connection.bf(SourceFile:2958)<br>
         at com.crystaldecisions.reports.queryengine.Rowset.z3(SourceFile:944)<br>
         at com.crystaldecisions.reports.queryengine.Rowset.bL(SourceFile:533)<br>
         at com.crystaldecisions.reports.queryengine.Rowset.zM(SourceFile:245)<br>
         at com.crystaldecisions.reports.queryengine.Connection.a(SourceFile:776)<br>
         at com.crystaldecisions.reports.queryengine.Table.a(SourceFile:2234)<br>
         at com.crystaldecisions.reports.queryengine.Table.if(SourceFile:2161)<br>
         at com.crystaldecisions.reports.queryengine.Table.try(SourceFile:1525)<br>
         at com.crystaldecisions.reports.queryengine.Table.a(SourceFile:568)<br>
         at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2405)<br>
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)<br>
         at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)<br>
         at com.crystaldecisions.reports.common.Document.a(SourceFile:203)<br>
         at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)<br>
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1167)<br>
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)<br>
         ... 47 more<br>
    Caused by: com.businessobjects.reports.jdbinterface.common.DBException: Unexpected database connector error<br>
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCQueryDefinition.Execute(Unknown Source)<br>
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCQueryDefinition.Execute(Unknown Source)<br>
         at com.crystaldecisions.reports.queryengine.Connection.bf(SourceFile:2953)<br>
         ... 63 more<br>
    Caused by: java.sql.SQLException: ORA-00904: "Fun_getEmpAddress": invalid identifier<br>
    <br>
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)<br>
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)<br>
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)<br>
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:622)<br>
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:111)<br>
         at oracle.jdbc.driver.T4CStatement.execute_for_describe(T4CStatement.java:350)<br>
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:895)<br>
         at oracle.jdbc.driver.T4CStatement.execute_maybe_describe(T4CStatement.java:382)<br>
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:985)<br>
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1515)<br>
         ... 66 more<br>

    i'm also getting the same error when i'm trying to call stored procedure (that will fetch the result set and populate the report) through the query in the report-viewer.jsp. The result set is fetched i.e. when i print the result set it shows on tomcat but it is not getting passed to Table object to populate the report. However when i try to give the query explicitly in the form of SELECT statements, it works fine i.e. i can view the report in the browser. But giving query in the form of SELECT is a very naive way and is ok if u have too less reports not requiring too many joins, thats why i was using stored procedure. Any help would be appreciated.

  • APEX Insufficient Privs errors when trying to use dbms_sql.parse

    Hello,
    I have a simple database procedure that changes are user pswd:
    create or replace
    PROCEDURE chg_pswd_test(p_userid in varchar2,
    p_pswd in varchar2)
    -- Invoker rights allow a user with execute privileges to call a subprogram.
    -- Definer Rights allow programs to execute under the privileges of their
    -- definer / schema owner.
    AUTHID CURRENT_USER as x varchar2(20);
    v_cursor INTEGER;
    v_execute INTEGER;
    begin
    v_cursor := sys.DBMS_SQL.OPEN_CURSOR;
    sys.DBMS_SQL.PARSE(v_cursor, 'ALTER USER '||p_userid||' identified by '||p_pswd, sys.DBMS_SQL.NATIVE);
    v_execute := sys.DBMS_SQL.EXECUTE(v_cursor);
    sys.DBMS_SQL.CLOSE_CURSOR(v_cursor);
    commit;
    end chg_pswd_test;
    I can run this procedure in sqlplus as user x and also as my apex_public_user. I have granted both execute on dbms_sql and alter user privs. It runs for both without problems.
    I then create a validation process in APEX can call this database procedure. I then receive insufficient privs errors.
    If I grant all privs to public, the apex app will then run, if I remove all privs I receive the errors again.
    Does anyone know which database priv I am missing, I cannot grant all privs to public on my production database?
    Thanks

    Odd, as I would think that should work, being the DBA role and all...
    If it works as user X from SQL*Plus, could you try to change the parsing schema to User X and try again?
    Thanks,
    - Scott -
    http://spendolini.blogspot.com
    http://sumnertechnologies.com

  • ORA-01031 insufficient privileges  error when selecting from a view

    OK I think this might be a dumb question but I can't figure it out:
    User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
    User John can issue select * from FRED.table1; and it works just fine.
    User John has then been granted SELECT privilege (directly, not via a database role) to schema
    MARK.view1;
    MARK.view1 only selects from FRED.table1. No other tables are in the view1.
    Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
    I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
    Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
    I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
    To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
    John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
    Any thoughts?
    Oh, Oracle EE 10.2.0.4

    JSebastian wrote:
    OK I think this might be a dumb question but I can't figure it out:
    User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
    User John can issue select * from FRED.table1; and it works just fine.
    User John has then been granted SELECT privilege (directly, not via a database role) to schema
    MARK.view1;
    MARK.view1 only selects from FRED.table1. No other tables are in the view1.
    Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
    I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
    Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
    I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
    To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
    John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
    Any thoughts?
    Oh, Oracle EE 10.2.0.4Are you certain John has been granted select on Mark.view1 ? In order for that to work Mark would have to have been given select on Fred.table1 WITH GRANT OPTION ... otherwise the grant would fail and then John would not be able to select from the view because the grant was never successfully issued.
    Here's a basic test case (which i think conforms to what you've outlined) to get it working.
    drop user u1 cascade;
    drop user u2 cascade;
    drop user u3 cascade;
    create user u1 identified by u1;
    grant connect, resource to u1;
    create user u2 identified by u2;
    grant connect, resource, create view to u2;
    create user u3 identified by u3;
    grant connect, resource to u3;
    connect u1/u1@orcl
    create table test1 (col1 number);
    grant select on test1 to u2 with grant option; --> this is the important part
    grant select on test1 to u3;
    connect u2/u2@orcl
    create view test2 as select * from u1.test1;
    grant select on test2 to u3;
    connect u3/u3@orcl
    select * from u2.test2;

  • How can I throw a hard 404 error to apache when a JSP is not found.

    How can I throw a hard 404 error to apache when a JSP is not found.
    I want to let apache handle the error.

    [email protected] (Jeremy Conner) wrote in
              <[email protected]>:
              >How can I throw a hard 404 error to apache when a JSP is not found.
              >I want to let apache handle the error.
              >
              >
              First thought that comes to mind is to return HTML that tells the browser
              redirect to a nonexistent file under Apache. You can't tell Apache to
              throw a 404 unless you're in a mod. Maybe something they could add to the
              proxy, but until then, I think a redirection in the response HTML is your
              only option.
              Jesse
              

  • Issue with INSERT INTO, throws primary key violation error even if the target table is empty

    Hi,
    I am running a simple
    INSERT INTO Table 1 (column 1, column 2, ....., column n)
    SELECT column 1, column 2, ....., column n FROM Table 2
    Table 1 and Table 2 have same definition(schema).
    Table 1 is empty and Table 2 has all the data. Column 1 is primary key and there is NO identity column.
    This statement still throws Primary key violation error. Am clueless about this? 
    How can this happen when the target table is totally empty? 
    Chintu

    Nope thats not true
    Either you're not inserting to the right table or in the background some other trigger code is getting fired which is inserting into some table which causes a PK violation. 
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • File adapter throwing no connections available error in a cluster.

    Hi
    If I start OSB1 server first and then OSB2, OSB2 throws no connection available error. First started server working fine. I put initial capacity of jca file adapter to 100 and max capacity to 200. Can any one tell me the solution for this.

    Hi
    If I start OSB1 server first and then OSB2, OSB2 throws no connection available error. First started server working fine. I put initial capacity of jca file adapter to 100 and max capacity to 200. Can any one tell me the solution for this.

  • Call a dll with an activeX component gives error

    Hello all,
    My program consist of:
    - Main program
    - DLL's
    How it works:
    The main program is the interface for the user, this main program call's several dll's
    The problem:
    The main program runs withought problems, but when it call's a dll, which also call's an activeX component, I get an error.
    I then made a executable from the dll which then works ok, no problem.
    When I click the retry it runs ok, but when I call it again I get the message again.
    The message does allways accur, but still very often
    Conclusion:
    The error message only comes when I call it as a dll, when the dll is standalone executable no problems occur.
    Below you can see how I call the dll:
    Can someone please help me with this problem?
    greetz,
    Bart

    Hello Bas,
    I have included the vi which calls de dll(executedll.vi) en the dll in VI form(plugin.vi & plugin.lvproj).
    As you can see the dll calls the canconfigurator activex component.
    And closes the activex component when done.
    This plugin will be called several times in the test enviroment.
    gr,
    Message Edited by darkxceed on 02-12-2010 04:33 AM
    Message Edited by darkxceed on 02-12-2010 04:33 AM
    Attachments:
    ExecuteDLL.vi ‏12 KB
    plugin.lvproj ‏8 KB
    plugin.vi ‏31 KB

  • Getting privs error

    Hi all
    I'm learning few mappings and tried running dedup and other transformations, getting error insufficient privs error, I granted select privs on source to target and insert privs on target to source, what I'm missing, It is so annoying not able to deploy and run, Can not figure out.
    Thanks for the help
    Murthy

    I'm deploying mappings to target here my target is topala, source src and both schemas on orcl11.
    select line,text from user_source where name='MAP_EMPL_DEPT_TOT_AGG' and line > 620 and line < 640;
    " EXIT WHEN "DEPT_TOT_i" <= get_bulk_size
    " AND "AGGREGATOR_c"%FOUND AND NOT get_abort;
    " ELSE
    " EXIT WHEN "DEPT_TOT_si" >= "DEPT_TOT_i";
    " END IF;
    " get_rowid.DELETE;
    " BEGIN
    " FORALL i IN "DEPT_TOT_si".."DEPT_TOT_i" - 1
    " INSERT
    " /*+ APPEND PARALLEL("DEPT_TOT") */
    " INTO
    " "TOPALA"."DEPT_TOT"
    " ("DEPT_TOT"."DNO",
    " "DEPT_TOT"."SAL"
    " VALUES
    " ("DEPT_TOT_0_DNO"(i),
    " "DEPT_TOT_1_SAL"(i)
    topala-> target
    src-> source
    mapping deployed to orcl11, target and what privs, I'm missing, What am I doing wrong.
    Thanks for the help in advance
    "

  • I would like to call through the CIS UCPM API but following error occurred

    I would like to call through the CIS UCPM API but following error occurred, I would like to to set Loacle Chinese, how can I do? Thank you
    intradoc.common.ServiceException: !csUnableToRetrieveSearchResults!csLocaleNotFound,English-US
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplem
    entor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2326)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)
    at intradoc.server.Service.createServiceException(Service.java:2315)
    at intradoc.server.ServiceHttpImplementor.determineParameterizedLocale(ServiceHttpImple
    mentor.java:668)
    at intradoc.server.ServiceHttpImplementor.initLocale(ServiceHttpImplementor.java:467)
    at intradoc.server.Service.initLocale(Service.java:426)
    at intradoc.server.Service.initDelegatedObjects(Service.java:295)
    at intradoc.server.SearchService.initDelegatedObjects(SearchService.java:86)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:436)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImp
    l.java:545)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    I managed to find a solution to my problem described above. I downloaded a demo copy of the shareware called R-Tools which I found on Tucows.com
    The site described the software thus: "Take advantage of R-Studio's unique ability to recover files and disks on remote computers, even if their partition structures are damaged or deleted."
    The demo software searched my ipod and found all my photos and showed them as thumbnails. Of course the demo software would not save the files unless I registered it which cost US$49.95. There are several different suites of applications from this publisher, I got the cheapest option which is called "R-Studio FAT".
    I didn't mind paying this amount because the photos were very precious to me and by this point I had just about resigned myself to losing them all. I had previously contacted a professional data recovery service and they had quoted me "AUD$80 per hour and probably 1 to 2 hours work".
    I've been too busy organising my newly recovered photos into galleries and editing them using photoshop to be bothered to try and fix my ipod which I doubt I will want to use again for photo storage.

Maybe you are looking for

  • Bug iCal and Exchange 2007 - try to get shared calendars from colleagues...

    When I go to options --> accounts --> delegate, iCal comes with an error (94) Here I can't find any option to ask my colleagues' permission to view their calendar. I now added one person, and since then iCal crashes when I click the delegate tab. The

  • Using the SAP GUI from the NW2004s SneakPreview Download

    Hello, does anyone else have major problems with the SAPGUI from the NW2004 SneakPreview download page? Im getting a runtime error when logging on: Runtime Errors         MESSAGE_TYPE_X                                                                 

  • Action script for batch-opening psd layer files flat? (alt+shift?)

    hi i am daily batch processing with an action script to make flat tiffs from psd layer files, like 10-100 files every couple of days in my workflow. until now i could not fine a solution to begin the batch processing-action with opening layer files F

  • Problem with 2004S (N4S) test drive license

    Hi - I've installed n4S for a number of years now, and have struck a problem with renewing the 90 day license. I go and register again at http://www.sap.com/minisap, give my HWID and specify the MaxDB flavour.  I receive my license key file, and uplo

  • HR-Unicodes for WRITE Statement

    Hi All, Am getting the problem with the WRITE Statement in Unicodes. i have declared the table like: FORM list_result TABLES p_pcl1_tab STRUCTURE pcl1. & i have writtten the write statement as follows: LOOP AT p_pcl1_tab. WRITE: / sy-tabix, p_pcl1_ta