ORA-14551 Call to a proc that performs INSERT from within a FUNCTION

Anyone,
I have written a number of functions that serve to convert an old_value to a new_value. But there are some times when the conversion fails. I wish to log those exceptions into a table and move on. I undertand FUNCTIONS are not to insert data but that is why I created a PROC and want to be able to call it from within the FUNCTIONs.
Is there any way to get around the ORA-14551 error?
Here is what I have:
CREATE OR REPLACE FUNCTION MAXIMO.fcn_get_worktype
  ( worktype_IN IN varchar2,
    siteid_IN IN varchar2)
  RETURN  varchar2 IS
  var_worktype varchar2(5);
BEGIN
     IF siteid_IN IN ('ML','OK','BE') THEN
        BEGIN
             SELECT NVL(NEW_WTYPE,NULL)
            INTO var_worktype
             FROM MAXIMO.MAX411_WBK_WORKTYPE$
             WHERE OLD_WTYPE = worktype_IN;
        EXCEPTION
            WHEN NO_DATA_FOUND THEN
                MAXIMO.SP_CONVERSION_EXCEPTION('WORKTYPE', 'WORKTYPE', worktype_IN, siteid_IN);
                var_worktype := 'XX';
                 RETURN var_worktype;
        END;
    END IF;
    RETURN var_worktype ;
END;And here is my PROC:
CREATE OR REPLACE PROCEDURE MAXIMO.sp_conversion_exception (table_IN IN VARCHAR2, column_IN IN VARCHAR2, value_IN IN VARCHAR2, tab_ID IN VARCHAR2)
IS
BEGIN
    INSERT INTO MAXIMO.MAX411_CONVERSION_EXCEPTIONS
         ( TABLE_NAME,
         COLUMN_NAME,
         VALUE ,
          TAB_ID)
    VALUES
         ( table_IN,
         column_IN,
         value_IN,
          tab_ID );
    EXCEPTION
        /* If value was already recorded then do not record again, Key is on all three columns */
        WHEN DUP_VAL_ON_INDEX
            THEN
                NULL;
    COMMIT;
END;Can anyone shed any light on how I can stop getting:
ERROR at line 1:
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "MAXIMO.SP_CONVERSION_EXCEPTION", line 5
ORA-06512: at "MAXIMO.FCN_GET_WORKTYPE", line 16
ORA-01403: no data found
ORA-06512: at "MAXIMO.LOAD_PM", line 181
ORA-06512: at line 1
Thanks in advance for any help I can get...
Miller

You need a PRAGMA AUTONOMOUS_TRANSACTION in your exception procedure, eg:
CREATE OR REPLACE PROCEDURE MAXIMO.sp_conversion_exception (table_IN IN VARCHAR2, column_IN IN VARCHAR2, value_IN IN VARCHAR2, tab_ID IN VARCHAR2)
IS
  PRAGMA AUTONOMOUS_TRANSACTION
BEGIN
  ...

