ORA-32162: Read/Write SQL method not registered

Hi,
I am using OTT generated objects to pass them to my PL/SQL procedures as OUT parameters. When I call the registerOutParam() function, I get this error ORA-32162: Read/Write SQL method not registered.
I am calling my mapping function after creating environment and before creating my stateless connection pool. But still I am getting this exception at runtime while calling registerOutParam().
Environment* env;
env = Environment::createEnvironment(Environment::OBJECT);
MessageTOMapping(env); // Calling the mapping function here.
// Creating the stateless connection pool.
StatelessConnectionPool* scp;
scp = env->createStatelessConnectionPool("naveen",
"naveen",
"//10.105.153.11:1521/pls",
10,
5,
2,
StatelessConnectionPool::HOMOGENEOUS);
// Fetch a connection from the stateless connection pool
conn = scp->getConnection();
// After this, I create my Statement and call the registerOutParam() which
// causes ORA-32162 exception.
Please note that I do not get this error when I don't use any connection-pooling mechanism. That is, if I create an environment in OBJECT mode, call the mapping function with its pointer and create a normal Connection object (without any pooling etc), my application runs perfectly fine. E.g. if I replace the above piece of code with the code below, my application runs fine.
Environment* env;
env = Environment::createEnvironment(Environment::OBJECT);
MessageTOMapping(env); // Calling the mapping function here.
conn = env->createConnection("naveen", "naveen", "//10.105.153.11:1521/pls");
// After this, I create my Statement and call the registerOutParam() which
// does not give problem now and my application runs pefectly fine.
Can anyone let me know what I am doing wrong while using the stateless connection pooling mechanism? I definitely need to use Stateless Connection Pooling and must not get connections directly from env->createConnection().
Any help will be greatly appreciated.
Thanks and Regards,
Naveen

Hi,
I found one workaround (not solution) to the problem.
I used an IN OUT parameter instead of an OUT parameter in the stored procedure (though my requirement was only of an OUT parameter actually). This resulted in using the setObject() function instead of the registerOutParam() function which was throwing the ORA-32162 exception at runtime.
I think there should be better ways in which we can pass an object as OUT parameter while also using stateless connection pooling for managing connections. Please let me know the same in case anyone knows that.
Kind Regards,
Naveen

