ORA-06512 and/or ORA-00936 ... simple procedure problem probably

I'm passing in codes like the following to the stored procedure (below):
",IRE,UK,FR,SCOT,WALES" (a string of words seperated by a ',')
Problem is I get the following error:
ORA-00936: missing expression ORA-06512: at "APPNAME.PKG_TOOL", line 132 ORA-06512: at line 1
I googled the two ORA's but am still stumped. I'd appreciate any help at all as I'm still not overly familiar with SQL.
PROCEDURE sp_check_code_Exist(p_CodeList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
     thissql varchar(1000);
     BEGIN
          thissql := thissql || 'select * from codes_data c where ';
          thissql := thissql || 'c.code in ('|| p_CodeList ||') ';
          open p_cursor FOR thissql;
          begin
                 Execute immediate thissql;
          end;
     END sp_check_code_Exist;

I know this is digressing a bit from the thread heading but I'd like to know if I really will be screwed if I don't optimise.
The machine that this is being hosted on will be a top notch machine with a very fat line and will have probably only thousands of codes.
This is the code as it stands now
PROCEDURE sp_check_GenericCodes(p_GenericsList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
     thissql varchar(1000);
     BEGIN
          thissql := thissql || 'select distinct generic_code from emc_codes_data ed where ';
          thissql := thissql || 'ed.generic_code in ('||p_GenericsList||')';
          open p_cursorSMB FOR thissql;
     END sp_check_GenericCodes;So all I'll be returning is a few thousand words which will then be sorted alphabetically and will be then compared to another string which will be sorted alphabetically, to see if there is any missing code, and if there are then those codes will be spit out to an admin who will realise he made a mistake and where the mistake is.
This is how its all called:
public string checkGenericCodesExist(string codesList)
               OracleDataReader rdr = null;
               DBConnect dbConnLocal = null;
               OracleCommand cmd = null;
               string sRetVal = null;
               string CurrentFunction = "PPTEngine.clsPart.genericCodeExsists";               
               try
                    dbConnLocal = new DBConnect(CurrentFunction, "Pkg_SMBTool.sp_check_GenericCodes", m_Stream);
                    // Pass in parameters
                    dbConnLocal.addParam(new OracleParameter("p_cursorSMB", OracleType.Cursor));                    
                    dbConnLocal.setParamDirection("p_cursorSMB",ParameterDirection.Output);
                    dbConnLocal.addParam(new OracleParameter("p_GenericsList", OracleType.VarChar));
                    dbConnLocal.setParamValue("p_GenericsList", codesList);                    
                    // Execute
                    cmd = dbConnLocal.ExecuteProcedure();
                    rdr = (OracleDataReader)cmd.Parameters["p_cursorSMB"].Value;
                    // Loop
                    if (rdr.HasRows)
                         while (rdr.Read())
                              if (!rdr.IsDBNull(rdr.GetOrdinal("Generic_Code"))) m_GenericCode = rdr.GetString(rdr.GetOrdinal("Generic_Code"));
                    rdr.Close();
                    //remove the '
                    string[] PPTCodes = codesList.Replace( "'", null).Split("','".ToCharArray());
               catch (Exception e)
                    Log.WriteToFile(CurrentFunction + " - " + e.Message, System.Diagnostics.TraceLevel.Error);
                    throw e;
               finally
                    if (dbConnLocal!=null) dbConnLocal.Close();
               return sRetVal;
          }The above function is still a work in progress, but is almost there.

Similar Messages

  • Ora-06512 and -01400

    I've created a procedure to insert one table and update another and I keep getting the ora-06512 at Movie_rent_sp line 31 and ora-01400 cannot insert NULL into mm_rental, rental_id. I've been trying to resolve these errors for the past two days and still can't figure out what's wrong.
    CREATE OR REPLACE PROCEDURE MOVIE_RENT_SP
    (P_MOVIE_ID IN MM_MOVIE.MOVIE_ID%TYPE,
    P_MEMBER_ID IN MM_RENTAL.MEMBER_ID%TYPE,
    P_PAYMENT_METHODS_ID IN MM_RENTAL.PAYMENT_METHODS_ID%TYPE)
    IS
    V_COUNT NUMBER;
    LV_MOVIE_QTY NUMBER(4);
    INVALID_MOVIE_ID EXCEPTION;
    INVALID_MEMBER_ID EXCEPTION;
    INVALID_PAYMENT_METHODS_ID EXCEPTION;
    BEGIN
    SELECT COUNT(MOVIE_ID)
    INTO V_COUNT
    FROM MM_MOVIE
    WHERE MOVIE_ID = P_MOVIE_ID;
    IF V_COUNT = 0 THEN
         RAISE INVALID_MOVIE_ID;
    END IF;
    IF P_MEMBER_ID NOT BETWEEN '10' AND '14' THEN
    RAISE INVALID_MEMBER_ID;
    END IF;
    IF P_PAYMENT_METHODS_ID > 5 THEN
    RAISE INVALID_PAYMENT_METHODS_ID;
    END IF;
    INSERT INTO MM_RENTAL (MOVIE_ID, MEMBER_ID, PAYMENT_METHODS_ID)
    VALUES(P_MOVIE_ID, P_MEMBER_ID, P_PAYMENT_METHODS_ID);
    UPDATE MM_MOVIE
    SET MOVIE_QTY = LV_MOVIE_QTY + 1
    WHERE MOVIE_ID = P_MOVIE_ID;
    COMMIT;
    EXCEPTION
    WHEN INVALID_MOVIE_ID THEN DBMS_OUTPUT.PUT_LINE('THERE IS NO MOVIE ID '||P_MOVIE_ID);
    WHEN INVALID_MEMBER_ID THEN DBMS_OUTPUT.PUT_LINE('THE MEMBER ID ' ||P_MEMBER_ID||' '||'DOES NOT EXIST');
    WHEN INVALID_PAYMENT_METHODS_ID
    THEN DBMS_OUTPUT.PUT_LINE(P_PAYMENT_METHODS_ID || 'IS AN INCORRECT PAYMENT METHOD. PLEASE RE-ENTER CORRECT PAYMENT METHOD ID');
    END;
    /

    Any suggestion on how I can fix the insert statement since the only requirements for this assignment was to take in the 3 params for the movie id, member id and payment method and inset a row into the rental table using those params?
    Thanks

  • ORA-28575 and ORA-06512 and ORA-04088:

    ERROR inserting new SUBSCRIBER information to database for 49: There was a problem executing the database query: ORA-28575: unable to open RPC connection to external procedure agent ORA-06512: at "ACP.ACP_PASS_PACK", line 10 ORA-06512: at "ACP.ACP_PASS_PACK", line 40 ORA-06512: at "ACP.T1_SUBSCRIBER", line 7 ORA-04088: error during execution of trigger 'ACP.T1_SUBSCRIBER' -- while processing OCI function OEXEC/OEXN
    I cheked .ora files and they are as they are explained in various formums. Please help where could be the problem

    If you run status command in listener control utility, you will see something similar to...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

  • Export dump failing with ora -06512 and ORA-00955

    Hi
    While running export data pump, I am getting this error. Any inputs helps ... Thanks in advance.
    Regards,
    K
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORA-31626: job does not exist
    ORA-31633: unable to create master table "OPS$ORACLE.EXPFULL"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPV$FT", line 863
    ORA-00955: name is already used by an existing object

    You may have to drop the table OPS$ORACLE.EXPFULL and then try again.
    HTH
    Thanks
    Chandra

  • Ora-06512  and ora-00001

    when our developer tries to insert few records in a table
    it throws error
    ora-00001 & ora-06512,
    when i tried to disable or drop the constraint indicated in the error 0ra-06512
    it throws ora-02431 - constraint not existing
    please guide us to solve this error.
    santhanam.

    I agree with Centinul, you probably do not want to get rid of the uniquenes enforced on the column. Better to find out why the developer is inserting duplicate records and fix that, or, if it is possible that you might get duplicate records in production, then develop a method of handling the error that properly meets your business needs.
    The ORA-00001 error can come from 3 sources. A PK constraint, a unique constraint and a unique index without a formal constraint.
    SQL> create table t (id number);
    Table created.
    SQL> create unique index t_unq on t(1d);
    Index created.
    SQL> insert into t values (1);
    1 row created.
    SQL> insert into t values (1);
    insert into t values (1)
    ERROR at line 1:
    ORA-00001: unique constraint (OPS$ORACLE.T_UNQ) violatedDropping the constraint t_unq is not possible, I would need to drop the index. But I wouldn't, since in the vast majority of cases, the requirement for uniqueness is a business requirement, and not something put in to anoy developers.
    John

  • AP Create Accounting - Error ORA-06512, XLA-95103, ORA-20001, ORA-20100

    *Hello all you patient Oracle Champs - I know issues like this are floating around the forum and web but I still can't seem to fine a match.*
    *> OA R12.1.3*
    *> Orcale Database Server 11.2.0.2*
    [010613_011550898][][EXCEPTION] SQLException encounter while executing data trigger....
    java.sql.SQLException: ORA-20001: -: XLA-95103: An internal error occurred.
    Please inform your system administrator or support representative that:
    An internal error has occurred in the program xla_create_acct_rpt_pvt.BeforeReport .
    ORA-20001: -: XLA-95103: An internal error occurred.
    Please inform your system administrator or support representative that:
    An internal error has occurred in the program XLA_CREATE_ACCT_RPT_PVT.print_logfile.
    ORA-20100: Error: FND_FILE failure. Unable to create file, o0104058.tmp in the directory, /usr/tm
    ORA-06512: at "APPS.APP_EXCEPTION", line 72
    *> Note the directory path cited: +/usr/tm+*
    *> A later error:*
    Oracle error 20100: java.sql.SQLException: ORA-20100: Error: FND_FILE failure.
    Unable to create file, o0104058.tmp in the directory, /usr/tmp.
    *> Note the directory: +/usr/tmp+*
    SQL> show parameter utl_file_dir
    utl_file_dir
    string /usr/tmp, /usr/tmp, /Develop_DB/DEV/11.2.0.2/appsutil/outbound/DEV_orcl-dev-db, /usr/tmp
    $ echo $APPLTMP
    /Develop_Appl/DEV/inst/apps/DEV_orcl-dev-appl/appltmp
    *> has read/write permissions (777)*
    $ echo $APPLPTMP
    /usr/tmp
    *> has read/write permissions (777)*
    *> There is plenty of space in /usr, /Develop_Appl*
    *> Patch 10131305 already applied per note: 1392267.1*
    *> SLA: Enable Diagnostics set to a null value (blank)*
    *> the file o0104058.tmp does not exist in either $APPLTMP or $APPLPTMP (i.e. note 460643.1)*
    *> I confirmed that note 749491.1 was not an issue*
    *> note 261693.1 did not seem to apply*
    *> note 148262.1 did not seem to apply*
    I can provide the concurrent & FND debug output if needed.
    Thank you all*
    Zippy the P

    Zippy242 wrote:
    Hi Hussein,
    checked 1252703.1 - it doesn't appear applicable:
    SQL> show parameter utl_file_dir
    utl_file_dir
    string /usr/tmp, /usr/tmp, /Develop_DB/DEV/11.2.0.2/appsutil/outbound/DEV_orcl-dev-db, /usr/tmp
    $ echo $APPLTMP
    /Develop_Appl/DEV/inst/apps/DEV_orcl-dev-appl/appltmp
    *> has read/write permissions (777)*
    $ echo $APPLPTMP
    /usr/tmp
    *> has read/write permissions (777)*
    checked 760614.1 - not the case:
    no invalid XLA%
    FUN_SEQ_BATCH both package and body are valid.
    Please Advise
    thanks,
    ZipAre you running all the application/database services on one server or multiple ones?
    Thanks,
    Hussein

  • Ora 04052 and 06552 error in a procedure

    Hi
    i created a procedure
    CREATE OR REPLACE PROCEDURE sp_SyncStart
    AS
    BEGIN
    DELETE FROM adPerSyncLog where "date" between (trunc(sysdate-10) and (trunc(sysdate)-1);
    INSERT INTO care_admin.coventry_adPerSyncLog
    SELECT * FROM yyuniv.adPerSyncLog@UNIVERSE;
    end /
    i get the following errors
    ora -04052:error occured when looking up remote object string@string,,...
    ora 06552:pl/sql:compilation unit analysis terminated.
    help required in this.............

    My problem is closly related to this which i found in one of the forum
    This is my procedure
    CREATE OR REPLACE PROCEDURE sp_SyncStart
    AS
    BEGIN
    INSERT INTO care_admin.coventry_adPerSyncLog
    SELECT * FROM yyuniv.adPerSyncLog@UNIVERSE;
    DELETE FROM yyuniv.adPerSyncLog@UNIVERSE;
    END;
    but I get lovely errors
    PL/SQL: ORA-04052: error occurred when looking up remote object
    YYUNIV.ADPERSYNCLOG@UNIVERSE
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this
    expression is incomplete or malformed
    I tried running the insert statement directly via SQL Plus and it worked correctly. Not sure why it works interactively but not contained in a procedure.

  • Export scheduler job but chain step and chain rule failed with ORA-24150 ORA-06512 during executed sql script.

    Hi Folks,
    I used expdp utility to export all Oracle scheduler jobs and chains with below method, after that generate sql script by impdp, later on executing sql script encountered some errors.
    Only chain step and chain rule for executing script. Does anyone bright me some light? Thanks!
    My env: Oracle 11g + Oracle Linux 5.5
    My steps as below:
    1. export(expdp) oracle scheduler job(chain)
    2. generate sql script by impdp.
    3. remove orginal scheduler job(chain)
    4. execute sql script
    5. job with no chain well but job with chain failed
    [oracle@linux1 ~]$ expdp scott/tiger directory=db_dump_dir dumpfile=scott_job.dmp include=procobj:\" in \(select \
    > name from sys.obj$ where type\# in \(46,59,66,67,68,69,72,74,79\)\)\"  schemas=scott
    Export: Release 11.2.0.1.0 - Production on Tue Dec 3 17:42:31 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    Starting "SCOTT"."SYS_EXPORT_SCHEMA_01":  scott/******** directory=db_dump_dir dumpfile=scott_job.dmp include=procobj:" in (select name from sys.obj$ where type# in (46,59,66,67,68,69,72,74,79))" schemas=scott
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is:
      /u03/database/usbo/BNR/dump/scott_job.dmp
    Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at 17:42:54
    [oracle@linux1 ~]$ impdp scott/tiger sqlfile=scott_job.sql directory=db_dump_dir dumpfile=scott_job.dmp logfile=imp_scott_job.log
    Import: Release 11.2.0.1.0 - Production on Tue Dec 3 17:43:04 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    Master table "SCOTT"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
    Starting "SCOTT"."SYS_SQL_FILE_FULL_01":  scott/******** sqlfile=scott_job.sql directory=db_dump_dir dumpfile=scott_job.dmp logfile=imp_scott_job.log
    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    Job "SCOTT"."SYS_SQL_FILE_FULL_01" successfully completed at 17:43:07
    [oracle@linux1 ~]$ more /u03/database/usbo/BNR/dump/scott_job.
    scott_job.dmp  scott_job.sql 
    [oracle@linux1 ~]$ more /u03/database/usbo/BNR/dump/scott_job.sql
    -- CONNECT SCOTT
    ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '10851 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '22830 TRACE NAME CONTEXT FOREVER, LEVEL 192 ';
    -- new object type path: SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_1"','1=1',NULL, 'First link in the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_2"',':"CHAIN_STEP_1".COMPLETED = ''TRUE''',NULL, 'Second link in the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_3"',':"CHAIN_STEP_2".COMPLETED = ''TRUE''',NULL, 'Third link in the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_4"',':"CHAIN_STEP_3".COMPLETED = ''TRUE''',NULL, 'End of the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule_set('"SCHED_RULESET$1"','"SCHED_EV_CTX$1"',NULL, 0);
    END;
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_program('"TEST_PROC_1"','PLSQL_BLOCK',
    'BEGIN
                             INSERT INTO tb_schduler (id, descr, cr_date)
                             VALUES (tb_schduler_seq.NEXTVAL, ''test_proc_1'', SYSDATE);
                             COMMIT;
                           END;'
    ,0, TRUE,
    'Program for first link in the chain.'
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_program('"TEST_PROC_3"','PLSQL_BLOCK',
    'BEGIN
                             INSERT INTO tb_schduler (id, descr, cr_date)
                             VALUES (tb_schduler_seq.NEXTVAL, ''test_proc_3'', SYSDATE);
                             COMMIT;
                           END;'
    ,0, TRUE,
    'Program for last link in the chain.'
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_program('"TEST_PROC_2"','PLSQL_BLOCK',
    'BEGIN
                             INSERT INTO tb_schduler (id, descr, cr_date)
                             VALUES (tb_schduler_seq.NEXTVAL, ''test_proc_2'', SYSDATE);
                             COMMIT;
                           END;'
    ,0, TRUE,
    'Program for second link in the chain.'
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
    , rule_set_name=>'"SCHED_RULESET$1"   '
    dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
    dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
    dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_job('"TEST_CHAIN_1_JOB"',
    job_type=>'CHAIN', job_action=>
    'test_chain_1'
    , number_of_arguments=>0,
    start_date=>TO_TIMESTAMP_TZ('03-DEC-2013 05.38.56.718161000 PM +08:00','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'), repeat_interval=>
    'freq=minutely; interval=2'
    , end_date=>TO_TIMESTAMP_TZ('03-DEC-2013 06.08.56.000000000 PM +08:00','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'),
    job_class=>'"DEFAULT_JOB_CLASS"', enabled=>FALSE, auto_drop=>TRUE,comments=>
    NULL
    COMMIT;
    END;
    [oracle@linux1 ~]$ export ORACLE_SID=usbo
    [oracle@linux1 ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 3 17:44:43 2013
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    sys@USBO> show parameter db_name
    NAME                                 TYPE                              VALUE
    db_name                              string                            usbo
    sys@USBO> conn scott/tiger;
    Connected.
    --remove job and chain.
    scott@USBO> EXEC DBMS_SCHEDULER.drop_job(job_name => 'test_chain_1_job');
    EXEC DBMS_SCHEDULER.drop_chain (chain_name  => 'test_chain_1');
    EXEC DBMS_SCHEDULER.drop_program (program_name  => 'test_proc_1');
    EXEC DBMS_SCHEDULER.drop_program (program_name  => 'test_proc_2');
    EXEC DBMS_SCHEDULER.drop_program (program_name  => 'test_proc_3');
    PL/SQL procedure successfully completed.
    scott@USBO> @/u03/database/usbo/BNR/dump/scott_job.sql
    Session altered.
    Session altered.
    Session altered.
    Session altered.
    Session altered.
    Session altered.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    BEGIN
    ERROR at line 1:
    ORA-24150: evaluation context SCOTT.SCHED_EV_CTX$1 does not exist
    ORA-06512: at "SYS.DBMS_RULEADM_INTERNAL", line 28
    ORA-06512: at "SYS.DBMS_RULE_IMP_OBJ", line 40
    ORA-06512: at line 3
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    BEGIN
    ERROR at line 1:
    ORA-24141: rule set SCOTT.SCHED_RULESET$1 does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_ISCHED", line 1694
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1638
    ORA-06512: at line 5
    PL/SQL procedure successfully completed.

    Thanks all of you!
    Hi DK2010,
    I took some test that the data dict(dba_rule_sets/dba_evaluation_contexts) no any data returned after I had removed the job.
    So I tried to create evaluation context and re-executed script(only exception setion.) the first error has gone. For the second still have some issue.
    ---->no any returned
    scott@USBO> select * from dba_rule_sets where rule_set_owner='SCOTT';       
    no rows selected
    scott@USBO> select * from dba_evaluation_contexts WHERE evaluation_context_owner='SCOTT';
    no rows selected
    -->add new EVALUATION CONTEXT
    scott@USBO> exec DBMS_RULE_ADM.CREATE_EVALUATION_CONTEXT('SCOTT.SCHED_EV_CTX$1');
    PL/SQL procedure successfully completed.
    --->now it looks fine
    scott@USBO> BEGIN
      2  BEGIN
      3  dbms_rule_imp_obj.import_rule_set('"SCHED_RULESET$1"','"SCHED_EV_CTX$1"',NULL, 0);
      4  END;
      5 
      6  COMMIT;
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    --->add new rule set, it prompt aleady exists
    scott@USBO> exec DBMS_RULE_ADM.CREATE_RULE_SET('SCOTT.SCHED_RULESET$1') 
    BEGIN DBMS_RULE_ADM.CREATE_RULE_SET('SCOTT.SCHED_RULESET$1'); END;
    ERROR at line 1:
    ORA-24153: rule set SCOTT.SCHED_RULESET$1 already exists
    ORA-06512: at "SYS.DBMS_RULEADM_INTERNAL", line 28
    ORA-06512: at "SYS.DBMS_RULE_ADM", line 138
    ORA-06512: at line 1
    -->chain rule still could not find.
    scott@USBO> @job_chain_rules.sql
    no rows selected
    -->rerun
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-27477: "SCOTT.TEST_CHAIN_1" already exists 
    ORA-06512: at "SYS.DBMS_ISCHED", line 1148
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1598
    ORA-06512: at line 2
    -->drop chain
    scott@USBO> exec dbms_scheduler.drop_chain('TEST_CHAIN_1');
    BEGIN dbms_scheduler.drop_chain('TEST_CHAIN_1'); END;
    ERROR at line 1:
    ORA-27479: Cannot drop "SCOTT.TEST_CHAIN_1" because other objects depend on it
    ORA-06512: at "SYS.DBMS_ISCHED", line 1319
    ORA-06512: at "SYS.DBMS_ISCHED", line 1222
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1854
    ORA-06512: at line 1
    scott@USBO> exec dbms_scheduler.drop_chain('TEST_CHAIN_1',force=>TRUE);
    PL/SQL procedure successfully completed.
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-24141: rule set SCOTT.SCHED_RULESET$1 does not exist   --->still returned no rule set
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_ISCHED", line 1694
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1638
    ORA-06512: at line 5
    scott@USBO> exec DBMS_RULE_ADM.CREATE_RULE_SET('SCOTT.SCHED_RULESET$1')
    PL/SQL procedure successfully completed.
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-27477: "SCOTT.TEST_CHAIN_1" already exists
    ORA-06512: at "SYS.DBMS_ISCHED", line 1148
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1598
    ORA-06512: at line 2
    scott@USBO> exec dbms_scheduler.drop_chain('TEST_CHAIN_1',force=>TRUE);
    PL/SQL procedure successfully completed.
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-24141: rule set SCOTT.SCHED_RULESET$1 does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_ISCHED", line 1694
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1638
    ORA-06512: at line 5
    Would you like to give me more clue?
    Thanks again.

  • ORA-06512:OWA_UTIL AT LINE 354

    Hello,
    I created a new procedure to update the table through web page. I use html commands and owa_util package to get the user id
    owa_util.get_cgi_env('REMOTE_USER')
    I am using same code in lot of other procedures and they are all working.
    When I run through SQL/PLS, I am getting errors:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 354
    ORA-06512: at "Profile.pmp_rfq_form, line 17 (Procedure name and line number where the command is )
    ORA-06512: at line 21
    Can anybody tell what is the problem. When I run through web, I get this error
    The requested URL /pls/prolink/pmp_rfq_form was not found on this server.
    Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Server at ORADEVAPP1IACDCA.corp.iacna.com Port 7778

    Hi,
    This error can occur because of many reasons, check in metalink about this error, thats suits your scenario.
    Regards
    PS: You would get lot many expert advise if you post this query in Oracle Application Server Forum. Because this is Oracle portal related query.

  • Java.sql.SQLException: ORA-01000: maximum open cursors exceeded ORA-06512:

    Please help me for resolving this Error.
    I got This Error while Web Load TEsting.
    java.sql.SQLException: ORA-01000: maximum open cursors exceeded ORA-06512: at "IADMIN.ADM_ADMIN_ISMART_PCK", line 269 ORA-06512: at line 1

    I also faced similar problem - and solved as following:
    java.sql.PreparedStatement pStmt = null;
    ResultSet rs, rs_opr;
    try {
         query = "select ..."
         pStmt = conn.prepareStatement (query); // first instance of the PreparedStatement
         pStmt.setInt (1, rq_count);
         pStmt.setString (2, rqid);
         rs = pStmt.executeQuery ();
         if (rs.next()) {
              plant_nm = rs.getString("PLANT_NM");
         rs.close();
         pStmt.close(); // this was done only at the last time (added here and solved)
         query = "select ..."
         pStmt = conn.prepareStatement (query); // second instance of the PreparedStatement
         pStmt.setInt (1, rq_count);
         pStmt.setString (2, rqid);
         rs = pStmt.executeQuery ();
         if (rs.next()) {
              Var2 = rs.getString("Vari1ble_2");
         rs.close();
         pStmt.close(); // this was done only at the last time (added here and solved)
         query = "select ..."
         pStmt = conn.prepareStatement (query); // third instance of the PreparedStatement
         pStmt.setInt (1, rq_count);
         pStmt.setString (2, rqid);
         rs = pStmt.executeQuery ();
         if (rs.next()) {
              Var3 = rs.getString("Variable_3");
         rs.close();
         pStmt.close(); // this was done only here -- added 2 times as above
    }

  • Insertin Data useing SQL Procedure Getting Error ORA-00942 and ORA-06512

    I have two Schemas ISYS and ISYSTWO
    I had created a Stored Procedure RECINC2 in Schema ISYS
    as
    procedure recinc2(cName IN CHAR,cWhere IN CHAR,cTable in CHAR)
    AS
    cQry VARCHAR2(1000);
    BEGIN
    cQry := 'INSERT INTO '||cName||'.'||cTable||' SELECT * FROM '||cTable|| ' WHERE ||cWhere;
    dbms_output.put_line(cqry);
    EXECUTE IMMEDIATE cQry;
    end;
    NOW WHEN in Run it gives error
    SQL> begin
    2 recinc2('ISYSTWO','CODE=4','AGENTS');
    3 end;
    4 /
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "ISYS.RECINC2", line 8
    ORA-06512: at line 2
    BUT IF I EXECUTE
    the DBMS output
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    it executes and gives fine result
    Please help
    Thanks
    Chaand kackria

    SQL> conn ISYSTWO/ISYSTWO
    Connected.
    SQL> grant all on agents to isys;
    Grant succeeded.
    SQL> conn isys/isys
    Connected.
    SQL> exec recinc2('ISYSTWO','CODE=4','AGENTS');
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    PL/SQL procedure successfully completed.

  • ORA-00936 ORA-06512: at "WKSYS.WK_QRY", line 1007 performing search

    Hi,
    I installed a 10g under WinXP, and started
    searchctl start
    after configuring Ultra Search. I craeated a file source and the crawler indexed the source successfully.
    Performing a query in search page of ultra search I get the message
    java.sql.SQLException: ORA-20000: Oracle Ultra Search
    ORA-00936: missing expression
    ORA-06512: at "WKSYS.WK_ERR", line 179
    ORA-06512: at "WKSYS.WK_QRY", line 1007
    ORA-06512: at line 1
    .......(Huge JAVA Exception)
    I traced the DB process with binds and I'm able to reproduce on DB using PL/SQL.
    My WKSYS.WK_QRY file has version
    $Header: wk0qry.pkh 05-dec-2003.09:53:40 ymatsuda Exp $
    The exception occurs in Procedure WKSYS.WK_QRY.getResult.
    I updated the DB to 10.1.0.3.0, and applied patch 3990810, which included a new wk0qry.plb.
    I doesn't help at all.... :-(
    Any help is appreciated,
    Matthias

    I fixed by applying patch 4163362

  • DBMS_STREAMS_ADM.ADD_SUBSET_RULES ORA-00936 ORA-06512

    I need help, why i got this error???
    SQL> BEGIN
    2 DBMS_STREAMS_ADM.ADD_SUBSET_RULES(
    3 table_name => 'piramide.lancamento',
    4 dml_condition => 'where empresa=100 and filial=101 or empresa=102 and filial=102 or empresa=102 and filial=103',
    5 streams_type => 'apply',
    streams_name => 'lancamento_apply',
    6 7 queue_name => 'STRMADMIN.LANCAMENTO_Q',
    8 include_tagged_lcr => false);
    9 END;
    10 /
    BEGIN
    ERROR at line 1:
    ORA-00936: missing expression
    ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 1032
    ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 1181
    ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 1073
    ORA-06512: at line 2
    SQL>
    Tks,
    Elber

    HI, tks for you help, but i executed this procedure using CAPTURE and it works fine, so, i dont think that the problem is that.
    ##################THIS WORK AT SOURCE#################
    BEGIN
    DBMS_STREAMS_ADM.ADD_SUBSET_RULES(
    table_name => '"PIRAMIDE"."LANCAMENTO"',
    dml_condition => 'where empresa=100 and filial=101 or empresa=102 and filial=102 or empresa=102 and filial=103',
    streams_type => 'capture',
    streams_name => '"LANCAMENTO_CAPTURE"',
    queue_name => '"STRMADMIN"."LANCAMENTO_CAPTURE_Q"',
    include_tagged_lcr => false);
    END;
    I find one BUG on metalink that i think this is my problem. BUG n 6331369 ORA-936 WHEN CREATING STREAMS SUBSET RULE
    If you can, please help me.
    Tks,
    Elber Portugal

  • Getting ORA-01476 and ORA-06512 in alert log

    I am getting this error in my alert log file frequently
    ORA-12012: error on auto execute of job 734
    ORA-12008: error in materialized view refresh path
    ORA-01476: divisor is equal to zero
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    can anybody help in finding the cause and solution for this?
    Thanks and Regards
    Thiagarajan.

    The root error for this issue can be found here:
    ORA-01476: divisor is equal to zero
    You should debug your materialized view, it is dealing with divisors whose value is equal to zero, and your procedure isn't capable of handling this exception. Try to perform a manual refresh to verify this error is repeatable and look for division operations, then debug values.
    ~ Madrid

  • ORA-06502 PL/SQL: numeric or value error ORA-06512 when calling a procedure

    Hi,
    I have been using ODP.net for a while now and have been calling lots of procedures without issue, however today I put together one to insert key, value parameters into a simple table and it is failing on me Intermittently with the ORA-06502... I have checked the code and I do not see any problems and am thoroughly frustrated... When I call the procedure directly it all works perfectly so the problem is not in the db!
    Please can you help? Code follows:
    Table defined as:
    CREATE TABLE REPORT_REQUEST_PARAMETERS
    (     REQUEST_ID NUMBER,
         PARAM_NAME VARCHAR2(50 BYTE),
         PARAM_VALUE VARCHAR2(255 BYTE)
    Stored procedure defined as:
    create or replace PROCEDURE SP_WRITE_REQUEST_PARAMS
    ( in_request_id number, in_param_name char, in_param_value char )
    AS
    BEGIN
    INSERT INTO REPORT_REQUEST_PARAMETERS ( REQUEST_ID, PARAM_NAME, PARAM_VALUE )
    VALUES
    ( in_request_id, in_param_name, in_param_value );
    END SP_WRITE_REQUEST_PARAMS;
    Finally the ODP.net code which calls this looks like:
    using (OracleConnection connection = new OracleConnection(...blah...))
    using (OracleCommand command = connection.CreateCommand())
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "SP_WRITE_REQUEST_PARAMS";
    OracleParameter p1 = new OracleParameter("in_request_id", OracleDbType.Int32);
    OracleParameter p2 = new OracleParameter("in_param_name", OracleDbType.Char);
    OracleParameter p3 = new OracleParameter("in_param_value", OracleDbType.Char);
    p1.Direction = ParameterDirection.Input;
    p1.Value = requestId;
    p2.Direction = ParameterDirection.Input;
    p2.Size = paramName.Length;
    p2.Value = paramName;
    p3.Direction = ParameterDirection.Input;
    p3.Size = paramValue.Length;
    p3.Value = paramValue;
    command.Parameters.Add(p1);
    command.Parameters.Add(p2);
    command.Parameters.Add(p3);
    connection.Open();
    command.ExecuteNonQuery();
    connection.Close();
    }

    What version of database? If it's 9206 this is a known database problem, and should be resolved by patching the database to 9208. I don't have the bug number handy though.
    Simply because it succeeded in sqlplus doesnt mean it's not a database problem, as the problem was intermittent and succeeded from odp sometimes too.
    Thanks
    Greg

Maybe you are looking for

  • Iphoto library lost but still in screensaver??!!

    Hello all. Not sure what kind of issue this is.. The other day I left the room for 45 min and when I returned my computer mysteriously defaulted back to settings it had by the previous owner.. My bookmarks were gone, screensaver, wallpaper, itunes, a

  • Copy from clipboard button in Select Options variable

    Has anyone had success using the copy from clipboard button in the Selection Option variable when copying rows from your query results in Excel?0 My users and I can not get this to work. Is there a setting or something that we are missing? Thanks for

  • Component included in SAP NetWeaver Foundation for Third Party

    Hi Experts, Now, our team discussing on how we can use integrate based on ABAP Technology to integrate Enterprise Systems. Then, we discovered the License, that SAP delivered, "SAP NetWeaver Foundation for Third Party". I heard this license allows cl

  • Fonts in Microsoft/Creative Suite/and the Yellow Brick Road

    Hello, We are a small town newspaper running (new to us) Power PC G5's OS 10.4.11. We have both OS 9 and Tiger installed because we are migrating from PageMaker to full pagination in In-Design. It will be several months before we will be to the point

  • Subscription won't work after expired trial

    i recently signed up to CC trial then subscribed but now when i try to download an app "the system" says I am still in trial mode but that the trial has expired and i can't go any further