Similar Messages

  • Hi. I am trying to use Bridge to make web galleries. There used to be something on PS for that but now I cant find it in PS so I was advised to use Bridge.  However, there is something called Output Module (AOM) that is missing from my Bridge.  I download

    Hi. I am trying to use Bridge to make web galleries. There used to be something on PS for that but now I cant find it in PS so I was advised to use Bridge.  However, there is something called Output Module (AOM) that is missing from my Bridge.  I downloaded this.  The instructions say :Copy the Adobe Output Module folder (not the AOM_Package_[OS] folder) into the Bridge CC Extensions folder in the appropriate location: 
    Windows: C:\Program Files\Common Files\Adobe\Bridge CC Extensions
    Mac OS: /Library/Application Support/Adobe/Bridge CC Extensions.  However there is noplace on my Macbook Air running Yosemetie that has this /Library/Applications SUpport/Bridge CC Extensions. Can anyone advise?

    That file could be set as a Launch Agent or Daemon in your ~/Library or /Library, You could try to look for it or Safeboot your computer and then empty the trash. Safebooting disables Launch Agents/Daemon and Third Party Kernal extensions. Here's the article to Safeboot OS X: What is Safe Boot, Safe Mode? - Apple Support

  • Need help to call a simple function from within another function?

    I created a movieclip which has a function in its one and only frame.
    function testx() {
    x = x+2};
    This movieclip is in the main timeline (in its own layer).
    In another layer on the timeline I have created a single keyframe with a button instance called myBtn
    myBtn.onRelease = function() {
    var x
    x =2
    testx(2);
    trace (x);
    What I want to do is call the function in the movieclip frame from the button press function. However, I can't seem to reference it properly.
    Can anyone help me to basically call a simple function from within another function?

    Yes am using CS4.  Have saved it as CS3 now.  Ok the file is somewhat complicated and what I am testing is not what I ultimately want to do but if I can pass that variable I can figure it out.  In terms of describing the file I think the only parts of importance are what I put in my previous post (please let me know if there is something I should be telling you that I have missed).  I am 99.9% sure that I am using the correct instance name.
    Scene1 Layer3 Frame1 has the function call for the button.
    myBtn.onRelease = function() {
    var x
    x = 2
    testx(2);
    trace (x);
    Slideshow layer //Actions Frame1 has the function
    function testx(x) {
    x = x+2};
    thank you so much for helping me.

  • Can an Applet call a Perl script that performs Unix file commands?

    Hi,
    I would like my applet to move a Unix file from one directory to another. (Both directories and the file are on the same server as the applet).
    In my applet I have code that calls (I think) a Perl script through a URL connection and passes the name of the file that needs to be moved:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    URLConnection urlConn = urlMove.openConnection();
    In the cgi-bin I have a perl script (fileMove.pl) that performs the move:
    #!/usr/bin/perl
    use CGI qw(:standard);
    $pfile = $ENV{?QUERY_STRING?};
    $cmd = ?mv stageArea/$pfile $pfile?;
    system $cmd;
    The Perl script works fine when I call it directly from Internet Explorer, but when I call the script from the Applet the file is not moved. Am I doing something wrong?

    Got it to work!
    Changed the Java code to:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    urlMove.openConnection();
    InputStream moveStream = urlMove.openStream();
    and in the Perl script added the line:
    print "Content-Type: text/html\n\n";
    The applet running my a PC is now effortlessly moving files on the unix server, wahoo.
    Aside: I also found that my applet web server and the files the applet reads/writes do not have to be on the same machine. In the applet's cgi-bin directory I created a "link" to the networked unix directory where the image files are actually located. I really expected the Applet I/O Security to complain, but it work like a charm. Go figure.

  • ORA-14551 when using rules manager inside a SELECT * FROM TABLE(myFunction)

    Hello
    I want to return rows from a pipelined function, and map this to a view, or a BC4J an query this in my application.
    I want to populate the rows based on many evaluations, to achieve this, I want to include the rules manager functionality.
    I have defined my event, rule class and result view successfully, but... when I run my query, I have the following error:
    ORA-14551: cannot perform a DML operation inside a query
    We believe this is caused when the engine tries to populate the results view with the matching rules.
    Is there a workaround for this?
    Please help
    Thnks in advance.
    Alex.

    Alex,
    I cannot think of any workaround that would allow you to evaluate the rules and return the results with a single query. A Rules Manager application with composite events modifies the state of the database (for maintaining incremental state as well as the results view) when some events are processed. So, you will not be able to pipeline the results to a SQL query. If you can at least separate the ADD_EVENTS call from the rest of the logic this may be possible.
    Hope this helps,
    -Aravind.

  • People I call see a number that is different from ...

    Hi,
    Friends of mine are telling me that they are seeing a phone number that is different from my number when I call them. This is a new development that started after my last payment. Why is this happening, and how can it be corrected?
    Cheers,
    Carl

    Your Skype number is displaying differently on your caller ID?
    I'm also having the same issue, for weeks now.
    Either it would say I'm calling from a private number, or a number completely diffferent than the phone number I'm paying for.
    Here's what you do to fix it:
    Step 1: Log into your Skype account here: https://secure.skype.com/account 
    Step 2: On the Call Phones tab, click the Caller identification link, then click select a pre-saved number (to change it back to normal, or enter a new number, i.e your own cell phone number to be displayed)
    Step 3: Choose your Online Number from the drop-down list and Save. Your Online Number is now set as your Caller ID.
    ^Problem solved.

  • Making a call to a Business Connector Flow Service from within an ABAP prog

    Hello,
    I am trying to make a change to one of the flow services within BUsiness COnnector.
    The way the system is currently set up is that the flow service is called from within an ABAP program via an RFC call.
    A remote FM exists in SAP and this is called by the program and there is a corresponding flo service within Business Connector.
    I have basically copied an existing flow service which works fine and made a few minor tweaks. Within SAP, I have copied the remote FM and again made a few minor tweaks.
    However, when I run the program, it short dumps at the point whee my remote FM is called with th following message :-
    "Unknown Partner and Message Type. Sender: xxxx Receiver: xxxx MsgType:  "
    I am not a Business Connector expert and I guess I am missing a ste but I'm not sure what it is.
    Can anyone advise?
    Thanks,
    Ruby

    Hello,
    I am trying to make a change to one of the flow services within BUsiness COnnector.
    The way the system is currently set up is that the flow service is called from within an ABAP program via an RFC call.
    A remote FM exists in SAP and this is called by the program and there is a corresponding flo service within Business Connector.
    I have basically copied an existing flow service which works fine and made a few minor tweaks. Within SAP, I have copied the remote FM and again made a few minor tweaks.
    However, when I run the program, it short dumps at the point whee my remote FM is called with th following message :-
    "Unknown Partner and Message Type. Sender: xxxx Receiver: xxxx MsgType:  "
    I am not a Business Connector expert and I guess I am missing a ste but I'm not sure what it is.
    Can anyone advise?
    Thanks,
    Ruby

  • Is it possible to call an executable of compiled c code from within LabVIEW?

    I can compile 'genesis' (the name of the code we are planning to use) under unix: it produces an executable which can be
    linked to user-constructed c files which contain specific crossover and/or
    mutation strategies, so once a user has the executable, it is not
    neccesary to re-compile the main GA everytime a user mucks around with the
    combination rules. I think that a question is, can you call the (or any)
    executable from within LabView?
    Thanks
    Alan Homer

    You can call executables using the System Exec VI, which can be found in the Communications palette.
    Try to take over the world!

  • I need a utility that allows OC from within windows

    Hi,
    I have a P6N SLI V2 mobo, E4400, 7600gt, 1gb ddrII 800Mhz running XP pro sp2.
    The MSI utility "dual core center" is absolutely useless as it won't let me access any MB parameters (maybe MSI should test their f***ing software before they ship it), anyway I was wondering if any of you know of a good utility which will allow me to OC from within windows.  Thanks.

    I'm what you may call a retired OC'er, I used to clock the hell out my systems, back in the day when I had an athlon xp 1800+ cpu.
    Now, I don't game as much (or sadly, at all) any more, and the system is powerful enough to keep me happy most of the time. 
    But sometimes I do want to squeeze some extra juice out of my system, for these times I want a little more, I don't want to be bothered with going into the bios and start stability testings every time I up the FSB by 5Mhz.  I just want a simple interface that lets me do just that.
    Gigabyte has a fantastic utility ("EasyTune") just for that, which made OC'ing life as easy as it gets.  I'm sort of disappointed with MSI for shipping that cr@p of a software they call by the fancy name "Dual Core Center" (my my, such big name for such a little (worthless) program).
    Anyway, just to clarify it again, I can OC myself via bios (well, I think I can...), but I'm too f***ing lazy for that.   
    Help the lazy man get a program which will do all the dirty OC work for him...
    BTW, thanks for all your help people! 

  • Calling a stored proc that has a parameter of a user-defined (array) type

    Hi,
    Hope someone can help me on this, because I am really struggling...
    From a c-program, I am calling stored procedures using the OCI Interface. Everything is OK, when using the standard types (integer, string, date), but I am encountering problems when one of the parameters is of a type that is defined in the database as an array. My application calls multiple array-type parameters in one call, but for the sake of simplicity, I created a test application to only use one.
    The following call is working (but it needs to be called using the OCI functions):
    BEGIN
    p_test_table_num (pin_num1 => T_ARRAY_EH_DEP(1,2,3));
    END;
    My first step was to have the following combination:
    statement: begin p_test_table_num(:pin_num1);end;
    parameter: pin_num1
    value: t_array_eh_dep(1,2,3)
    That lead to the error (when executing the statement): wrong number or types of arguments
    Second idea (after a lot of browsing):
    statement: begin p_test_table_num(t_array_eh_dep(:pin_num1));end;
    parameter: pin_num1
    value: 1,2,3
    This leads to the error: numeric or value error: number precision too large.
    My bind function call looks like:
    if (res = OCIBindByName(stmthp, &bndArray[parCount], errhp, (text *) curPar,
    -1, (dvoid *) curVal, (sb4) sizeof(curVal), SQLT_NUM, (dvoid *) 0,
    (ub2 *) 0, (ub2) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT) != OCI_SUCCESS){
    checkerr(errhp, "OCIBindByName", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    (in this function curPar is the name of the parameter and curVal contains the value)
    I also investigated the BindArrayOfStruct, but I concluded that this is to execute a stored procedure multiple times using different values for the parameters, and that is not what I want.
    I really hope someone can give me a direction to look in. I also need to call string and date arrays in the same way...
    Thanks
    Margit

    For those who are interested, I found the solution myself...
    To use any user-defined type, you need to perform the following steps:
    1. OCIBindByPos or OCIBindByName as you would bind a normal parameter
    2. OCITypeByName to get a reference to the type definition in Oracle
    3. OCIObjectNew to create a reference to the array (OCI_TYPECODE_VARRAY)
    4. Assign a value to the column, for instance use OCIStringAssignText, OCINumberFromInt, OCIDateFromText
    5. OCICollAppend ( to add the value from step 4 to collection)
    6. OCIBindObject
    7. OCIStmtExecute
    8. OCITransCommit
    Example:
    if (res = OCIBindByName(stmthp, &bndArray[parCount], errhp, (text *) curPar,
    -1, (dvoid *) curVal, (sb4) sizeof(curVal), SQLT_NTY, (dvoid *) 0,
    (ub2 *) 0, (ub2) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT) != OCI_SUCCESS){
    checkerr(errhp, "OCIBindByName", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    if (res = OCITypeByName(envhp, errhp, svchp,
    (CONST text *) currentUserName, (ub4) strlen((CONST char *) currentUserName), /*schema*/
    (CONST text *) "T_ARRAY_EH_DEP", (ub4) strlen((CONST char *) "T_ARRAY_EH_DEP"), /* type */
    (CONST text *) 0, (ub4) 0, OCI_DURATION_SESSION, OCI_TYPEGET_HEADER,
    &type_array_eh_dep) != OCI_SUCCESS){
    checkerr(errhp, "OCITypeByName", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    OCIArray* eh_dep_array = (OCIArray*)0;
    OCINumber eh_dep_num;
    OCIObjectNew(envhp, errhp, svchp, OCI_TYPECODE_VARRAY, type_array_eh_dep,
    (dvoid*) 0, OCI_DURATION_DEFAULT, TRUE, (dvoid**)&eh_dep_array);
    /* get the values from the incoming array */
    curArrayItem = SOM_AtrValGetStrList(arrayValuesListMem,
    arrayValuesListAtr, arrayValueCount);
    do {
    if (STR_Eq(curArrayItem, "NULL")){
    OCICollAppend(envhp, errhp, (CONST dvoid *)0, &null_ind,
    (OCIArray*) eh_dep_array);
    else{
    tmpInt = atoi(curArrayItem);
    OCINumberFromInt(errhp, &tmpInt, sizeof(int), OCI_NUMBER_SIGNED,
    &eh_dep_num);
    OCICollAppend(envhp, errhp, (CONST dvoid *)&eh_dep_num, (CONST dvoid *) 0,
    (OCIArray*) eh_dep_array);
    arrayValueCount = arrayValueCount + 1;
    curArrayItem = SOM_AtrValGetStrList(arrayValuesListMem,
    arrayValuesListAtr, arrayValueCount);
    printf( "curArrayItem = %s\n", curArrayItem );
    } while (STR_Eq(curArrayItem, "%%%") == falseCN);
    arrayValueCount = arrayValueCount + 1; /* skip the %%% */
    if (res = OCIBindObject(bndArray[parCount], errhp,
    (OCIType *)type_array_eh_dep, (dvoid **) &eh_dep_array,
    (ub4 *) 0, (dvoid **) 0, (ub4 *) 0) != OCI_SUCCESS){
    checkerr(errhp, "OCIBindObject", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    }

  • JCA DB Adaptor to call a Stored Proc that updates a table

    Dear guru,
    I've a created JCA Db adaptor that will be used by OSB 10.3.1 that ultimately will call a stored procedure to update a table. However, I encountered exception :
    ORA-02089 COMMIT is not allowed in a subordinate session
    CREATE or REPLACE PROCEDURE EXAMPLEA
    StringA IN VARCHAR2,
    AS
    BEGIN
    UPDATE TABLE_A
    SET COLUMN_1 = 'testing'
    WHERE STRINGA_COLUMN = StringA ;
    COMMIT;
    END;
    If I removed the commit above, then I got another error :-
    JCA-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EXAMPLE_A. Cause: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 31 seconds
    Desperate help is needed. Thanks!

    The stored procedure adapter service will execute within a JTA transaction that will be committed so you must not explicitly execute a commit as part of your procedure code. When setting up a connection-instance in weblogic-ra.xml, you must provide one of either xADataSourceName or dataSourceName, but not both. If you use xADataSourceName then make sure that the JTA XA Connection check box is checked when you create your database connection and specify a JNDI name. Uncheck the box if you use dataSourceName.

  • Calling parent method from within child object

    Hello,
    A quick question! Is it possible to call a method in a parent object from within a child object.By child object I mean an object that was instantiated within the parent object.
    Thanks.

    A quick question! Is it possible to call a method in a
    parent object from within a child object.By child
    object I mean an object that was instantiated within
    the parent object.Since you are using ambiguous terminology, it would be much better if you provided a small sample of your code to avoid confusion. I am guessing that you are actually talking about an inner class when you say child class.
    If that is correct, then you can do something like this:
    class Parent {
      void foo() {}
      void bar() {}
      class Child {
        void foo() {}
        void test() {
          bar(); // No conflicts, just call the Parent method
          Parent.this.foo(); // Use explicit qualification to avoid conflicts.

  • ORA-14551: cannot perform a DML operation inside a query

    I have a Java method which is deployed as a Oracle function.
    This Java method parses a huge XML & populates this data
    into a set of database tables.
    I have to call this Oracle function in a unix shell script using sqlplus.
    Value returned by this function will be used by the shell script to decide
    what to do next.
    I am calling the Oracle Java function as follows in the shell script:
    echo "SELECT XML_TABLES.RUN_XML_LOADER('$P1','$P2','$P3','$P4') FROM DUAL;\n" | sqlplus $DB_USER > $LOG
    This gives error - "ORA-14551: cannot perform a DML operation inside a query".
    If I have to add a AUTONOMOUS_TRANSACTION pragma to this Java function,
    where to I add it considering, that the definition of the function is in a Java class.
    Can we do it in call spec?
    create or replace package XML_TABLES is
    function RUN_XML_LOADER(xmlFile IN VARCHAR2,
    xmlType IN VARCHAR2,
    outputDir IN VARCHAR2,
    logFileDir IN VARCHAR2) RETURN VARCHAR2 AS
    LANGUAGE JAVA NAME 'XmlLoader.run
    (java.lang.String, java.lang.String, java.lang.String, java.lang.String)
    return java.lang.String';
    end XML_TABLES;
    If not is there any other way to acheive this?
    Thanks in advance.
    Sunitha.

    If I have to add a AUTONOMOUS_TRANSACTION pragma to this Java function,You'd have to write a PL/SQL function that calls the JSP. But I would caution you about using that pragma. It does introduce tremendous complexity into processing.
    As I see it you only need a function to return the result code so why not use a procedure with an OUT parameter?
    Cheers, APC
    Of course Yoann's suggestion of using an anonymous block would work too.
    Message was edited by:
    APC

  • Workaround for ORA-14551 WHILE CALLING FUNCTION IN SQL OVER DBLINK

    Hi,
    any idea how to workaround such issue in 9.2.0.8 (I know this is working with 11.2).
    create table mylog(id number, data date , mess clob);
    create or replace function myfunc(id in number, data in date ,mess in varchar2)
    return number is
    pragma autonomous_transaction;
    retval number;
    begin
       insert into mylog values (id , data ,mess);
    commit;
    retval := id;
    return retval;
    end;
    SQL> select schema.myfunc@dblink(2,sysdate,'bbbbbbb') from dual;
    ERROR at line 1:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "SCHEMA.MYFUNC", line 6
    ORA-06512: at line 1Regards
    GregG

    DBMS_SQL is documented in what I think 9i calls "Supplied Oracle Packages and Types" manual.
    The basic concept behind this is that it allows you to manually create a cursor and execute it (via an OCI like interface). For example, it can be used to issue remote DDLs via a database link as described in {message:id=10323373}.
    DBMS_SQL provides flexibility and power that is beyond the standard cursor constructs in PL/SQL. The system package version even enables you to execute SQL and PL/SQL code as any other schema in the database.
    You will have however to play around with DBMS_SQL (locally and remotely) to determine how to hide the fact that a local select (which Oracle assumes, correctly, does not change database state), actually changes the state of a remote database.
    Personally I would not bother with such a hack. I would use the problem to enforce an upgrade to the latest Oracle version, or kick out the crappy app that needs to use a SQL select to make database changes.

  • Getting error SQL Error : ORA-14551: cannot perform a DML operation inside a query

    Hi gurus ,
    Your help is greatly appreciated ..
    I am doing some changes in the fucntion for an existing package .Introducing the new below check , am updating one of the tables based on a if condition ..
           IF  numALLOWED_COUNT >= numLAST_COUNT_ADDED+1  THEN
                     blnGDS_Allowed :=True;
                      varSTMT := 'UPDATE PROD.TMS_PROCESS_COUNTER ';
                      varSTMT := varSTMT ||' SET last_count_added = last_count_added+1';
                      varSTMT := varSTMT ||' WHERE process_name = ''DAILY_GDS_COUNT''';
                      varSTMT := varSTMT ||' AND COUNTER_IND = ''750FD130''';
                     PROC_LOG('Update Tms_Process_counter varSTMT --' || varSTMT);
                     IF INSERT_BATCH(99,varSTMT) > 0 THEN
                        NULL;
                     END IF;
    Function for insert_batch :
    UNCTION INSERT_BATCH(numTABLE_ID IN NUMBER, varSQL_STATEMENT IN VARCHAR2) RETURN NUMBER IS
    varINSERT_BATCH_STMT  VARCHAR2(32767)     := NULL;
    varADD_REC_TYPE       BATCH_TABLES.ADD_REC_TYPE%TYPE;
    BEGIN
        PROC_LOG( 'INSIDE INSERT_BATCH IRC : ' || varSQL_STATEMENT );  --IRC 9/20 UC
        INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
        VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
    RETURN 1;
    EXCEPTION WHEN OTHERS THEN
        PROC_LOG('Failed in INSERT_BATCH');
        PROC_LOG('SQL Error : ' || SUBSTR(SQLERRM,1,1000));
        RETURN -1;
    END INSERT_BATCH;
    desc PROD.BATCH_STATEMENT
      QUEUE_ID           NUMBER(15)                 NOT NULL
      TABLE_ID           NUMBER(2)                  NOT NULL
      STATEMENT          VARCHAR2(4000 BYTE)        NOT NULL
      QUEUE_SEQUENCE_ID  NUMBER(5)                  NOT NULL
    Some how when its calling the insert_batch , its giving me the error in the logs as below:
    04:01:41 - Update Tms_Process_counter varSTMT --UPDATE PROD.TMS_PROCESS_COUNTER  SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
    04:01:41 - INSIDE INSERT_BATCH IRC : UPDATE PROD.TMS_PROCESS_COUNTER  SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
    04:01:41 - Failed in INSERT_BATCH
    04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a query

    Some how when its calling the insert_batch , its giving me the error in the logs as below:
    04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a query
    Yes - and the exception is telling you EXACTLY what the problem is. You have a query
    IF INSERT_BATCH(99,varSTMT) > 0 THEN
    And you are performing a DML operation inside that query:
    INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
        VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
    Like the exception says: you can't do that.
    You need to call the function using PL/SQL and capture the return value into a variable. Then test that variable:
    myVar := INSERT_BATCH(99,varSTMT);
    if myVar > 0 THEN

Maybe you are looking for

  • Wrong DVD drive opens on 2009 Mac Pro

    Hello, I have a 2009 Mac Pro with two DVD drives.  Since upgrading to Mavericks, I've noticed some unusual behavior: 1.  Ocassionally, the incorrect DVD drive ejects/opens. For example, when I attempt to open the top drive, the bottom one opens, and

  • Weird problems with OSX Tiger

    I'm with a weird problem with my OS Tiger. I have a G4/400 AGP Graphics with a Fastmac 1.5GHz processor upgrade, 1 GB RAM, 128MB video card, USB 2.0 card and a Sonnet serial ATA card. I have two HDs: one of 80GB and another one with 250GB (serial ATA

  • Shaking cursor

    my cursor is shaking so badly that it makes it very difficult to do any work. I recently purchased cs3, and this is the first time I have tried doing this with this version. I really need it to work properly... any ideas? Oh, and I don't seem to be a

  • Contacts Do Not Appear To Be Synching From Outlook

    I turned on the sync contacts option under the Exchange/Outlook Mail settings on my iPhone iOS 8. So far, none of my unique work contacts have shown up on my iPhone with my personal contacts via iCloud. I'm not sure what else to do. I looked for an o

  • WLST and configToScript problems.....and problems....

    Well I have been running into many different problems with the py that gets created by the configToScript. The simplest of which is if I take a clean domain that has just been configured using the configuration wizard and just add a unix machine and