ORA 01422 and V$SESSION & AUDSID

Hi all,
We have a client sent us the below Oralce error : ORA-01422
SELECT DISTINCT SID INTO My_sid FROM V$SESSION WHERE AUDSID=USERENV('SESSIONID');
could you please help, does v$session contain many session having the same audsid ?
Is this error related to RAC architecure or ASSM ?
Thanks
Edited by: BIJGA on Oct 11, 2012 2:44 AM

I know the correction but I need to know why now the client did had this error,
SELECT DISTINCT SID INTO My_sid FROM V$SESSION WHERE sid = ( select sid from v$mystat where rownum=1 );
Thanks,

Similar Messages

  • Getting Error ORA-01422&ORA-06512 while clicking distributions of invoice

    Hi,
    I am Getting Error ORA-01422&ORA-06512 when i query the invoice and click on the All distributions.
    However i am getting this error only for some invoices and not for all.
    Any suggestion on this is highly appreciated.
    Regards,
    Shreyans

    Hi,
    What is the application release? If you are on R12, please refer to these documents.
    Note: 580014.1 - R12 Invoices FAQs - (16. Why do the Errors ORA-01422 and ORA-06512 Show when Clicking on the [All Distributions] Button?)
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=580014.1
    Note: 559199.1 - Error ORA-01422 ORA-06512 Raises when Click On [All Distributions] Button
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=559199.1
    Regards,
    Hussein

  • Error ORA-01422

    Hi All,
    I just learning Oracle. Now i try to make a stored procedure
    CREATE OR REPLACE PROCEDURE sewa_mobil(customerid in customer.customerid%TYPE,
                                                      supirid in supir.supirid%TYPE,
                                                      mobilid in mobil.mobilid%TYPE,
                                                      tgl_sewa in VARCHAR2)
    is      
    begin
    if status_mobil(mobilid) = 0 then
         raise_application_error('-20001','Car Is In Use');
    elsif status_supir(supirid) = 0 then
         raise_application_error('-20002','Driver on Duty');
    else
         IF (tgl_sewa = 'now') then
              insert into sewa values(sewa_id_seq.nextval,customerid,supirid,mobilid,sysdate,'');     
         else
              insert into sewa values(sewa_id_seq.nextval,customerid,supirid,mobilid,to_date(tgl_sewa,'DD-MM-YYYY HH24:MI:SS'),'');     
         end if;
    end if;      
    commit;
    end;
    then when i execute like this => exec sewa_mobil(1,2,3,'21:07:08 17:12:54');
    but it comes error ORA-01422 and ORA-06512.
    When I search on google, it says that error on ORA-04122 comes, if there were SELECT statement on Procedure which resulting 2 rows or more. But as you see from my procedure, it has no SELECT statement.
    so how to solve this?
    *I've tried to manually using insert into sewa values(0,1,1,1,sysdate,sysdate);..........and its work                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hello (and welcome),
    user11018619 wrote:
    but it comes error ORA-01422 and ORA-06512.
    When I search on google, it says that error on ORA-04122 comes, if there were SELECT statement on Procedure which resulting 2 rows or more. But as you see from my procedure, it has no SELECT statement. But you do have a SELECT: status_mobil(mobilid) and status_supir(supirid)
    these are function calls, which must be SELECTing.
    By the way, putting {noformat}{noformat} around your code makes it a lot easier to read (lowercase code in curly brackets).
    Edited by: SeánMacGC on Jun 22, 2009 9:24 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ORA-00604/ORA-01422/ORA-06512 Error on trigger

    Hi,
    I have an database which is of version 10.2.0.3.0 on Enterprise Edition.
    I want to restrict a user from usage of an schema . Therefore i have written a trigger but i have encountered with another errors:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 5
    Trigger Being::
    SQL> create or replace trigger session_access
    2 after logon on database
    3 declare
    4 v_username varchar2(30);
    5 v_osuser varchar2(30);
    6 begin
    7 select username,osuser into v_username,v_osuser from v$session;
    8 if v_username = 'SUSANJO' and v_osuser= 'ORACLE' then
    9 raise_application_error (-20001,'Access restricted for this USER');
    10 end if;
    11 end;
    12 /
    Trigger created.
    SQL> show errors;
    No errors.
    SQL> connect susanjo
    Enter password:
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 5
    Warning: You are no longer connected to ORACLE.
    i have run out of ideas of whats to be done onto the trigger now.
    Regards.
    Susan John

    Um , i have implemented the following pl/sql. It seem to kick the person out BUT (now this is a big BUT) within the grid control it mentions :
    Details          Failed to connect to database instance: ORA-00604: error occurred at recursive SQL level 1.
    create or replace trigger session_access
    DECLARE
    v_username sys.v_$session.username%type;
    v_osuser sys.v_$session.osuser%type;
    BEGIN
    select s.username ,s.osuser into v_username,v_osuser
    from v$session s where s.username='SUSANJO' and s.osuser='oracle';
    IF (v_username ='SUSANJO' AND V_OSUSER='oracle' )
    THEN
    RAISE_APPLICATION_ERROR(-20001, 'You are not allowed to login using the program');
    END IF;
    END session_access;
    Output :
    SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 23 12:36:43 2009
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning and Data Mining options
    SQL> connect susanjo
    Enter password:
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: You are not allowed to login using the program
    ORA-06512: at line 10
    Warning: You are no longer connected to ORACLE.
    SQL>
    I did conduct a research which was not all that helpful too. So i am back to square one again.
    regards
    Susan John

  • ACL connect privileges ORA-01422 ORA-06512

    Application Express Installation Guide
    3.3.6.1 Granting Connect Privileges
    The following example demonstrates how to grant connect privileges to any host for the APEX_030200 database user.
    DECLARE
    ACL_PATH VARCHAR2(4000);
    ACL_ID RAW(16);
    BEGIN
    -- Look for the ACL currently assigned to '*' and give APEX_030200
    -- the "connect" privilege if APEX_030200 does not have the privilege yet.
    SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
    WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    -- Before checking the privilege, ensure that the ACL is valid
    -- (for example, does not contain stale references to dropped users).
    -- If it does, the following exception will be raised:
    EXCEPTION
    -- When no ACL has been assigned to '*'.
    WHEN NO_DATA_FOUND THEN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_030200', TRUE, 'connect');
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
    END;
    COMMIT;return:
    ORA-01422:
    ORA-06512: line 8
    SELECT * FROM sys.DBA_NETWORK_ACLS
    WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    "HOST"     "LOWER_PORT"     "UPPER_PORT"     "ACL"     "ACLID"
    "*"     ""     ""     "/sys/acls/users.xml"     "(RAW)"
    "*"     ""     ""     "/sys/acls/power_users.xml"     "(RAW)"My Apex says login XDB Password
    Sqlplus.exe "SYS/oracle@orcl AS SYSDBA" @epgstat.sql
    All OK
    Help
    APEX 3.2
    11g Rel1

    Um , i have implemented the following pl/sql. It seem to kick the person out BUT (now this is a big BUT) within the grid control it mentions :
    Details          Failed to connect to database instance: ORA-00604: error occurred at recursive SQL level 1.
    create or replace trigger session_access
    DECLARE
    v_username sys.v_$session.username%type;
    v_osuser sys.v_$session.osuser%type;
    BEGIN
    select s.username ,s.osuser into v_username,v_osuser
    from v$session s where s.username='SUSANJO' and s.osuser='oracle';
    IF (v_username ='SUSANJO' AND V_OSUSER='oracle' )
    THEN
    RAISE_APPLICATION_ERROR(-20001, 'You are not allowed to login using the program');
    END IF;
    END session_access;
    Output :
    SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 23 12:36:43 2009
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning and Data Mining options
    SQL> connect susanjo
    Enter password:
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: You are not allowed to login using the program
    ORA-06512: at line 10
    Warning: You are no longer connected to ORACLE.
    SQL>
    I did conduct a research which was not all that helpful too. So i am back to square one again.
    regards
    Susan John

  • Determine blocking sessions and blocked sessions in 9iR2

    Hi,
    Running 9.2.0.7 on Solaris 2.
    We are trying to develop a query that can show us the blocked sessions and the session causing it. I have one working for 11 but for 9i, its a little more trickier. I am running these two so far:
    select s1.username || '@' || s1.machine || ' ( SID=' || s1.sid ||
           ' )  is blocking ' || s2.username || '@' || s2.machine || ' ( SID=' ||
           s2.sid || ' ) ' AS blocking_status
      from gv$lock l1, gv$session s1, gv$lock l2, gv$session s2
    where s1.sid = l1.sid
       and s2.sid = l2.sid
       and l1.BLOCK = 1
       and l2.request > 0
       and l1.id1 = l2.id1
       and l2.id2 = l2.id2;
    select do.object_name,
           row_wait_obj#,
           row_wait_file#,
           row_wait_block#,
           row_wait_row#,
           dbms_rowid.rowid_create(1,
                                   ROW_WAIT_OBJ#,
                                   ROW_WAIT_FILE#,
                                   ROW_WAIT_BLOCK#,
                                   ROW_WAIT_ROW#)
      from gv$session s, dba_objects do
    where sid = 543
       and s.ROW_WAIT_OBJ# = do.OBJECT_ID;Reason I need this is that lately we have been getting a lot of DEADLOCKS and we want to determine why this is happening a lot now and we want to start with who it is and what objects are causing it....any suggestions?

    mbobak wrote:
    There are a few critical pieces to interpreting a deadlock trace file. First, to be clear, you're getting ORA-00060, not ORA-04020 (which is a library cache deadlock), correct?
    If so, the tracefile will contain a deadlock graph. This will show the type of enqueue involved (TM or TX are the likely candidates), and the modes that locks and requests are being made.
    Then, there's the SQL which encountered the deadlock, and finally, the other SQL involved in the deadlock.
    All the above information is in the deadlock trace file.
    Using it, you ought to be able to determine root cause of the deadlock.
    If you need help understanding it, post here. If you post the deadlock graph, make sure you use code tags, or it will be unreadable.Yes we are getting the ORA-00060. This is what we get exactly from the AppTeam from the App:
    Available exception message: iims.ge.common.exception.IIMSTechnicalException : ORA-00060: deadlock detected while waiting for resourceFrom our latest Deadlock occurence we got a LMD Trace file generated. We can see the DeadLock graph and its SQL. We the enqueue of TX and it's modes. Basically everything you asked for we see it in the trace file. What we want to see is what is causing it or who is so we can fix it. Maybe I am not reading the trace file correctly. I appreciate your assistance in helping me interpret the trace file. As requested, here is the trace file.
    Dump file /var/local/oracle/logs/ora_prod_can1_lmd0_4432.trc
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning and Real Application Clusters options
    JServer Release 9.2.0.8.0 - Production
    ORACLE_HOME = /opt/oracle/9.2.0
    System name:    SunOS
    Node name:      can-clust01
    Release:        5.9
    Version:        Generic_118558-36
    Machine:        sun4u
    Instance name: ORA_PROD_CAN1
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 5
    Unix process pid: 4432, image: oracle@can-clust01 (LMD0)
    *** SESSION ID:(4.1) 2010-08-15 08:07:02.736
    open lock on RM 0 0
    *** 2010-08-15 08:07:31.353
    open lock on RM 0 0
    *** 2010-08-16 11:17:21.469
    user session for deadlock lock 40972c9c0
      pid=50 serial=6956 audsid=189500961 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.1] :
    BLOCKED 40972c570 5 [0x90014][0x19bb82],[TX] [131094,2] 1
    BLOCKER 40972bb98 5 [0x90014][0x19bb82],[TX] [65586,6177] 0
    BLOCKED 40972c9c0 5 [0x110014][0x12ec40],[TX] [65586,6177] 0
    BLOCKER 40972ba18 5 [0x110014][0x12ec40],[TX] [131094,2] 1
    user session for deadlock lock 40972c9c0
      pid=50 serial=6956 audsid=189500961 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.2] :
    BLOCKED 40972c9c0 5 [0x110014][0x12ec40],[TX] [65586,6177] 0
    BLOCKER 40972ba18 5 [0x110014][0x12ec40],[TX] [131094,2] 1
    BLOCKED 40972c570 5 [0x90014][0x19bb82],[TX] [131094,2] 1
    BLOCKER 40972bb98 5 [0x90014][0x19bb82],[TX] [65586,6177] 0
    *** 2010-08-16 11:17:42.495
    user session for deadlock lock 4098bcd08
      pid=59 serial=981 audsid=189501588 user: 61/IIMS_UWR
    O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.3] :
    BLOCKED 41228b128 5 [0x70001][0x178a52],[TX] [131100,2] 1
    BLOCKER 4098bade8 5 [0x70001][0x178a52],[TX] [65595,583] 0
    BLOCKED 4098bcd08 5 [0x130025][0x1475c9],[TX] [65595,583] 0
    BLOCKER 412275b78 5 [0x130025][0x1475c9],[TX] [131100,2] 1
    user session for deadlock lock 4098bcd08
      pid=59 serial=981 audsid=189501588 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.4] :
    BLOCKED 4098bcd08 5 [0x130025][0x1475c9],[TX] [65595,583] 0
    BLOCKER 412275b78 5 [0x130025][0x1475c9],[TX] [131100,2] 1
    BLOCKED 41228b128 5 [0x70001][0x178a52],[TX] [131100,2] 1
    BLOCKER 4098bade8 5 [0x70001][0x178a52],[TX] [65595,583] 0Let's see what we can get out of this now :)

  • PL/SQL report errors: ORA-01422

    Hi all,
    (before i you read i would like to say i have searched the net for this error code but nothing shows up like this problem..)
    I am getting an error problem when i select certain Schemas from a list on an apex app. page, it only works for some schemas not all..
    When i select one schema, it is supposed to display one row.. when i select [ALL] it is supposed to show them all.
    It does work if i select '[ALL]' from the select list (p3_schema_name), just not for every single individual one.
    the error code:
    ORA-01422: exact fetch returns more than requested number of rows
    declare
      vSchema  varchar2(20);
      vStmt  varchar2(1000);
      vVersion number(5);
      vDBName  varchar2(20);
      vHostName varchar2(80);
      vStmt2  varchar2(1000);
      vVersion2 number(5);
      vDBName2  varchar2(20);
      vServer2 varchar2(80);
      vSchema2 varchar2(80);
      CURSOR c_schemas IS
        select owner from dba_tables@P3_DB_NAME.db_link where table_name = 'DDL_LOG' and num_rows > 0 order by owner;
    begin
      IF :P3_SCHEMA_NAME != '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
        vServer2 := :P3_SERVER_NAME;
        vSchema2 := :P3_SCHEMA_NAME;
          vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM';
          Execute Immediate vStmt2 into vDBName2, vVersion2;
            htp.p('<br>');
            htp.p('<table border="1">');
            htp.p('<tr>');
            htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
            htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
            htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
            htp.p('<th bgcolor="#FFCC99">PATCH</th>');
            htp.p('</tr>');
            htp.p('<tr>');
            htp.p('<td>');
            htp.p(vServer2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vDBName2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vSchema2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vVersion2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p('<BR>');
            htp.p('</td>');
            htp.p('</tr>');
            htp.p('</tr>');
            htp.p('</table>');
       ELSE IF :P3_SCHEMA_NAME = '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
       vHostName := :P3_SERVER_NAME;
       vDBName := :P3_DB_NAME;
         open c_schemas;
          htp.p('<br>');
          htp.p('<table border="1">');
          htp.p('<tr>');
          htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
          htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
          htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
          htp.p('<th bgcolor="#FFCC99">PATCH</th>');
          htp.p('</tr>');
        LOOP
          FETCH c_schemas INTO vSchema;
          EXIT WHEN c_schemas%NOTFOUND;
          vStmt  := 'select max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link where DDH_SCHEMA_NR = (select max(DDH_SCHEMA_NR) from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link) and rownum < 2' ;
          Execute Immediate vStmt into vVersion  ;
          htp.p('<tr>');
          htp.p('<td>');
          htp.p(vHostName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vDBName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vSchema);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vVersion);
          htp.p('</td>');
          htp.p('<td>');
          htp.p('<BR>');
          htp.p('</td>');
          htp.p('</tr>');
        END LOOP;
          htp.p('</tr>');
          htp.p('</table>');  
      CLOSE c_schemas;
    END IF;
    END IF;
    END;I have checked the DDH_SCHEMA_NR for repeating entries of the highest number.. some of the ones that dont work do have repeating entries some don't.
    Sorry if this is confusing, i have tried to explain it as best as i can.
    Thanks in advance for any help.
    Ashleigh

    Hello Ashleigh,
    Based on your code, I'd start by running this piece of SQL via command-line (thru SQL Workshop, SQL*Plus, Toad, etc.), replacing &P3_SCHEMA_NAME. and &P3_DB_NAME. with values that are currently causing the routine to fail and see if it returns more than one row. I don't know your data, but DISTINCT and GROUP BY are typically used to return multiple (though grouped/summarized) rows. It appears to be the only statement that would cause the error your seeing (more than one row being returned into single variables).
    select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM;I'm actually surprised that the code runs at all. I didn't think 'execute immediate' would know what to do with substitutions indicated as "&something." (I've typically seen that when substituting in dynamic HTML/Javascript code but maybe I'm learning something new). But since you already have vServer2 and vSchema2, I'd be more apt to code it as:
    vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from ' ||
    vSchema2 || '.ddl_log@' || vServer2 || '.db_link GROUP BY DDH_DB_NM';Hope this helps,
    John

  • PL/SQL-Error: ORA-00604 - ORA-01422 makes no sense. Any Idea anyone ?

    Problem:
    No matter if creating new or recompiling old procedures
    (that had been compiled successfully lon ago),
    I always receive the very same error message:
    ORA-00604: ...recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-at line 5 (mouse cursor blinks at teh first line of code...)
    It is the same with PLEdit, HORA and SQL*PLUS:
    even the most simple procedures are not compiled
    Hints: I encounter this problem since I installed Forms 6i.
    I am using database 8.1.7 on Redhat Linux (as a server),
    and working on a W2K client.
    Any idea anyone ?
    ThanX in advance !

    Sorry, I found my error : Trigger on Database
    Maybe others are interested too:
    Be careful when using triggers "on schema" or "on database",
    because, as I have found, the error message doesn4t say that.
    I had a few such triggers for logging purposes.
    After I disabled my database triggers, I could continue compiling.
    Bye, Jan.

  • ORA-01422- exact fetch returns more than requested number of rows in D2K Report

    Hi All,
    Greetings.
    I am using a report which is being called from the from in one of my application. The report is working fine from quiet a long time. I have an error with a particular record alone and it is working fine for all other records.
    When I try to run the report, I am getting the error as Rep-1401- 'cf_vatformula' : Fatal pl/sql error occured.
                                                                                ORA-01422- Exact fetch returns more than requested number of rows.
    I opened the formula column and run the sql codes that are used in the formula column cf_vat and all of them are working fine. None of them are fetching more a single row. But, when I run the report, I am getting the same error as mentioned above.
    Please help me resolve the issue ASAP. Thanks in Advance.
    Regards,
    Bhaskar.

    Hi InoL,
    Thanks for your time.
    I am sure that there is no other procedure used in cf_vatformula. It has select queries in and all of them are fetching the data not more than a single row.
    I have tested each and every select query with every possible output.
    Regards,
    Bhaskar.

  • Instance terminted with ORA-00445 and ORA-00494

    Hi Folks,
    Oracle 11g Instance terminated after ORA-00445 and ORA-00494. Not sure what is the problem didnot have this problem before. Can any body pls help?
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Below is the message found in alertlog.
    Archived Log entry 17939 added for thread 1 sequence 17973 ID 0xee1270c6 dest 1:
    Thu Apr 19 02:32:15 2012
    WARNING:io_getevents timed out 600 sec
    Thu Apr 19 02:32:17 2012
    WARNING:io_getevents timed out 600 sec
    Thu Apr 19 02:33:32 2012
    WARNING:io_getevents timed out 600 sec
    Thu Apr 19 02:35:56 2012
    Process 0x0xdfb80810 appears to be hung while dumping
    Current time = 1203097316, process death time = 1203032607 interval = 60000
    Attempting to kill process 0x0xdfb80810 with OS pid = 7563
    OSD kill succeeded for process 0xdfb80810
    Thu Apr 19 02:36:32 2012
    WARNING:io_getevents timed out 600 sec
    Thu Apr 19 02:38:11 2012
    Errors in file /apps/opt/oracle/admin/diag/rdbms/vchsit2/vchsit2/trace/vchsit2_smco_8548.trc (incident=76297):
    ORA-00445: background process "W000" did not start after 120 seconds
    Incident details in: /apps/opt/oracle/admin/diag/rdbms/vchsit2/vchsit2/incident/incdir_76297/vchsit2_smco_8548_i76297.trc
    Thu Apr 19 02:38:11 2012
    Errors in file /apps/opt/oracle/admin/diag/rdbms/vchsit2/vchsit2/trace/vchsit2_arc2_7523.trc (incident=76329):
    ORA-00494: enqueue [CF] held for too long (more than 900 seconds) by 'inst 1, osid 7315'
    Incident details in: /apps/opt/oracle/admin/diag/rdbms/vchsit2/vchsit2/incident/incdir_76329/vchsit2_arc2_7523_i76329.trc
    Thu Apr 19 02:38:11 2012
    Fatal NI connect error 12537, connecting to:
    (LOCAL=NO)
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    Time: 19-APR-2012 02:38:11
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12537
    TNS-12537: TNS:connection closed
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    opiodr aborting process unknown ospid (2743) as a result of ORA-609
    Thu Apr 19 02:38:12 2012
    Trace dumping is performing id=[cdmp_20120419023812]
    Killing enqueue blocker (pid=7315) on resource CF-00000000-00000000 by (pid=7523)
    by killing session 6.1
    Killing enqueue blocker (pid=7315) on resource CF-00000000-00000000 by (pid=7523)
    by terminating the process
    ARC2 (ospid: 7523): terminating the instance due to error 2103
    Instance terminated by ARC2, pid = 7523
    Thu Apr 19 10:43:07 2012

    Hi;
    Please see:
    ORA-00445: Background Process "xxxx" Did Not Start After 120 Seconds [ID 1345364.1]
    Regard
    Helios

  • ORA-12500 and Memory limited

    This is list of environment
    - Oracle 8.1.7
    - OS is AIX
    - RAM = 2GB
    - 3 instances
    when user try to connect too much that will show ORA-12500 and I select this statement in a problem instance
    "select count(1) from v$session" the result estimate is 502.
    "select count(1) from v$process" the result estimate is 504
    and another instance 10 sessions and 20 sessions.
    This's folloing a part of parameters.
    bitmap_merge_area_size integer 1048576
    create_bitmap_area_size integer 8388608
    db_block_buffers integer 10000
    db_block_lru_latches integer 2
    db_block_max_dirty_target integer 10000
    db_block_size integer 8192
    distributed_transactions integer 243
    hash_area_size integer 16777216
    hash_multiblock_io_count integer 32
    java_pool_size string 20000K
    large_pool_size string 0
    processes integer 800
    sessions integer 885
    shared_pool_reserved_size string 15000000
    shared_pool_size string 300000000
    sort_area_retained_size integer 1048576
    sort_area_size integer 4194304
    sort_multiblock_read_count integer 32
    transactions integer 973
    transactions_per_rollback_segment integer 5
    How to modify or change some parameter for fix this problem?

    I think you need to give more description about problem.
    You might review the following Oracle Metalink Document:
    SQL*Net (oracle Networking) Common Errors & Diagnostic Worksheet: Doc ID: Note:45878.1
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:5712140308577577466::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,45878.1,1,0,1,helvetica
    If possible also upgrade your database.
    Adith

  • ORA-01422 exact fetch returns more than requested number of rows on invoice

    Hello developer,
    Current I m facing problem ORA-01422 exact fetch returns more than requested number of rows in Invoce Standard form when we select PO_Default invoice type for some specific PO Number not for all. I m not able to handle the error bcoz im new in oracle apps. it's urgent for user requirement. Plz guide me how to take approch to handle the situation.........
    select Po_Default invoice type=>enter po number=>press ok button=>got error ORA-01422
    I got query from POST_QUERY TRIGEER like
    function get_po_number (l_po_number varchar2,l_vendor_id OUT number) return number is
    l_po_header_id number;
    --Bug fix:1096002
    --Removed the function call UPPER from the WHERE clause so that the query
    --becomes case sensitive.
    -- BUG 2519682 vendor_id added in the Select statement and futher in the fetch statement
    cursor po_number_cursor is
    SELECT po_header_id,vendor_id
    FROM po_headers
    WHERE type_lookup_code IN ('STANDARD', 'BLANKET', 'PLANNED')
    AND approved_flag = 'Y'
    AND segment1 = l_po_number
    -- Bug 2289727. Enhanced Matching Controls to Finally Closed POs
    AND (NVL(closed_code, 'X') <> 'FINALLY CLOSED'
    OR :parameter.show_final_closed_po_flag = 'Y')
    AND PCARD_ID IS NULL; --bug4627502
    /* Commented out since this is not relevant even if executed.
    AND (segment1 LIKE SUBSTR(l_po_number, 1, 2) || '%' OR
    segment1 LIKE SUBSTR(l_po_number, 1, 1) ||
    SUBSTR(l_po_number, 2, 1) || '%' OR
    segment1 LIKE SUBSTR(l_po_number, 1, 1) ||
    SUBSTR(l_po_number, 2, 1) || '%' OR
    segment1 LIKE SUBSTR(l_po_number, 1, 2) || '%' );
    begin
    open po_number_cursor;
    fetch po_number_cursor INTO l_po_header_id,l_vendor_id;
    close po_number_cursor;
    return(l_po_header_id);
    end get_po_number;
    plz help me how to resolved this issue it's urgent.
    thanks in advance.........

    This bug is documented in the following note on metalink.oracle.com
    APXINWKB - Creating PO Default Invoice Errors with ORA-01422 Exact Fetch Returns More Than Requested Number Of Rows [ID 946578.1]
    The solution is to apply patch 8765847.
    Hope this answers your question,
    Sandeep Gandhi

  • Ora 600 and ora 7445 error in oracle 10g r2

    hi all,
    we are using Oracle 10g r2.
    os is windows 2003 server,
    ram is 4 gb.
    front end is java .
    we got a below mentioned errors.
    i got the RA-00600: internal error code, arguments: [qerghFetch:inc], [], [], [], [], [], [], [],
    and ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x61F04AC9] [ADDR:0xC] [UNABLE_TO_READ] []
    and Error 0 in kwqmnpartition(), aborting txn errors.
    for aug 3 11.42.47 we got a ora 600 error after that through front end (java) users can't able to connect the database.the not able to executed the query session disconnected error.
    what is reason for theis error . how it will rectifiy.?
    pls advice.Below i attached the alret log message .
    Sun Aug 02 04:04:24 2009
    Error 0 in kwqmnpartition(), aborting txn
    Sun Aug 02 05:48:10 2009
    Error 0 in kwqmnpartition(), aborting txn
    Sun Aug 02 05:49:10 2009
    Error 0 in kwqmnpartition(), aborting txn
    Sun Aug 02 07:38:49 2009
    Thread 1 advanced to log sequence 1732
    Current log# 3 seq# 1732 mem# 0: E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
    Sun Aug 02 07:44:14 2009
    Error 0 in kwqmnpartition(), aborting txn
    Sun Aug 02 07:45:14 2009
    Error 0 in kwqmnpartition(), aborting txn
    Sun Aug 02 22:00:26 2009
    Thread 1 advanced to log sequence 1733
    Current log# 1 seq# 1733 mem# 0: E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG
    Mon Aug 03 07:08:15 2009
    Thread 1 advanced to log sequence 1734
    Current log# 2 seq# 1734 mem# 0: E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG
    Mon Aug 03 09:28:23 2009
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 09:30:27 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 11:42:47 2009
    Errors in file e:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_6012.trc:
    ORA-00600: internal error code, arguments: [qerghFetch:inc], [], [], [], [], [], [], []
    Mon Aug 03 13:20:00 2009
    Thread 1 advanced to log sequence 1735
    Current log# 3 seq# 1735 mem# 0: E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
    Mon Aug 03 16:07:07 2009
    Errors in file e:\oracle\product\10.2.0\em_2\rdbms\trace\orcl_ora_4756.trc:
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x61F04AC9] [ADDR:0xC] [UNABLE_TO_READ] []
    Mon Aug 03 16:07:11 2009
    Process m000 died, see its trace file
    Mon Aug 03 16:07:11 2009
    ksvcreate: Process(m000) creation failed
    Mon Aug 03 16:08:37 2009
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 16:10:40 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 17:25:05 2009
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 17:27:11 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 17:32:19 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 17:33:24 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 18:52:08 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 18:54:09 2009
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 19:05:33 2009
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Mon Aug 03 19:09:02 2009
    Errors in file e:\oracle\product\10.2.0\em_2\rdbms\trace\orcl_ora_5132.trc:
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x7C34126B] [ADDR:0x0] [UNABLE_TO_WRITE] []
    Mon Aug 03 19:10:27 2009
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn
    Error 0 in kwqmnpartition(), aborting txn

    Hi reshumakur
    As this is your PRODUCTION system THEN_ The best help to offer in case of ORA-600, and ORA-7445 is to open SR with metalink. Submit with the SR the following
    1- Alert log
    2- Trace files (in ur case e:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_6012.trc: and e:\oracle\product\10.2.0\em_2\rdbms\trace\orcl_ora_4756.trc:)
    3- Describe what was happening when you had these errors.
    Try to avoid free help when you have ORA-600 and ORA-07445. This errors could be becuase of BUGS. Oracle Support will know this from the call stack in the trace file.
    Then Do your best to patch 10.2.0.4 and the latest CPU patch.
    Good Luck

  • Error during recover datafile - ORA-01422: exact fetch returns more than ..

    Hi,
    we have got actual a serious problem in our database. Some days ago we created a new datafile for a tablespace in the wrong directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We recognized our mistake and generated the datafile with the same name in teh right directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunaindex/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We set the "wrong" datafile offline in order to rename and replace this in file in the right directory:
    alter database datafile '/oralunadata/anzora8/ANZSIIDX08.dbf' offline;
    ALTER TABLESPACE 'ANZSIIDX'
    RENAME DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf',
    TO '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    After this we wanted to bring the datafile online again with a recovery but
    this fails with teh strange error-message:
    SQL> recover datafile 109;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    A similar thing happens with our RMAN backup from last weekend, which failed:
    channel c4: backup set complete, elapsed time: 00:32:33
    input datafile fno=00109 name=/oralunadata/anzora8/ANZSIIDX08.dbf
    input datafile fno=00103 name=/oralunaindex/anzora8/ITOPROTOKOLLEIDX01.dbf
    input datafile fno=00097 name=/oralunadata/anzora8/ITOPROTOKOLLE03.dbf
    input datafile fno=00096 name=/oralunadata/anzora8/ITOPROTOKOLLE02.dbf
    channel c4: specifying datafile(s) in backupset
    channel c4: starting compressed incremental level 0 datafile backupset
    continuing other job steps, job failed will not be re-run
    ORA-00600: internal error code, arguments: [krbbfmx_notfound], [109], [12801], [], [], [], [], []
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-00604: error occurred at recursive SQL level 1
    Has anybody an idea, how can we bring back the datafile online in order to run succesfull an RMAN backup?
    Actually we see just the workaraound to move the objects from the affected tablespace to new tablespace
    and the drop the empty tablespace what would be quite time consuming and not really practicable for us.
    kind regards,
    Marco

    Hi,
    actual we see this in v$datafile:
    /oralunaindex/anzora8/ANZSIIDX01.dbf     15     ANZSIIDX     10737418240     1310720     AVAILABLE     15     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX02.dbf     46     ANZSIIDX     10737418240     1310720     AVAILABLE     46     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX03.dbf     58     ANZSIIDX     10737418240     1310720     AVAILABLE     58     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX04.dbf     65     ANZSIIDX     10737418240     1310720     AVAILABLE     65     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX05.dbf     78     ANZSIIDX     10737418240     1310720     AVAILABLE     78     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX06.dbf     85     ANZSIIDX     10737418240     1310720     AVAILABLE     85     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX07.dbf     88     ANZSIIDX     10737418240     1310720     AVAILABLE     88     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX09.dbf     109     ANZSIIDX               AVAILABLE     109                                   RECOVER
    /oralunaindex/anzora8/ANZSIIDX08.dbf     110     ANZSIIDX     10737418240     1310720     AVAILABLE     110     NO     0     0     0     10737352704     1310712     ONLINE
    We dont use RMAN-Catalog for backup the information is only stored in the controlfile.
    The recovery datafile command with full path including for the datafile failed with the same error message:
    SQL> connect / as sysdba
    Connected.
    SQL> recover datafile '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    I guess it is a bug of oracle which will sometimes occur when you give two datafiles the same name in different directories that this poduces errors as above in the RMAN inerface(packages)!?
    Maybe we could force to set he tablespace offline, rename the new added datafiles and ry to bring the tablespace online but nobody knows if it works really and we get the tablespace online again?
    Therefore at the moment maybe it's the best way to move the objects away from this tablespace and than drop them, isn't it?
    regards,
    Marco

  • ORA-01422,,, Very Strange Error in my code!!!

    Dear,
    I need your help please,,,
    I have the below code in a database package which always throws (ORA-01422)
    SELECT (NVL(amount,0) - NVL(cash_disc,0)) INTO v_bill_amount
    FROM pac_bills
    WHERE pac_bills.bill_no = v_bill_no AND pac_bills.bill_type = 3;
    Now when I execute this code I get (ORA-01422) for v_bill_no = 207000003. when I execute same statement from TOAD or SqlPlus IT RETURN ONE ROW ONLY!!! for same bill_no
    This error make me mad and I need any help

    I would try to see what extra rows are selected in the pacakage. If it's a database package then it could be something like this:
    /* Temp table to register selected rows */
    CREATE TABLE Tmp_Debug(
      TS TIMESTAMP, /* to identify different statement executions */
      bill_no INTEGER,
      r ROWID
    /* DEBUG fragment to be inserted into the package */
    DECLARE
      PROCEDURE Trace(
        p_bill_no INTEGER
      ) IS
        PRAGMA AUTONOMOUS_TRANSACTION;
      BEGIN
        INSERT INTO Tmp_Debug(ts, bill_no, r)
          SELECT systimestamp, p_bill_no, (NVL(amount,0) - NVL(cash_disc,0))
          FROM pac_bills
          WHERE pac_bills.bill_no = p_bill_no AND pac_bills.bill_type = 3;
        COMMIT;
      END;
    BEGIN
      /* Original select */
      SELECT (NVL(amount,0) - NVL(cash_disc,0)) INTO v_bill_amount
      FROM pac_bills
      WHERE pac_bills.bill_no = v_bill_no AND pac_bills.bill_type = 3;
    EXCEPTION
      WHEN TOO_MANY_ROWS THEN
        Trace(v_bill_no);
    END;
    /* End of DEBUG fragment */Reproduce the error and see in Tmp_Debug, what rows are actually selected. Sure I didn't test it.
    If it's a forms package then you may implement some debug form or something else to see the actually selected rows.
    One more thought: is it possible that app logic produces extra rows? They are not commited and rolled back after the error, this is why you can't see them in TOAD/Sql*Plus.
    Regards,
    Dima.

Maybe you are looking for