Similar Messages

  • ORA-32162: Read/Write SQL method not registered-for OTT

    I am trying this--
    env = Environment::createEnvironment (Environment::OBJECT);
    RegisterClasses(env);
    conn = env->createConnection (user, passwd, db);
    RegisterClasses is my mapping function; But still I am getting this error at--
    stmt->registerOutParam( 2,OCCIPOBJECT);
    I am trying to make a stored procedure call here...
    Can anyone tell me what is that I am missing?

    Hi,
    I am using OTT generated objects to pass them to my PL/SQL procedures as OUT parameters. When I call the registerOutParam() function, I get this error ORA-32162: Read/Write SQL method not registered.
    I am calling my mapping function after creating environment and before creating my stateless connection pool. But still I am getting this exception at runtime while calling registerOutParam().
    Environment* env;
    env = Environment::createEnvironment(Environment::OBJECT);
    MessageTOMapping(env); // Calling the mapping function here.
    // Creating the stateless connection pool.
    StatelessConnectionPool* scp;
    scp = env->createStatelessConnectionPool("naveen",
    "naveen",
    "//10.105.153.11:1521/pls",
    10,
    5,
    2,
    StatelessConnectionPool::HOMOGENEOUS);
    // Fetch a connection from the stateless connection pool
    conn = scp->getConnection();
    // After this, I create my Statement and call the registerOutParam() which
    // causes ORA-32162 exception.
    Please note that I do not get this error when I don't use any connection-pooling mechanism. That is, if I create an environment in OBJECT mode, call the mapping function with its pointer and create a normal Connection object (without any pooling etc), my application runs perfectly fine. E.g. if I replace the above piece of code with the code below, my application runs fine.
    Environment* env;
    env = Environment::createEnvironment(Environment::OBJECT);
    MessageTOMapping(env); // Calling the mapping function here.
    conn = env->createConnection("naveen", "naveen", "//10.105.153.11:1521/pls");
    // After this, I create my Statement and call the registerOutParam() which
    // does not give problem now and my application runs pefectly fine.
    Can anyone let me know what I am doing wrong while using the stateless connection pooling mechanism? I definitely need to use Stateless Connection Pooling and must not get connections directly from env->createConnection().
    Any help will be greatly appreciated.
    Thanks and Regards,
    Naveen

  • How to to read/write GIf files (not animated)

    Hi,
         Is there a labview vi(s) that will read a gif file and display it and also that will wirte it? I am interested in non animated gifs.
         Louis

    Ben wrote:
    Well before Mike got carried away in this thread the answer to those questions was "NO".
    But if you check that thread you will see that Mike has already done half of the work (reading a gif).
    There is limited functionality for writing a GIFin LabVIEW, look in vi.lib\picture\gif.llb\Write GIF File.vi
    Message Edited by Phillip Brooks on 10-09-2008 04:24 PM
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • File read write program output not coming correct

    this code is compiling without issues but the output is not what i am expecting .. the contents of delta.txt are as follows
    *4014254420*
    *2897449776*
    *4207405601*
    and the output thats coming is
    +4014254420+
    +40142544204207405601+
    +4207405601+
    its not reading the 2nd line somehow
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import java.io.*;
    import java.io.FileWriter;
    import javax.swing.*;
    import java.util.Scanner;
    public class testloop
              static int i;                                             
               static char c;                                               
               static int j = 1;     
                    static String filename;                                                  
      public static void main(String[] args)  throws IOException 
    try {
         FileReader fmi = new FileReader("delta.txt");
         FileWriter fmo = new FileWriter("Updated.txt");
         BufferedReader br = new BufferedReader(fmi);
                   String temp=null;
                        do{
                        temp = br.readLine();
                        if(temp.startsWith("*"))
                             String tempc = temp.substring(1);                         
                             System.out.print(tempc+"\n");
                            long tp = Long.valueOf(tempc);
                             System.out.print(tp);                    
                   else
                   fmo.write(temp);
                        }while((temp=br.readLine()) != null);
                   fmi.close();
                   fmo.close();
                   }catch (FileNotFoundException e){ System.out.print("not found");     }
                   catch (IOException e){System.out.print("io"+e);
                   e.printStackTrace();
        also if i use the following delta.txt
    **4014254420*
    **2897449776*
    **4207405601*
    mmm+
    i get the output as
    +4014254420+
    +40142544204207405601+
    +4207405601Exception in thread "main" java.lang.NullPointerException+
    at testloop.main(testloop.java:33)*
    its not writing the text to the file updated.txt
    Edited by: adhiraj on Nov 27, 2007 6:58 AM

    You are getting the next line twice.
    do{
                        temp = br.readLine();
                        if(temp.startsWith("*"))
                             String tempc = temp.substring(1);                         
                             System.out.print(tempc+"\n");
                            long tp = Long.valueOf(tempc);
                             System.out.print(tp);                    
                   else
                   fmo.write(temp);
                        }while((temp=br.readLine()) != null);You need to change your code around so that you only call
    temp=br.readLine();once per iteration of the loop.

  • 8.1.7: ORA-01410 in PL/SQL but not SQL*Plus

    This has been driving me crazy, and a search here and in comp.databases.oracle didn't turn up any solutions.
    When the following code is part of a stored procedure, it fails with ORA-01410 (Invalid ROWID). It executes perfectly from SQL*Plus, I've verified that TMP_TASK_DATA contains data, and the query clearly specifies a ROWID.
    As noted in the subject, this occurs on 8.1.7. TMP_TASK_DATA and TMP_TASK_RETRIEVAL are both global temp tables. I don't currently have access to Metalink, so was hoping that someone has run across this and has some hints.
    Thx,
    (query edited to limit "IN" list):
            INSERT  INTO TMP_TASK_RETRIEVAL
                    (TASK_ID, TD_ROWID, SORT_ORDER)
            SELECT  TASK_ID, TD_ROWID, ROWNUM
            FROM    (
                    SELECT  TASK_ID, TD_ROWID
                    FROM    (
                            SELECT  TASK_ID,
                                    ROWID                                   as TD_ROWID,
                                    SF_GET_PRIORITY(TASK_TYPE, 1 )          as PRIORITY_COMM,
                                    COMPLETED_TIME                          as FINISH_TIME,
                                    FIRST_READY_TIME                        as QUEUE_TIME
                            FROM    TMP_TASK_DATA
                            WHERE   USER_NUMBER = v_USER_NUM
                            AND     TASK_TYPE in
                                    'AAAA', 'BBBB', 'CCCC'
                    ORDER BY
                            PRIORITY_COMM,
                            decode(PRIORITY_COMM, 10, FINISH_TIME, QUEUE_TIME)
                    );

    Thanks for the info. It turned out that I was wrong about removing the PL/SQL variable from the query; either that, or the error occurs at arbitrary times.
    As best I can tell, a ROWID simply can't be passed between nested inline views, so I reduced them to one level (which means that I have to run the function twice in the ORDER BY, rather than once in the nested select).

  • MacBook SuperDrive Reads/Writes DVDs but not CDs

    The SuperDrive on my first-gen MacBook (bought May 2006, Intel Core Duo) is acting up, but in the opposite direction of what you might expect: It can read and write DVDs, but fails on all forms of CDs: it cannot mount commercially-produced audio CDs or CD-ROMs, nor any form of CD-R (blank or previously written). It ***** them in, spins a bit, hesitates and then finally spits them out after a minute or so.
    But it can read all sorts of DVDs (video and data), whether commercially stamped or home burned. And it can write to DVD-R. Pretty much the opposite of what you might expect if the lens was dirty or some other mechanical problems - since one would assume that the DVD mode would require higher tolerances than CD modes. And yes, I've used a CD lens cleaner just to be sure.
    Suggestions?

    Thanks - so does that mean a SuperDrive has two different lasers, one for CD media and the other for DVDs? I guess I assumed there would just be one (for the DVD) that was downward-compatible so it could also read CDs.
    I've done a lot of searching, and I've seen many cases where a drive fails to work with DVDs but still works with CDs ... but not the other way around (which is my situation).

  • Reader/Writer.close() is slow

    I've written a multi-threaded application that does a lot of disk I/O using Buffered and File Reader/Writers. Each thread is reading and writing it's OWN file. Everything works great except the performance of the Reader/Writer.close() method. When I'm running say 10 threads at a time and my code calls close() it can take anywhere from 1 - 3 seconds for the call to return. If I only run 5 threads then close() returns in a respectable timeframe.
    Can someone please explain what could be causing close() to take so long to return?
    Thanks!

    Each thread has to vie for CPU time with other processes on your system. More threads means more scheduling of processes, the threads do not run at the same time--it's just an illusion created by scheduling. When you have 10 threads, you have more scheduling going on--hence more wait when you want to close out: you have wait for each to gain enough active CPU time to flush and close, but there can only be up to as many threads running at one time as your system has CPUs*Threads/CPU. Just because you have more Java threads, does not mean that you're processing faster--it just means there is seperate processing going on as the system can schedule resources for your threads to work in with the rest of the system processes all of them essentially competing for many of the same resources.

  • How a administrator user is different from read-write user in Aruba Central?

    Q: How a administrator user is different from read-write user in Aruba Central?
    A: Aruba Central allows administrator to create multiple user of different access levels to help manage the system.  This access levels include:
    read only
    read/write
    guest operator
    NOTE: These access levels can be imposed on a specific "ap group" or a set of "ap groups" or all of them.
    Therefore looking at the roles, many of the aruba central customers, had a question of how a administrator user is different from read-write user. 
    Administrator is the only user who can move access points between groups. Read/Write user Do Not Have Permission to execute this action.

    Hi,
    I've managed to get what I needed by using a shift register + event structure as suggested by Adnan. However, I face another problem after implementing SR+event. I've attached two files, first the original program and second the updated program using SR + event. (it's only the jpg file as I've forgotten to save the labview program, will upload the program by tomorrow.
    In the original program, I have an elapsed time that is able to run continuously when I run the program. In the updated program, my elapsed time don't seem to run continuously when I run the program (as shown by elapsed time indicator). I need the elapsed time to run continuously as a input to calculate my motor profile.
    I suppose this is caused by the introduction of the event structure, will adding a case structure to wrap the event structure solve the problem or is there another way to get pass this. Appreciate if someone could drop me a pointer or two.
    Thanks
    Attachments:
    Mar 16 - continuous elapsed time.png ‏12 KB
    Mar 16 - elapsed time not continuous after introducing shift register + event structure.png ‏17 KB

  • 10.5.8 on G4 - firewire read/write fails silently, corrupting data.

    I've already posted this problem on another board here
    http://discussions.apple.com/thread.jspa?threadID=2565228&tstart=0
    But it seems more relevant to this forum.
    I've recently encountered this problem which caused me to lose a lot of data. The setup is mac mini g4 + external firewire hard drive from Freecom.
    What is happening is that read/write operations do not result in copy fidelity. Here's a terminal log to illustrate:
    ariel:Freecom FW 1TB kaitlin$ cp another.avi another1.avi
    ariel:Freecom FW 1TB kaitlin$ ls -lh another*
    -rw-r--r-- 1 kaitlin staff 176M 2 Sep 11:48 another.avi
    -rw-r--r-- 1 kaitlin staff 176M 2 Sep 12:07 another1.avi
    ariel:Freecom FW 1TB kaitlin$ md5 another.avi
    MD5 (another.avi) = 6eedf37d80b81f61f0c4a8f71dfea57c
    ariel:Freecom FW 1TB kaitlin$ md5 another1.avi
    MD5 (another1.avi) = b8cffac964d494279a508f11151ee529
    So basically the original and its copy have different hashcodes which means they're not the same file, so I can't trust the firewire. It does this consistently with any file read/write operation to/from any destination. The machine does NOT behave like this with external USB drives or the internal drive.
    I've got two computers, both G4 1.5 GHz of the same era (Mac mini and Powerbook 15"), and the same symptoms appear on both machines, as well as when hooking the drive up to a FW800 port.
    I tried connecting the drive to a friend's Intel Mac Mini, and it does NOT exhibit this behaviour. So I'm suspecting it's a recent software update that caused the drive to fail, since I have used the same firewire disk for a few months without any problems.
    I've reverted to MacOS X 10.5.0 and the problem goes away. Then I re-did the update to 10.5.8 and tested it - the problem comes back. It's present on any firewire device I could test on (including a 3rd gen firewire ipod).
    So basically, firewire on 10.5.8 seems broken on a G4
    - kaitlin

    You seem to have done a good job of proving that the Firewire drivers in 10.5.8 don't work properly on your model of Mini. I don't think there's a UNIX solution to that problem. If the drivers are incompatible, only Apple can fix them, and it won't.
    If any firmware updates were ever released for your model, make sure you have the latest one.
    The only other thing you could try that you might not already have done is to do a clean install of 10.5, then run the combo updater (not a series of intermediate updaters) to get back to 10.5.8. That procedure has been reported to solve strange problems on occasion.

  • How can I read/write data files (text file) from PL/SQL Script

    I had an oracle forms pl/sql program to read/write a data file (text file). When this code is run on a command line as a PL/SQL script using the SQL*Plus I am getting an error:
    -- sample.sql
    DECLARE
      vLocation                 VARCHAR2(50)  := 'r:\';
      vFilename                 VARCHAR2(100) := 'sample.dat';
      vTio                   TEXT_IO.FILE_TYPE;
      vLinebuf               VARCHAR2(2000);
      vRownum               NUMBER        := 0;
      -- use array to store data FROM each line of the text file     
      TYPE           array_type IS VARRAY(15) OF VARCHAR2(100);
      vColumn      array_type := array_type('');
      PROCEDURE prc_open_file(p_filename IN VARCHAR, p_access IN VARCHAR2) is
      BEGIN
        vTio := TEXT_IO.FOPEN(vLocation||p_filename,p_access);
      EXCEPTION
        WHEN OTHERS then
          --  raise_application_error(-20000,'Unable to open '||p_filename);
          message(sqlerrm);pause;
      END;
      PROCEDURE prc_close_file is
      BEGIN
        IF TEXT_IO.IS_OPEN(vTio) then
           TEXT_IO.FCLOSE(vTio);
        END IF;
      END;
    BEGIN
      --extend AND initialize the array to 4 columns
      vColumn.EXTEND(4,1);
      prc_open_file(vFilename,'r');
      LOOP
          LTEXT_IO.GET_LINE(vTio,vLinebuf);
          vColumn(1)  := SUBSTR(vLineBuf, 1, 3);
          vColumn(2)  := SUBSTR(vLineBuf, 5, 8);
          vColumn(3)  := SUBSTR(vLineBuf,10,14);     
          Insert Into MySampleTable
          Values
            (vColumn(1), vColumn(2), vColumn(3));
          EXIT WHEN vLinebuf IS NULL;
       END LOOP;
       prc_close_file;
    END;
    SQL> @c:\myworkspace\sql\scripts\sample.sql;
    PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declaredIt works on the oracle forms but not on the SQL*Plus. Is there an alternative method using a PL/SQL script? A simple sample would help. Thanks.

    Did you ever noticed the search box at the right side of the forum?
    A quick search (limited to this years entries) brought up this thread for example
    Re: UTL_FILE Examples

  • (java.util.PropertyPermission * read,write) has not been granted

    I've been getting the following error:
    java.security.AccessControlException:
    the Permission (java.util.PropertyPermission * read,write)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(ROVER|PolicyTableProxy(ROVER))
    So to fix it I did the flowing as system:
    SQL> EXEC DBMS_JAVA.GRANT_PERMISSION('ROVER','SYS:java.util.PropertyPermission', '*', 'read,write');
    PL/SQL procedure successfully completed.
    SQL> COMMIT;
    Commit complete.
    But their is no change.
    What am I missing?
    I'm using 8.1.6 on linux.

    I'm also in this situation:
    I got this error:
    [1]: (Error): ORA-29532: Java call terminated by uncaught Java exception:
    java.security.AccessControlException: the Permission
    (java.net.SocketPermission mailhost resolve) has not been granted by
    dbms_java.grant_permission to
    SchemaProtectionDomain(TOLKIEN|PolicyTableProxy(TOLKIEN)) ORA-06512: at line
    14
    I believe I must use the dbms_java.grant_permission procedure to grant the
    procedure to resolve hostname. But I don't know how to use this procedure.
    I tried with
    'dbms_java.grant_permission(SchemaOfMyJavaClass,'java.net.SocketPermission',
    'mailhost','resolve',intRet);'
    and a record is been appended to dba_java_policy, but Oracle complaines again.
    Someone can help us?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Oracle Support():
    Can you see the permission in dba_java_policy table?
    <HR></BLOCKQUOTE>
    null

  • ORA-27070: async read/write failed

    Hi,
    We have a 2 node RAC on AIX 5.3 TL10 with CRS & ASM on 11.1.0.7
    The DB is running on 10.2.0.4
    The servers use VIO-server connection to SAN & LAN
    This morning the flashbackrecovery diskgroup got unmounted because of a
    ORA-27070: async read/write failed
    WARNING: IO Failed. subsys:System dg:2, diskname:/dev/asmreco3 disk:0x2.0x93e51c34 au:895
    iop:0x110b7bbc0 bufp:0x700000006190000 offset(bytes):938913792 iosz:4096 operation:2(Write) synchronous:0
    result: 4 osderr:0x0 osderr1:0x0 pid:11739286
    NOTE: cache initiating offline of disk 2 group 2
    WARNING: initiating offline of disk 2.2481265716 (FB01_0002) with mask 0x7e
    NOTE: initiating PST update: grp = 2, dsk = 2, mode = 0x15
    kfdp_updateDsk(): 7
    Thu Dec 31 08:58:13 2009
    kfdp_updateDskBg(): 7
    ERROR: too many offline disks in PST (grp 2)
    NOTE: halting all I/Os to diskgroup FB01
    Thu Dec 31 08:58:13 2009
    SQL> alter diskgroup FB01 dismount force
    NOTE: active pin found: 0x70000000ddfe530
    NOTE: active pin found: 0x70000000ddfe110
    NOTE: active pin found: 0x70000000ddfe428
    NOTE: active pin found: 0x70000000ddfe320
    NOTE: active pin found: 0x70000000ddfe740
    NOTE: active pin found: 0x70000000ddfe218
    NOTE: active pin found: 0x70000000ddfe638
    NOTE: active pin found: 0x70000000ddfe530
    NOTE: active pin found: 0x70000000ddfe110
    NOTE: active pin found: 0x70000000ddfe428
    NOTE: active pin found: 0x70000000ddfe320
    NOTE: active pin found: 0x70000000ddfe740
    NOTE: active pin found: 0x70000000ddfe218
    NOTE: active pin found: 0x70000000ddfe638
    NOTE: cache dismounting group 2/0xCD55ECD5 (FB01)
    Thu Dec 31 08:58:14 2009
    kjbdomdet send to node 1
    detach from dom 2, sending detach message to node 1
    Thu Dec 31 08:58:14 2009
    Dirty detach reconfiguration started (old inc 24, new inc 24)
    List of nodes:
    0 1
    Global Resource Directory partially frozen for dirty detach
    * dirty detach - domain 2 invalid = TRUE
    2617 GCS resources traversed, 1 cancelled
    Dirty Detach Reconfiguration complete
    Thu Dec 31 08:58:15 2009
    WARNING: dirty detached from domain 2
    NOTE: cache dismounted group 2/0xCD55ECD5 (FB01)
    kfdp_dismount(): 8
    kfdp_dismountBg(): 8
    NOTE: De-assigning number (2,0) from disk (/dev/asmreco1)
    NOTE: De-assigning number (2,1) from disk (/dev/asmreco2)
    NOTE: De-assigning number (2,2) from disk (/dev/asmreco3)
    SUCCESS: diskgroup FB01 was dismounted
    There are however no errors on the OS level
    Any hints are welcome

    All has been checked, and rechecked.
    We now have a very strange situation:
    We testen failover by manually turning of one LPAR at a time.
    After this reboot, the Async I/O error seem to have gone.
    That is, they haven't appeared now for two days
    Why they occurred and why they don't occur anymore is not found/explained
    There I'll close this thread.

  • ORA-01031: insufficient privileges in PL/SQL but not in SQL

    I have problem with following situation.
    I switched current schema to another one "ban", and selected 4 rows from "ed"
    alter session set current_schema=ban;
    SELECT * FROM ed.PS WHERE ROWNUM < 5;
    the output is OK, and I get 4 rows like
    ID_S ID_Z
    1000152 1
    1000153 1
    1000154 1
    1000155 1
    but following procedure is compiled with warning
    create or replace
    procedure proc1
    as
    rowcnt int;
    begin
    select count(*) into rowcnt from ed.PS where rownum < 5;
    end;
    "Create procedure, executed in 0.031 sec."
    5,29,PL/SQL: ORA-01031: insufficient privileges
    5,2,PL/SQL: SQL Statement ignored
    ,,Total execution time 0.047 sec.
    Could you help me why SELECT does work in SQL but not in PL/SQL procedure?
    Thanks.
    Message was edited by:
    MattSk

    Privs granted via a role are only valid from SQL - and not from/within stored PL/SQL code.
    Quoting Tom's (from http://asktom.oracle.com) response to this:I did address this role thing in my book Expert one on one Oracle:
    <quote>
    What happens when we compile a Definer rights procedure
    When we compile the procedure into the database, a couple of things happen with regards to
    privileges.  We will list them here briefly and then go into more detail:
    q    All of the objects the procedure statically accesses (anything not accessed via dynamic SQL)
    are verified for existence. Names are resolved via the standard scoping rules as they apply to the
    definer of the procedure.
    q    All of the objects it accesses are verified to ensure that the required access mode will be
    available. That is, if an attempt to UPDATE T is made - Oracle will verify the definer or PUBLIC
    has the ability to UPDATE T without use of any ROLES.
    q    A dependency between this procedure and the referenced objects is setup and maintained. If
    this procedure SELECTS FROM T, then a dependency between T and this procedure is recorded
    If, for example, I have a procedure P that attempted to 'SELECT * FROM T', the compiler will first
    resolve T into a fully qualified referenced.  T is an ambiguous name in the database - there may be
    many T's to choose from. Oracle will follow its scoping rules to figure out what T really is, any
    synonyms will be resolved to their base objects and the schema name will be associated with the
    object as well. It does this name resolution using the rules for the currently logged in user (the
    definer). That is, it will look for an object owned by this user called T and use that first (this
    includes private synonyms), then it will look at public synonyms and try to find T and so on.
    Once it determines exactly what T refers to - Oracle will determine if the mode in which we are
    attempting to access T is permitted.   In this case, if we as the definer of the procedure either
    owns the object T or has been granted SELECT on T directly or PUBLIC was granted SELECT, the
    procedure will compile.  If we do not have access to an object called T by a direct grant - the
    procedure P will fail compilation.  So, when the object (the stored procedure that references T) is
    compiled into the database, Oracle will do these checks - and if they "pass", Oracle will compile
    the procedure, store the binary code for the procedure and set up a dependency between this
    procedure and this object T.  This dependency is used to invalidate the procedure later - in the
    event something happens to T that necessitates the stored procedures recompilation.  For example,
    if at a later date - we REVOKE SELECT ON T from the owner of this stored procedure - Oracle will
    mark all stored procedures this user has that are dependent on T, that refer to T, as INVALID. If
    we ALTER T ADD  some column, Oracle can invalidate all of the dependent procedures. This will cause
    them to be recompiled automatically upon their next execution.
    What is interesting to note is not only what is stored but what is not stored when we compile the
    object. Oracle does not store the exact privilege that was used to get access to T. We only know
    that procedure P is dependent on T. We do not know if the reason we were allowed to see T was due
    to:
    q    A grant given to the definer of the procedure (grant select on T to user)
    q    A grant to public on T (grant select on T to public)
    q    The user having the SELECT ANY TABLE privilege
    The reason it is interesting to note what is not stored is that a REVOKE of any of the above will
    cause the procedure P to become invalid. If all three privileges were in place when the procedure
    was compiled, a revoke of ANY of them will invalidate the procedure - forcing it to be recompiled
    before it is executed again. Since all three privileges were in place when we created the procedure
    - it will compile successfully (until we revoke all three that is). This recompilation will happen
    automatically the next time that the procedure is executed.
    Now that the procedure is compiled into the database and the dependencies are all setup, we can
    execute the procedure and be assured that it knows what T is and that T is accessible. If something
    happens to either the table T or to the set of base privileges available to the definer of this
    procedure that might affect our ability to access T -- our procedure will become invalid and will
    need to be recompiled.
    This leads into why ROLES are not enabled during the compilation and execution of a stored
    procedure in Definer rights mode. Oracle is not storing exactly WHY you are allowed to access T -
    only that you are. Any change to your privileges that might cause access to T to go away will cause
    the procedure to become invalid and necessitate its recompilation. Without roles - that means only
    'REVOKE SELECT ANY TABLE' or 'REVOKE SELECT ON T' from the Definer account or from PUBLIC. With
    roles - it greatly expands the number of times we would invalidate this procedure. If some role
    that was granted to some role that was granted to this user was modified, this procedure might go
    invalid, even if we did not rely on that privilege from that role. ROLES are designed to be very
    fluid when compared to GRANTS given to users as far as privilege sets go. For a minute, let's say
    that roles did give us privileges in stored objects. Now, most any time anything was revoked from
    ANY ROLE we had, or any role any role we have has (and so on -- roles can and are granted to roles)
    -- many of our objects would become invalid. Think about that, REVOKE some privilege from a ROLE
    and suddenly your entire database must be recompiled! Consider the impact of revoking some system
    privilege from a ROLE, it would be like doing that to PUBLIC is now, don't do it, just think about
    it (if you do revoke some powerful system privilege from PUBLIC, do it on a test database). If
    PUBLIC had been granted SELECT ANY TABLE, revoking that privilege would cause virtually every
    procedure in the database to go invalid. If procedures relied on roles, virtually every procedure
    in the database would constantly become invalid due to small changes in permissions. Since one of
    the major benefits of procedures is the 'compile once, run many' model - this would be disastrous
    for performance.
    Also consider that roles may be
    q    Non-default: If I have a non-default role and I enable it and I compile a procedure that
    relies on those privileges, when I log out I no longer have that role -- should my procedure become
    invalid -- why? Why not? I could easily argue both sides.
    q    Password Protected: if someone changes the password on a ROLE, should everything that might
    need that role be recompiled?  I might be granted that role but not knowing the new password - I
    can no longer enable it. Should the privileges still be available?  Why or Why not?  Again, arguing
    either side of this is easy. There are cases for and against each.
    The bottom line with respect to roles in procedures with Definer rights are:
    q    You have thousands or tens of thousands of end users. They don't create stored objects (they
    should not). We need roles to manage these people. Roles are designed for these people (end users).
    q    You have far fewer application schema's (things that hold stored objects). For these we want
    to be explicit as to exactly what privileges we need and why. In security terms this is called the
    concept of 'least privileges', you want to specifically say what privilege you need and why you
    need it. If you inherit lots of privileges from roles you cannot do that effectively. We can manage
    to be explicit since the number of development schemas is SMALL (but the number of end users is
    large)...
    q    Having the direct relationship between the definer and the procedure makes for a much more
    efficient database. We recompile objects only when we need to, not when we might need to. It is a
    large efficiency enhancement.
    </quote>

  • SQL Error: ORA-00942: table or view does not exist + CX_RS_SQL_ERROR

    HI ,
    we are facing below issue while activating info object xxxxxxxx
    " SQL Error: ORA-00942: table or view does not exist "  and   " CX_RS_SQL_ERROR  "
    can any one help us out to resolve this issue.
    Thanks,
    EDK......

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • Error(20,22): PL/SQL: ORA-00942: table or view does not exist

    I am getting currently getting an error when I try and insert into a table from a different schema from my Stored Procedure:
    Error(20,22): PL/SQL: ORA-00942: table or view does not exist
    I am explicitly calling the table with the schema name infront i.e.
    INSERT INTO SAPSR3.ZTREC_NAME_TYPE
    MASTER_ID,
    NAME_TYPE,
    FAMILY_NAME,
    FIRST_NAME,
    MIDDLE_NAME,
    TITLE
    VALUES
    In_MasterID,
    In_NameType,
    In_FamilyName,
    In_FirstName,
    In_MiddleName,
    In_Title
    I only get this error when I try and compile my stored procedure. If I try this insert not within a stored procedure (i.e. a blank script) it works perfectly.
    Can anyone tell me what Im doing wrong?
    Thanks.

    Hi,
    It sounds like you (the procedure owner) have privileges on that table only through a role.
    Roles don't count in stored procedures created with AUTHID OWNER (which is the default).
    Either
    (1) Have user SAPSR3 grant the necessary privileges directly to you (or to PUBLIC), or
    (2) change the procedure so that it runs with the caller's privileges, by adding AUTHID CURRENT_USER after the argument list but before the keyword IS (os AS) like this:
    CREATE OR REPLACE PROCEDURE     foo
    (     x     IN     NUMBER
    AUTHID CURRENT_USER
    IS ...

Maybe you are looking for

  • Yet another "Slide to unlock"

    Hi My iPhone 4 running the latest IOS 7.04 has stopped responding - I cant 'Slide to unlock' anymore After googling the subject I found that I am not alone. Alas the solutions offered haven't helped so far. So far I have Tried to turn it of completel

  • Will there be an ios update for ipod 2 gen ?

    will there be an ios update for ipod 2 gen ?

  • Jco 2.0.10 - HPUX - use_sapgui=2

    Hi All, i'm using jco with hpux. if the property use_sapgui is set to 0 everything works out fine but if I set it to 2 it won't return from the sap call. It returns only if I disconnect the client or kill the login in SM04. With JCo Version 2.1.4 it

  • SUn Java with MX7

    The Paypal integration guide says that I need to install SUn Java JRE 1.3.1_02. I have done that and updated the CF administrator JVM path to point to it, but COld FUsion will not start. ANy ideas? I also tried installing 1.4_15 and it wont start wit

  • Resetting ocfs2 /dev/mapper references ? ... storage pool repository

    So, am using 3 disks from SAN which were previously exported to another OVS server. The current setup is a fresh installed OVS server and OVM Manager. OVM is reading the disk paths thats written on the disks and would not allow me to proceed with new