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

Similar Messages

  • Getting ORA-00604 along with ORA-06502

    Hi,
    I am running following query in my database server (for JD enterprise One Application)
    CREATE TABLE TMPLDTA.F0031 (AVUKID NUMBER, AVAN8BK NUMBER, AVUPMJ NUMBER(6), AVU
    PMT NUMBER, AVPID NCHAR(10), AVUSER NCHAR(10), AVJOBN NCHAR(10)) tablespace tmpl
    dtat storage ( pctincrease 0 )
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 7
    when I do it from another id(my id with DBA role) it works but when I(application administrator) do it from application superuser's id, it throws above error.
    *** application super user is also having DBA access.
    Is it any issue regarding trigger?? Or can anyone Please help me regarding this error's solution..
    -Thanks

    Elapsed: 00:00:00.34
    SQL> CREATE TABLE TMPLDTA_F0031
      2    (
      3     AVUKID  NUMBER ,
      4     AVAN8BK NUMBER ,
      5     AVUPMJ  NUMBER(6) ,
      6     AVUPMT  NUMBER ,
      7     AVPID NCHAR(10) ,
      8     AVUSER NCHAR(10) ,
      9     AVJOBN NCHAR(10)
    10    )
    11    TABLESPACE tmpldtat STORAGE
    12    (
    13     PCTINCREASE 0
    14    )
    15  /
    Table created.
    Elapsed: 00:00:00.28No error , Are you running this on SQL Plus ?
    saha wrote:
    Is it any issue regarding trigger?? Or can anyone Please help me regarding this error's solution..
    -ThanksPlease check any DB level trigger are there ?
    -RB

  • Strange errors ORA-00604 ORA-30511 ORA-06512

    Hello, any clues about what could casuse this error? It is Oracle 11.2.0.1
    SQL> drop user config cascade;
    drop user config cascade
    ERROR en linea 1:
    ORA-00604: se ha producido un error a nivel 1 de SQL recursivo
    ORA-30511: operacion DDL no valida en los disparadores del sistema
    ORA-06512: en linea 993
    ORA-30511: operacion DDL no valida en los disparadores del sistemaIf I try to drop a table I get the same error. Never seen that before... Any clues?

    DBA-ES wrote:
    Hello, any clues about what could casuse this error? It is Oracle 11.2.0.1
    SQL> drop user config cascade;
    drop user config cascade
    ERROR en linea 1:
    ORA-00604: se ha producido un error a nivel 1 de SQL recursivo
    ORA-30511: operacion DDL no valida en los disparadores del sistema
    ORA-06512: en linea 993
    ORA-30511: operacion DDL no valida en los disparadores del sistemaIf I try to drop a table I get the same error. Never seen that before... Any clues?
    30511, 00000, "invalid DDL operation in system triggers"
    // *Cause:  An attempt was made to perform an invalid DDL operation
    //          in a system trigger. Most DDL operations currently are not
    //          supported in system triggers. The only currently supported DDL
    //          operations are table operations and ALTER?COMPILE operations.
    // *Action: Remove invalid DDL operations in system triggers.

  • Ora-00604,ora-01422 error while dropping the table

    Hi gurus,
    I am using Oracle 10g R2 on windows 2000 platform,while dropping the table the following error occured.
    ORA-00604 : error occurred at recursive sql level 1.
    ORA-01422: exact fetch returns more than requested number of rows.
    Need urgent help.
    Thanks in advance

    Is there an AFTER EVENT trigger defined on this database? Can you check that?
    Secondly, was this database migrated from earlier version? I remember having seen this problem on 9i (it was 9.2.0.1 or 9.2.0.2; I can't recall exactly).

  • 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-00604 error occured at recursive level1,ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,ORA-06512

    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad

    26bffcad-f9a2-4dcf-afa0-e1e33d0281bf wrote:
    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad
    ORA-20123 is a localized/customized error code & message; therefore any solution depends upon what is unique inside your DB now.
    I suspect that some sort of TRIGGER exists, which throws posted error, but this is just idle speculation on my part.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • 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

  • 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

  • Ora-00604 error while taking tkprof of a trace file

    Sorry i am giving the full erro but omitting exact table names
    Hi ,
    I have an error while taking tkprof of a trace file.
    I gave the following command ---
    tkprof <source.trc> <file.prc> sys=no sort=exeela,fchela,prsela explain= /
    error is --
    Error in create table of EXPLAIN PLAN table : unix_session_user.prof$paln_table
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: Step-6:DDL
    Event Security. You are not permitted to perform the requested structural
    changes to PROF (TABLE)
    Event triggered : CREATE
    ora_login_user
    (session_user) : unix_session_user(dummy)
    Search : select count(*) from
    tabl(dummy table name) where obj_name like '%\%%' escape '\' and obj_type =
    'TABLE' and obj_type = 'USER' and ( event_CREATE = 'Y' or status =
    'Override')
    ORA-06512: at line 162
    ORA-06510: PL/SQL: unhandled
    user-defined exception
    EXPLAIN PLAN option disabled.
    i searched for the error and in oracle forum i found a solution .. http://forums.oracle.com/forums/thread.jspa?threadID=844287&tstart=0
    but after giving the table option it is giving the same error
    tkprof <source.trc> <file.prc> sys=no sort=exeela,fchela,prsela table=old_schema.plan_table explain= /
    it again gave the same error.
    In both two cases it gives elapsed time results,library cache missing etc but before giving this it throws ORA-00604 error as stated above
    then i again correct the tkprof statement ..
    tkprof <source.trc> <file.prc> sys=no sort=exeela,fchela,prsela table=new_schema.plan_table explain= /
    say this schema name here i used is dummy schema name.
    My question is did this error came as we had not sufficient previlages in the old_schema but that previleges we have in new_schema?
    My databse version is 9.2.0.4.0
    Thanks in advance
    Edited by: bp on Feb 3, 2009 11:36 PM
    Edited by: bp on Feb 3, 2009 11:40 PM

    Please post here full error message, there should be lines with ORA-00604 and then some other ORA as well.
    And are there any trace files generated during this error?
    And as You can see from error description, probably You will have to contact with Oracle support in order to solve this case:
    oerr ora 00604
    00604, 00000, "error occurred at recursive SQL level %s"
    // *Cause:  An error occurred while processing a recursive SQL statement
    // (a statement applying to internal dictionary tables).
    // *Action: If the situation described in the next error on the stack
    // can be corrected, do so; otherwise contact Oracle Support.

  • ORA-00604: error occurred at recursive SQL level 2

    Hello,
    I am trying to create a simple table and I am getting a ora error as below.
    SQL> create table album(name varchar2(100),image blob);
    create table album(name varchar2(100),image blob)
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 2
    ORA-01422: exact fetch returns more than requested number of rows
    how to resolve this?Any help..
    Thanks,
    Ranz.

    Hi,
    *@Anurag Tibrewal,*
    I followed as per the order od statements you gave. Initially there was no table "ALBUM" when I executed the first 2 statements.
    3rd staement i created a table "ALBUM" and then 4th and 5th statement showed that I have a table called "ALBUM".
    Now when again I wanted to drop the table I am getting the same error.
    SQL> drop table album
    2 ;
    drop table album
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    *@Jean-Valentin*
    I am not finding the trace file for today as i checked the alert log. When i searched for the the error I found the error for March 4. No ora-00604 error from today.
    As shown in ALERT LOG.
    Thu Mar 04 10:50:41 2010
    Errors in file d:\oracle\product\10.2.0\admin\raneeshtest\bdump\*raneeshtest_j000_5976.trc*:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-04030: out of process memory when trying to allocate 172 bytes (Typecheck,seg:kggfaAllocSeg)
    ORA-12012: error on auto execute of job 1
    ORA-04030: out of process memory when trying to allocate 16428 bytes (pga heap,kgh stack)
    Trace file details:
    Dump file d:\oracle\product\10.2.0\admin\raneeshtest\bdump\raneeshtest_j000_5976.trc
    Thu Mar 04 10:50:31 2010
    ORACLE V10.2.0.3.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Personal Oracle Database 10g Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Windows NT Version V6.0 Service Pack 1
    CPU : 2 - type 586, 2 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:27M/2037M, Ph+PgF:341M/4352M, VA:4M/2047M
    Instance name: raneeshtest
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Windows thread id: 5976, image: ORACLE.EXE (J000)
    *** 2010-03-04 10:50:31.224
    *** ACTION NAME:() 2010-03-04 10:50:30.276
    *** MODULE NAME:() 2010-03-04 10:50:30.195
    *** SERVICE NAME:(SYS$USERS) 2010-03-04 10:50:30.195
    *** SESSION ID:(137.401) 2010-03-04 10:50:30.195
    *********START PLSQL RUNTIME DUMP************
    ***Got internal error Exception caught in pfrrun() while running PLSQL***
    ***Got ORA-4030 while running PLSQL***
    PACKAGE SYSMAN.MGMT_ADMIN_DATA:
    library unit=3416af50 line=128 opcode=117 static link=0 scope=0
    FP=3ca31374 PC=30f42000 Page=0 AP=3ca47b2c ST=3ca32778
    DL0=3ca46564 GF=3ca465b0 DL1=3ca46584 DPF=3ca465a8 DS=30f421e4
    DON library unit variable list instantiation
    0 3416af50 3ca465b0 3ca2005c
    1
    2
    3
    4
    5
    6
    7
    scope frame
    2 0
    1 3ca31374
    package variable address size
    0 3ca46698 16
    1 3ca466a8 16
    2 3ca466b8 16
    3 3ca466c8 16
    4 3ca466d8 16
    5 3ca466e8 20
    6 3ca466fc 16
    7 3ca4670c 20
    8 3ca46720 16
    9 3ca46730 4
    10 3ca46734 4
    11 3ca46738 4
    12 3ca4673c 4
    13 3ca46740 4
    14 3ca46744 4
    15 3ca46748 4
    16 3ca4674c 4
    17 3ca46750 4
    18 3ca46754 4
    19 3ca46758 4
    20 3ca4675c 4
    21 3ca46760 20
    22 3ca46774 20
    23 3ca46788 20
    24 3ca4679c 20
    25 3ca467b0 4
    26 3ca467b4 4
    27 3ca467b8 4
    28 3ca467bc 4
    29 3ca467c0 16
    30 3ca467d0 16
    31 3ca467e0 8
    32 3ca467e8 39
    33 3ca46810 39
    34 3ca46838 521
    35 3ca46a44 521
    36 3ca46c50 140
    37 3ca46cdc 140
    38 3ca46d68 30
    39 3ca46d88 30
    40 3ca46da8 30
    41 3ca46dc8 30
    42 3ca46de8 30
    43 3ca46e08 30
    44 3ca46e28 30
    45 3ca46e48 30
    46 3ca46e68 30
    47 3ca46e88 30
    48 3ca46ea8 30
    49 3ca46ec8 30
    50 3ca46ee8 140
    51 3ca46f74 140
    52 3ca47000 30
    53 3ca47020 30
    54 3ca47040 30
    55 3ca47060 30
    56 3ca47080 39
    57 3ca470a8 39
    version=43123476 instantiation size=2920
    line pcode offset
    1 2
    4 620
    5 632
    6 632
    7 638
    8 644
    14 650
    29 810
    44 970
    47 992
    48 1000
    49 1008
    50 1016
    51 1024
    52 1032
    53 1040
    54 1048
    55 1056
    56 1064
    57 1072
    60 1080
    128 1814
    196 2548
    197 2554
    198 2560
    199 2566
    205 2572
    206 2578
    438 2584
    1 2586
    ***********END PLSQL RUNTIME DUMP************
    *** 2010-03-04 10:50:40.690
    ORA-12012: error on auto execute of job 1
    ORA-04030: out of process memory when trying to allocate 16428 bytes (pga heap,kgh stack)
    *** 2010-03-04 10:50:41.206
    ORA-00604: error occurred at recursive SQL level 1
    ORA-04030: out of process memory when trying to allocate 172 bytes (Typecheck,seg:kggfaAllocSeg)
    ORA-12012: error on auto execute of job 1
    ORA-04030: out of process memory when trying to allocate 16428 bytes (pga heap,kgh stack)
    SQL> select * from dual;
    D
    X
    SQL>
    This is the output. Its returning corredclty. Now what is the problem? Pls help me.

  • Database error Ora-00604

    hi all
    i facing Ora-00604.
    before this error i am got
    ORA-12638: Credential retrieval failed
    Release 10.1.0.2.0 - Production on Tue Aug 15 17:11:27 2006 on Win2003Server
    then after i check Alert_orcl.log file and find Ora-00604 error
    last few lines of Alert_orcl.log file
    Tue Aug 15 16:53:01 2006
    Errors in file d:\oracle\product\10.1.0\admin\orcl\udump\orcl_ora_2888.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00922: missing or invalid option
    ORA-06512: at line 2
    Tue Aug 15 16:55:42 2006
    Errors in file d:\oracle\product\10.1.0\admin\orcl\udump\orcl_ora_3332.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00922: missing or invalid option
    ORA-06512: at line 2
    Tue Aug 15 17:01:26 2006
    Errors in file d:\oracle\product\10.1.0\admin\orcl\udump\orcl_ora_3312.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00922: missing or invalid option
    ORA-06512: at line 2
    then Oracle Expert What should i do for correct this error..
    reply plz.
    (Testing Enviorments)
    regards
    Mohammadi
    Message was edited by:
    Mohammadi52

    hi dear aijaz
    i am search ora-00604 error in oracle documentation. and the solution is check and start tracing. ok
    and also i am try to connect through OEM and i am successfully connected through OEM.
    and still through sqlplus i got error.
    then i restart my PC after restart i am able to connect through sqlplus.
    but dear i still get error as scott /tiger user...but error is
    SQL> conn scott/tiger
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00922: missing or invalid option
    ORA-06512: at line 2
    and i am also check in oracle doc.. solution is Call Oracle Support.
    i want ur comment and all member..
    thanx for reply
    regards
    Mohammadi52

  • Error showing in Login as : ORA-00604:error occured at recursive SQL level

    Hi,
    I am facing problem in Login in to user Test:
    I have created a trigger and built in sys environment:
    CREATE OR REPLACE TRIGGER TEST_LOGON
    AFTER LOGON ON TEST.SCHEMA
    DECLARE
    num INTEGER;
    v_grant VARCHAR2(32767);
    l_username VARCHAR2(30) := 'TEST';
    BEGIN
    IF USER=l_username THEN
    num:=0;
    FOR obj IN (SELECT TABLE_NAME FROM DBA_TABLES
    WHERE TABLE_NAME LIKE 'BS_%') LOOP
    v_grant:='GRANT ALL ON '||obj.TABLE_NAME || ' TO ' || USER;
    EXECUTE IMMEDIATE 'GRANT ALL ON' || obj.TABLE_NAME || ' TO ' || USER;
    num := num + 1;
    END LOOP;
    END IF;
    END;
    The trigger got executed in sys environment.
    But when I am Logging to User as Test its showing Error as:
    ORA-00604:error occured at recursive SQL level 1
    ORA-00990:missing or invalid privilege
    ORA-06512:at line 15
    Kindly any help will be needful for me.
    Thanks and Regards

    user598986 wrote:
    Now its giving Error as :
    ORA-00942:Table or view does not existWell, first of all dynamic grants it is not a good idea. Secondly, it is not a good idea to create objects in sys schema. Now about your trigger. Trigger is always created with definer rights, so in your case trigger was created by SYS and will be executed on behalf of SYS. Now, since trigger is created on TEST.SCHEMA it will be called only when user TEST is logging it. So there is no need for:
    l_username VARCHAR2(30) := 'TEST';
    BEGIN
    IF USER=l_username THENNow you think FOR loop selects tables that start with BS_. Keep in mind, _ is a wildcard for LIKE - it indicates any single character, so FOR loop will also select tables that start with BSA, for example. But this is not all. FOR loop selects matchingl tables in whole databse, so tables can belong to any user. At the same time EXECUTE IMMEDIATE does not specify table owner. Therefore, since trigger is owned by SYS and, as I already mentioned, executes on behalf of SYS, table owner in GRANT statement will default to SYS, not to actual table owner. That is why you get ORA-00942.
    Now the "bad" part. Even if you fix it and provide both owner and table name it still will fail with ORA-30511: invalid DDL operation in system triggers. Why? Check ORA-30511 details:
    ORA-30511: invalid DDL operation in system triggers
    Cause: An attempt was made to perform an invalid DDL operation in a system trigger. Most DDL operations currently are not supported in system triggers. The only currently supported DDL operations are table operations and ALTER?COMPILE operations.
    Action: Remove invalid DDL operations in system triggers.SY.

  • Drop Table :ORA-00604: error occurred at recursive SQL level 1

    Hi,
    When I am trying to drop a table, getting the following error:
    SQL> drop table drp_test;
    drop table drp_test
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    This is applicable even when I am trying to drop a table as sys user. I am not able to drop any table within this database. Previously I was able to carry this operation successfully.
    Database Version: 10.2.0.1.0
    OS: Linux
    Thanks in advance for your valuable time.
    Regards,
    Joy

    Hi Anurag,
    I was unable to access net and hence is the delay in reply. Kindly suggest me regarding the level of trace to be generated.
    Regards,
    Joy

  • Getting error ORA-00604: error occurred at recursive SQL level 1

    Folks getting this error while executing dbms-stats , before to start upgrade to 11g
    any help would be appreciated
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
    BEGIN DBMS_STATS.GATHER_DICTIONARY_STATS; END;
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01426: numeric overflow
    ORA-06512: at "SYS.DBMS_STATS", line 13336
    ORA-06512: at "SYS.DBMS_STATS", line 13643
    ORA-06512: at "SYS.DBMS_STATS", line 15985
    ORA-06512: at "SYS.DBMS_STATS", line 16027
    ORA-06512: at line 1

    Have you tried to pass the parameters like for example:
    begin
    DBMS_STATS.GATHER_DATABASE_STATS (
    estimate_percent =>100,
    block_sample=>FALSE,
    method_opt=>'for all columns size auto',
    degree=>null,
    cascade=>true,
    no_invalidate=>false,
    options=>'GATHER STALE',
    gather_sys=>FALSE);
    end;
    /http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1049486

  • Ora-00604 error and ora 01000 error while report generation.

    hi all,
    I am trying to generate the multiple reports of same template through a program.
    While this job is running, i get the following error at the BIP console and the reports don't get generated.
    [101711_044115578][][EXCEPTION] java.sql.SQLException: ORA-00604: error occurred
    at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-01000: maximum open cursors exceeded
    Kindly help.
    Thanks.

    Lots of resources with a simple search to see what this is about, for example:
    http://www.orafaq.com/wiki/ORA-01000
    ORA-01000:     maximum open cursors exceeded
    Cause:     A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.
    Action:     Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.
    open_cursors parameter
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams160.htm#REFRN10137
    Oracle support note:
    OERR: ORA-1000 maximum open cursors exceeded (Doc ID 18591.1)

Maybe you are looking for