ORA-01001 - help

Hi,
I have a problem with an update statement that throws from time to time the Oracle Error: ORA-01001.(INVALID_CURSOR - illegal cursor operation such as closing an unopened cursor)
The update is:
update NMSMaterialTypeAttributesI set timestamp = S_NMSMATERIALTYPEATTRIBUTESI.NEXTVAL
,value = v_value
,instanceOf_id = v_instanceOf_id
,objectID = v_objectID
,copyNo = v_copyNo
,associatedItemVersion_id = v_associatedItemVersion_id
where id = v_id
RETURNING TIMESTAMP INTO v_timestamp;
COMMIT;
exception
when OTHERS then
declare
debugOutput_id     number;
errorCode          number := SQLCODE;
//i show the error
It's important to mentione:
1. The statement is inside a procedure that is not called from other procedures - but directly from Java code. The parameter v_timestamp is an In Out parameter, and others (v_) are in parameters. The S_NMSMATERIALTYPEATTRIBUTESI is a sequence.
2. The procedure doesn't contain any explicit cursor.
3. The procedure is executed in Oracle 10g
4. There is a trigger (before update) on NMSMaterialTypeAttributesI table.
The code of trigger is:
CREATE OR REPLACE TRIGGER bu_NMSMaterialTypeAttributesI
BEFORE UPDATE ON NMSMaterialTypeAttributesI
FOR EACH ROW
begin
if :new.id :old.id THEN
SQLMotorPack.raiseErrorEx( SQLMotorPack.ERR_UPDATE_ERROR,
SQLMotorPack.ERR_ROW_RECREATED, 'trigger bu_NMSMaterialTypeAttributesI',
'NMSMaterialTypeAttributesI',:new.id );
end if;
if :new.timestamp < :old.timestamp then
SQLMotorPack.raiseErrorEx( SQLMotorPack.ERR_UPDATE_ERROR,
SQLMotorPack.ERR_ROW_UPDATED_BY_OTHERS, 'trigger bu_NMSMaterialTypeAttributesI',                                                       'NMSMaterialTypeAttributesI',:new.id );
end if;
end;
I cannot find out what makes the update to throw this error. If somebody can help me i would appreciate very much.
PS:The number of opened_cursors doesn't exceed the MAXOPENEDCURSORS. I checked this the moment the error appeared.
Thx,
Daniela

Hi,
I have a problem with an update statement that throws from time to time the Oracle Error: ORA-01001.(INVALID_CURSOR - illegal cursor operation such as closing an unopened cursor)
The update is:
update NMSMaterialTypeAttributesI set timestamp = S_NMSMATERIALTYPEATTRIBUTESI.NEXTVAL
,value = v_value
,instanceOf_id = v_instanceOf_id
,objectID = v_objectID
,copyNo = v_copyNo
,associatedItemVersion_id = v_associatedItemVersion_id
where id = v_id
RETURNING TIMESTAMP INTO v_timestamp;
COMMIT;
exception
when OTHERS then
declare
debugOutput_id     number;
errorCode          number := SQLCODE;
//i show the error
It's important to mentione:
1. The statement is inside a procedure that is not called from other procedures - but directly from Java code. The parameter v_timestamp is an In Out parameter, and others (v_) are in parameters. The S_NMSMATERIALTYPEATTRIBUTESI is a sequence.
2. The procedure doesn't contain any explicit cursor.
3. The procedure is executed in Oracle 10g
4. There is a trigger (before update) on NMSMaterialTypeAttributesI table.
The code of trigger is:
CREATE OR REPLACE TRIGGER bu_NMSMaterialTypeAttributesI
BEFORE UPDATE ON NMSMaterialTypeAttributesI
FOR EACH ROW
begin
if :new.id :old.id THEN
SQLMotorPack.raiseErrorEx( SQLMotorPack.ERR_UPDATE_ERROR,
SQLMotorPack.ERR_ROW_RECREATED, 'trigger bu_NMSMaterialTypeAttributesI',
'NMSMaterialTypeAttributesI',:new.id );
end if;
if :new.timestamp < :old.timestamp then
SQLMotorPack.raiseErrorEx( SQLMotorPack.ERR_UPDATE_ERROR,
SQLMotorPack.ERR_ROW_UPDATED_BY_OTHERS, 'trigger bu_NMSMaterialTypeAttributesI',                                                       'NMSMaterialTypeAttributesI',:new.id );
end if;
end;
I cannot find out what makes the update to throw this error. If somebody can help me i would appreciate very much.
PS:The number of opened_cursors doesn't exceed the MAXOPENEDCURSORS. I checked this the moment the error appeared.
Thx,
Daniela

Similar Messages

  • Unexpected "ORA-01001: invalid cursor" error

    I have a Pro*C application that basically fetches from a cursor, does a bunch of work with that row, does a "delete from <table> where current of <cursor name>", then loops back, fetches, the next row, etc., and finally closes the cursor once all the rows have been processed.
    One of our clients is getting an 'ORA-01001' error on the "DELETE FROM <table> WHERE CURRENT OF <cursor>" statement. This is long-standing, frequently executed code at 100+ clients and I've never had a problem with this statement before. The client is consistently getting this error on a particular row from this cursor, but other rows processed with the same cursor are processing successfully.
    Unfortunately, I do not have direct access to the client's database, so I cannot debug directly, but I've placed print statements around the only place in my application's code that explicitly closes the cursor. A log generated on a run that threw the 1001 error confirmed that the cursor is NOT being explicitly closed by my application by an "EXEC SQL CLOSE <cursor>" statement.
    Likewise, I put print statements around all the COMMITs and ROLLBACKs in my application, and none of these showed in the logs either.
    My application does make a call to a client-customized PL/SQL function that they recently changed. However, I have a copy of the clients function and there are not any explicit COMMIT, ROLLBACK, ANALYZE, ALTER, DROP, REPLACE, TRUNCATE or CREATE statements that would implicitly commit and close the cursor.
    Here are potential problems that I have ruled out:
    -Oracle OPEN_CURSORS parameter - It appears that if this were the problem, the error would be an ORA-1000, not 1001. Please correct me if I am wrong here.
    -Pro*C MAXOPENCURSORS parameter - I compiled a version with a MAXOPENCURSORS value that is higher than the client's OPEN_CURSORS setting. If this were the problem, the error should have switched to the ORA-1000 error when I increased the parameter. It remained as an ORA-1001.
    Next steps:
    -What could cause a cursor to close other than explicit COMMIT, ROLLBACK, ANALYZE, ALTER, DROP, REPLACE, TRUNCATE or CREATE statements?
    -Is there anything I can run, such as a database trace, that will show me exactly when the cursor is being closed? I admittedly don't know a lot about DB traces.
    -Anything else I should check? Any other information I should provide?
    Thanks ahead of time for any help!

    Chandrakaanth Ramamurthy wrote:
    Does the client customized PL/SQL block contain EXIT
    Exit will end up issuing a commit and hence this could be an issue.Exit is not used in the customized function.
    Chandrakaanth Ramamurthy wrote:
    Also please check that commit and roll back are placed at the end of the loop.The only commit/rollback is after the loop is over is finished.
    I actually just figured out the issue. Turns out the cursor just hadn't been opened due to a very unique data condition... facepalm You know what happens when you assume things, right? :)
    Thanks for the help anyway!

  • ORA-01001: invalid cursor

    I have the below code I am trying to execute and get the error ORA-01001: invalid cursor
    create or replace PROCEDURE TESTUPDATE(pNAME VARCHAR2,pID NUMBER) IS
      CN NUMBER;
       CURSOR C1 IS
       SELECT CODE,SOPTION,SFILE
              STREET1,
              STREET2
       FROM TABLE1
       WHERE CODE = '10';
       CURSOR C2 IS
       SELECT CODE,
              STREET1,
              STREET2
       FROM TABLE2
        WHERE CODE = '10;
        C1_REC C1%rowtype;
        C2_REC C2%rowtype;
    BEGIN
       OPEN C1;
       FETCH C1 INTO C1_REC;
       SELECT COUNT(*) INTO CN FROM TABLE2
       WHERE  code =  '10'
          IF ( C1_REC.SOPTION = 'C' )  THEN  --- SOPTION is 'C"
             IF (CN = 0) THEN 
                IF (C1_REC.SFILE = 'FILE') THEN
                   INSERT INTO TABLE2(ASSIGNED) VALUES('Y');
                    ELSE    
                   INSERT INTO TABLE2(ASSIGNED) VALUES('N');              
                END IF;   
             ELSE    /* CN > 0 */
               OPEN C2;
               FETCH C2 INTO C2_REC;
               IF (C1_REC.SFILE = 'FILE') THEN
                 IF ( C1_REC.STREET1 IS NOT NULL OR
                     C1_REC.STREET2 IS NOT NULL ) AND
                   ( C1_REC.STREET1 !=  C2_REC.STREET1 OR
                     C1_REC.STREET2 !=  C2_REC.STREET2) THEN
                  UPDATE TABLE2
                  SET    ASSIGNED = 'I';
                 END IF;
           ELSE  /*IS NOT EQUAL TO 'FILE'*/
                 IF ( C1_REC.STREET1 IS NOT NULL OR
                     C1_REC.STREET2 IS NOT NULL ) AND
                   ( C1_REC.STREET1 !=  C2_REC.STREET2 OR
                     C1_REC.STREET2 !=  C2_REC.STREET2) THEN
                  UPDATE TABLE2
                  SET    TABLE2_status_ind = 'N';
               END IF;
             END IF;
           END IF;
          ELSIF ( C1_REC.SOPTION = 'CR' ) THEN   /*SOPTION is 'CR"*/
             IF (CN = 0) THEN
                IF (C1_REC.SFILE = 'FILE') THEN
                   INSERT INTO TABLE2(ASSIGNED) VALUES('Y');
                    ELSE    
                   INSERT INTO TABLE2(ASSIGNED) VALUES('N'); 
                END IF;
         ELSE    /* CN > 0*/
               OPEN C2;
               FETCH C2 INTO C2_REC; 
               IF (C1_REC.SFILE = 'FILE') THEN
                 IF ( C1_REC.STREET1 IS NOT NULL OR
                     C1_REC.STREET2 IS NOT NULL ) AND
                   ( C1_REC.STREET1 !=  C2_REC.STREET2 OR
                     C1_REC.STREET2 !=  C2_REC.STREET2) THEN
                  UPDATE TABLE2
                  SET    TABLE2_status_ind = 'I';
                  END IF;             
            ELSE  /* IS NOT EQUAL TO 'FILE'*/
                 IF ( C1_REC.STREET1 IS NOT NULL OR
                     C1_REC.STREET2 IS NOT NULL ) AND
                   ( C1_REC.STREET1 !=  C2_REC.STREET2 OR
                     C1_REC.STREET2 !=  C2_REC.STREET2) THEN
                  UPDATE TABLE2
                  SET    TABLE2_status_ind = 'I';
                  END IF; 
           END IF;
         END IF;
    END IF;
    CLOSE C1;
    CLOSE C2;     
    END IF;
    EXCEPTION WHEN NO_DATA_FOUND THEN
                       dbms_output.put_line('e1');
      CLOSE C1;
    WHEN OTHERS THEN
            CLOSE C1;
            dbms_output.put_line('e2');
    END;when I have the soption as CR and cn=0, I get the error invalid cursor. Please help me with changes to the code to overcome this error
    thanks
    Edited by: 890563 on 14 Nov, 2012 5:37 AM
    Edited by: BluShadow on 14-Nov-2012 13:39
    added {noformat}{noformat} tags to make code readable.  After 48 questions (of which you still have 40 unanswered for some reason?) and a year on the forums, we would expect you to have learnt how to ask questions... but just in case you missed it... read here: {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I am sorry for posting such confusing code. I changed the last part of code code to
    END IF;
    END IF;
    CLOSE C1;
    CLOSE C2;
    END IF;
    END IF;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    dbms_output.put_line('e1');
    CLOSE C1;
    WHEN OTHERS THEN
    CLOSE C1;
    dbms_output.put_line('e2');
    END;
    and it worked with out errors
    Thanks

  • Ora-01001 in procedures with ref cursor parameter after upgrade to 11.1.0.7

    Hi,
    after upgrading from 11.1.0.6.0 to 11.1.0.7.0, I get ora-01001 in procedure calls which have a ref cursor as an out parameter.
    Even a new 11.1.0.7 instance throws this error. My OS is Linux SLES10SP2.
    Please see atched sample code:
    CREATE OR REPLACE PACKAGE test1_pck
    IS
    PROCEDURE run1; -- OK on 11.1.0.6; fails on 11.1.0.7
    PROCEDURE run2; -- OK on 11.1.0.6; OK on 11.1.0.7
    END test1_pck;
    CREATE OR REPLACE PACKAGE BODY test1_pck
    IS
    TYPE t_rec IS RECORD(col dual.dummy%TYPE);
    TYPE t_cur IS REF CURSOR RETURN t_rec;
    PROCEDURE foo1(p_cur OUT t_cur)
    IS
    v_sql VARCHAR2(255) := 'BEGIN OPEN :1 FOR SELECT dummy FROM dual; END;';
    BEGIN
    EXECUTE IMMEDIATE v_sql USING p_cur;
    END foo1;
    PROCEDURE foo2
    IS
    v_sql VARCHAR2(255) := 'BEGIN OPEN :1 FOR SELECT dummy FROM dual; END;';
    v_cur t_cur;
    v_rec t_rec;
    BEGIN
    EXECUTE IMMEDIATE v_sql USING v_cur;
    LOOP
    FETCH v_cur INTO v_rec;
    EXIT WHEN v_cur%NOTFOUND;
    CASE v_rec.col
    WHEN 'X' THEN dbms_output.put_line('success');
    ELSE dbms_output.put_line('error');
    END CASE;
    END LOOP;
    END foo2;
    PROCEDURE run1
    IS
    v_cur t_cur;
    v_rec t_rec;
    BEGIN
    foo1(v_cur);
    LOOP
    FETCH v_cur INTO v_rec;
    EXIT WHEN v_cur%NOTFOUND;
    CASE v_rec.col
    WHEN 'X' THEN dbms_output.put_line('success');
    ELSE dbms_output.put_line('error');
    END CASE;
    END LOOP;
    END run1;
    PROCEDURE run2
    IS
    BEGIN
    foo2;
    END run2;
    END test1_pck;
    Thanks for any hints.
    Regards Frank

    Hi Max,
    the referenced thread discusses a .Net problem. A lot of layers are involved their. My problem is a very basic problem. You get this error even if you run the test in a sql session on the server.
    It would be a great help for me
    a) if someone could test this package on a 11.1.0.7 database
    b) if someone could test this package on a 11.2 database (is it fixed in Release2?)
    c) if someone could give me hints how I could modify the procedure to make it usable for 11.1.0.7
    (I already tried a lot e.g. EXECUTE IMMEDIATE v_sql USING OUT p_cur;
    Thank you
    Frank

  • Oracle 10g EE Export Results in ORA-01001: invalid cursor Error

    Hi,
    I'm quite new to Oracle 10g and OCS10g. We have a crippled/corrupt SYSAUX tablespace (data file 3) which cannot be recovered using recover
    command anymore. So metalink support instructed us to do a export of the metadata of the working tablespace which contains our system data (we are in configuration stage for OCS 10g 10.1.2) via transportable tablespaces so that I can just recreate the database in DBCA and import the metadata. So after I made a cold backup, set the "transportable" tablespaces to "READ ONLY" mode, I proceeded w/ the export command which resulted in an error, please see below:
    $exp \'sys/********@ocs10gSID as sysdba\' parfile=transport.par
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 -
    Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses AL32UTF8 character set (possible charset conversion)
    Note: table data (rows) will not be exported
    About to export transportable tablespace metadata...
    EXP-00008: ORACLE error 1001 encountered
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 899
    ORA-06512: at "SYS.DBMS_SQL", line 19
    ORA-06512: at "SYS.DBMS_TTS", line 811
    ORA-00376: file 3 cannot be read at this time
    ORA-01110: data file 3: '/ocfs/oradata/OCS/datafile/o1_mf_sysaux_2mgzbr51_.dbf'
    ORA-06512: at "SYS.DBMS_PLUGTS", line 1444
    ORA-06512: at line 1
    Anyone encountered this problem before? Any recommendations or tips to get this working?
    I checked this url:"http://luhartma.blogspot.com/2006/05/how-to-check-if-tablespace-is.html"
    And when I try to follow the instructions and check on of the tablespace I set to and verified to be in "READ ONLY" mode, I get the same error.
    SQL> connect / as sysdba
    Connected.
    SQL> exec dbms_tts.TRANSPORT_SET_CHECK('PORTAL',TRUE)
    BEGIN dbms_tts.TRANSPORT_SET_CHECK('PORTAL',TRUE); END;
    ERROR at line 1:
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 899
    ORA-06512: at "SYS.DBMS_SQL", line 19
    ORA-06512: at "SYS.DBMS_TTS", line 811
    ORA-00376: file 3 cannot be read at this time
    ORA-01110: data file 3: '/ocfs/oradata/OCS/datafile/o1_mf_sysaux_2mgzbr51_.dbf'
    ORA-06512: at "SYS.DBMS_TTS", line 840
    ORA-06512: at line 1
    Hope someone can help on this or at least provide a suggestion. Data file 3 above is the reason we are doing a transportable tablespace export & db recreation.
    BTW what we have is:
    OCS 10g 10.1.2 w/ Oracle RDBMS 10g Enterprise Edition 10.1.0.4.2
    RHEL4 Update2
    Thanks in advance.
    Regards,
    -Kenth

    Hi,
    The status is "RECOVER" we have actually tried to recover but unfortunately the archive logs that were needed were on disks and were lost during one of the server hardware failures. Actually that is the reason why metalink support recommended this route for getting everything in order since we don't have any application data in SYSAUX yet.
    Thanks.

  • ORA-07445, ORA-00600, ORA-00604, ORA-01001 errors

    Oracle 10.2.0.4, Windows Server 2003 64bit
    Every two months I get this error masseage...
    Can you help me with this?
    Fri Feb 03 07:11:02 2010
    Errors in file D:\oracle\product\10.2.0\admin\MYSID\udump\MYSID_ora_1115.trc:
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x623C9544] [ADDR:0x100000007] [UNABLE_TO_READ] []
    Fri Feb 03 07:12:17 2010
    Thread 1 advanced to log sequence 22223 (LGWR switch)
    Current log# 1 seq# 43463 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\MYSID\REDO01.LOG
    Fri Feb 03 07:14:55 2010
    Thread 1 cannot allocate new log, sequence 22224
    Checkpoint not complete
    Current log# 1 seq# 43463 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\MYSID\REDO02.LOG
    Fri Feb 03 07:14:56 2010
    Thread 1 advanced to log sequence 22224 (LGWR switch)
    Current log# 2 seq# 43464 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\MYSID\REDO03.LOG
    Fri Feb 03 07:17:20 2010
    Thread 1 advanced to log sequence 22225 (LGWR switch)
    Current log# 3 seq# 43465 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\MYSID\REDO01.LOG
    Fri Feb 03 07:22:35 2010
    Thread 1 advanced to log sequence 22226 (LGWR switch)
    Current log# 1 seq# 43466 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\MYSID\REDO02.LOG
    Fri Feb 03 07:25:09 2010
    Thread 1 advanced to log sequence 22227 (LGWR switch)
    Current log# 2 seq# 43467 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\MYSID\REDO03.LOG
    Fri Feb 03 07:26:32 2010
    Errors in file D:\oracle\product\10.2.0\admin\MYSID\udump\MYSID_ora_3124.trc:
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    Fri Feb 03 07:26:36 2010
    Errors in file D:\oracle\product\10.2.0\admin\MYSID\udump\MYSID_ora_3124.trc:
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    Fri Feb 03 07:26:37 2010
    Errors in file D:\oracle\product\10.2.0\admin\MYSID\udump\MYSID_ora_3124.trc:
    ORA-00600: internal error code, arguments: [kghfrh:ds], [0x14524BE78], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    Fri Feb 03 07:26:39 2010
    Errors in file D:\oracle\product\10.2.0\admin\MYSID\udump\MYSID_ora_3124.trc:
    ORA-00600: internal error code, arguments: [17183], [0x07EF1FD88], [], [], [], [], [], []
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01001: invalid cursor
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01001: invalid cursor
    ORA-00600: internal error code, arguments: [kghfrh:ds], [0x14524BE78], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    Fri Feb 03 07:26:40 2010
    Errors in file D:\oracle\product\10.2.0\admin\MYSID\udump\MYSID_ora_3124.trc:
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [17183], [0x07EF1FD88], [], [], [], [], [], []
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01001: invalid cursor
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01001: invalid cursor
    ORA-00600: internal error code, arguments: [kghfrh:ds], [0x14524BE78], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kghfrmrg:nxt], [0x14524BE60], [], [], [], [], [], []

    Can you help me with this?In case of internal errors (ORA-00600,ORA-07445) only Oracle support can really help you. Open a SR on MOS/metalink.
    Werner

  • Crash of Apache + ORA-00600 + ORA-01001

    Hello,
    On my production server, Windows Server 2003, I've installed WAMP 1.4.3 running Apache/1.3.33 and with version of PHP: 5.0.3. I'm using the extension php_oci8.dll. The database Oracle is Oracle Database 10g Release 10.2.0.3.0 - 64bit
    We are facing Apache crashes (several time a week), which do not seem to be linked to a specific action performed on the application.
    When this happen, the following message appears in Oracle log:
    ORA-00600: internal error code, arguments : [17281], [1001], [0x0B5242F40], [], [], [], [], []
    ORA-01001: invalid cursor
    In the log, there is as well the following line, which I don't know how to read:
    program: Apache.exe
    application name: Apache.exe, hash value=0
    last wait for 'SQL*Net message from client' blocking sess=0x(nil) seq=52 wait_time=2653 seconds since wait started=0
    We were asked to change the version of the client Oracle to 10.2.0.4 (it was a previous version) but that still doesn't correct the problem.
    I'm wondering if the issue is on the Apache side or on Oracle?? It seems that the Apache is waiting to Oracle's response and as Oracle doesn't give the information it needs, that makes Apache crash.
    Does anyone faced the same issue?
    Thanks for any help.

    Using Oracle 10.2.0.4 is good. I'm not surprised it hasn't helped
    because there are very few cases where the minor patch number has
    impacted PHP OCI8.
    I think the problem is the PHP version. All my warnings in various
    posts/forums/articles about the instability of the default OCI8
    extension with PHP 4 also apply to PHP 5.0 and PHP 5.1.1. The error
    you mention wouldn't surprise me with any of those versions.
    A refactored OCI8 extension to resolve various issues only first
    appeared in PHP 5.1.2. Unfortunately on Windows it isn't so easy to
    drop in the latest OCI8 extension code. I suggest upgrading to PHP
    5.2.
    If you want to continue using WAMP, the lastest WampServer on ships
    PHP 5.3.0. This was the very first release of a major PHP version so
    the changes and instability might be a factor for you. I'd look at
    http://sourceforge.net/projects/wampserver/files/WAMP5/ and find one
    that uses a PHP 5.2 release. Then I'd see if replacing the default
    php_oci8.dll with php_oci8-1.4.1-5.2-vc6-x86.zip from
    http://downloads.php.net/pierre/ works. (Or maybe use the -nts-
    version of the file depending whether WAMP runs non-thread-safe).
    You could do worse than replace WAMP with your own PHP installation
    following
    http://www.oracle.com/technology/tech/php/htdocs/inst_php_apache_windows.html
    or
    http://www.oracle.com/technology/pub/notes/technote_php_instant.html
    or use Zend Server.

  • ORA-01001: invalid cursor (Inbound jdbc adapter XI 2.0)

    Hello, I get the error ORA-01001: invalid cursor when I try to delete the data in interface table in an ORACLE database. Has anybody an idea of what maybe the problem.
    here the text...
    14:41:59 (4225): Confirm with statement "delete * from sap_interface.aswaa00f"
    14:41:59 (4226): ERROR: Confirm action failed with error "java.sql.SQLException: ORA-01001: invalid cursor
    regards
    Ernesto Duran

    Hello Prasad, thank you for your response. The problem (limitation) was that the adapter (or the driver) can only update natives ORACLE tables and the table I wanted to update was a gateway table to an external program.
    regards
    Ernesto Duran

  • ORA-01001 error while TSPITR

    I keep on getting ORA-01001 : invalid cursor error while trying to transport a tablespace as a part of TSPITR.
    Here is how it looks:
    ===================================================
    C:\>exp parfile=c:\exp_transport.par
    Export: Release 9.2.0.1.0 - Production on Tue Apr 27 14:47:19 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    Note: table data (rows) will not be exported
    About to export transportable tablespace metadata...
    EXP-00008: ORACLE error 1001 encountered
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 819
    ORA-06512: at "SYS.DBMS_SQL", line 19
    ORA-06512: at "SYS.DBMS_TTS", line 774
    ORA-25153: Temporary Tablespace is Empty
    ORA-06512: at "SYS.DBMS_PLUGTS", line 1093
    ORA-06512: at line 1
    EXP-00000: Export terminated unsuccessfully
    ===================================================
    Any suggestion ?

    Guys,
    Come on Give me a Solution.
    Badly Needed....

  • ORA-01001 in Form Based on Stored Proc.

    I'm getting ORA-01001 when the form passes parameters
    to the stored procedure:
    Error Executing Cursor
    SQL:
    begin
    "ABSUSR"."P_PORTAL_RPTS1" ( P_RPT_NAME => 'Print1',
    P_ST_DATE => '01-OCT-01', P_EN_DATE => '04-JUN-02',
    P_FORMAT => 'HTML', P_ROWS => '250');
    end;
    ORA-01001: invalid cursor
    I can't see anything wrong with the parameters, and
    the procedure works fine by itself. I also get a
    script error when running the form as a portlet,
    by itself, or in a page: "A runtime error has
    occured: do you wish to debug? Line 2 Expected "("
    But there is nothing obviously wrong with the
    html that's presented for debugging. I have
    searched for 1001 at Metalink and Portal Studio,
    and found note 1007395.6 Common Causes of 1001.
    I don't see that error checking is an issue,
    and my OPEN_CURSORS is set to 300.
    any thoughts or experience?
    thanks and best wishes, Jon Angel HHS/PSC

    Hi Jon ,
    Can you explain your requirement in more detail as I'm not getting what may be wrong by your query.Please let me know what type of procedure is it.
    and also please tell in what circumstances are u getting error when you make a portlet.
    It will be nice if you can make a full test case of your requirement.
    Hope to get details from you.
    rahul

  • OCI threaded sample causes ORA-00022 or ORA-01001

    I have created a sample program which initializes environment in OCI_THREADED mode and then starts multiple threads. Usually it completes successfully, but sometimes it terminates with error ORA-00022 (invalid session ID; access denied) or ORA-01001 (invalid cursor). I have checked with Oracle 9.2 and 10.2, problem occurs on both. Do I something wrong in my code ? My code requires creation of record rec1 (id number primary key, val number) containing rows with id equal to 0 .. 100:
    #include <pthread.h>
    #include <oci.h>
    #include <string.h>
    #include <stdio.h>
    #include <stdlib.h>
    static char g_User, g_Pass;
    static OCIEnv *g_pOciEnv = NULL;
    static OCIError *g_pOciError = NULL;
    static OCIServer *g_pOciServer = NULL;
    enum { NUM_THR = 20, NUM_INC = 30 };
    typedef struct {
    OCIError *pOciError;
    OCISession *pOciSession;
    OCISvcCtx *pOciSvcCtx;
    } OciSession;
    static void CheckError(OCIError *pOciError, sword status)
    OraText errbuf[512];
    sb4 errcode;
    int i;
    if( status != OCI_SUCCESS ) {
    fflush(stdout);
    if( status == OCI_ERROR ) {
    for(i = 1; OCIErrorGet(pOciError, (ub4) i, NULL, &errcode,
    errbuf, (ub4)sizeof(errbuf), OCI_HTYPE_ERROR) ==
    OCI_SUCCESS; ++i)
    fprintf(stderr, "Error: %s\n", errbuf);
    }else
    fprintf(stderr, "unexpected error %d\n", (int)status);
    exit(1);
    static void InitSession(OciSession *pSes)
    OCIHandleAlloc((dvoid *)g_pOciEnv, (dvoid **)&pSes->pOciError,
    OCI_HTYPE_ERROR, 0, NULL);
    CheckError(pSes->pOciError, OCIHandleAlloc((dvoid*)g_pOciEnv,
    (dvoid**)&pSes->pOciSession, OCI_HTYPE_SESSION, 0, NULL));
    CheckError(pSes->pOciError, OCIAttrSet((dvoid *)pSes->pOciSession,
    OCI_HTYPE_SESSION, g_User, strlen(g_User), OCI_ATTR_USERNAME,
    pSes->pOciError));
    CheckError(pSes->pOciError, OCIAttrSet((dvoid *)pSes->pOciSession,
    OCI_HTYPE_SESSION, g_Pass, strlen(g_Pass), OCI_ATTR_PASSWORD,
    pSes->pOciError));
    CheckError(pSes->pOciError, OCIHandleAlloc((dvoid *)g_pOciEnv,
    (dvoid**)&pSes->pOciSvcCtx, OCI_HTYPE_SVCCTX, 0, NULL));
    CheckError(pSes->pOciError, OCIAttrSet((dvoid *)pSes->pOciSvcCtx,
    OCI_HTYPE_SVCCTX, (dvoid*)g_pOciServer, 0,
    OCI_ATTR_SERVER, pSes->pOciError));
    CheckError(pSes->pOciError, OCISessionBegin(pSes->pOciSvcCtx,
    pSes->pOciError, pSes->pOciSession, OCI_CRED_RDBMS,
    OCI_DEFAULT));
    CheckError(pSes->pOciError, OCIAttrSet(pSes->pOciSvcCtx, OCI_HTYPE_SVCCTX,
    (dvoid*)pSes->pOciSession, 0, OCI_ATTR_SESSION,
    pSes->pOciError));
    static void CleanupSession(OciSession *pSes)
    CheckError(pSes->pOciError, OCITransRollback(pSes->pOciSvcCtx,
    pSes->pOciError, OCI_DEFAULT));
    CheckError(pSes->pOciError, OCISessionEnd(pSes->pOciSvcCtx,
    pSes->pOciError, pSes->pOciSession, OCI_DEFAULT));
    OCIHandleFree(pSes->pOciSession, OCI_HTYPE_SESSION);
    OCIHandleFree(pSes->pOciSvcCtx, OCI_HTYPE_SVCCTX);
    OCIHandleFree(pSes->pOciError, OCI_HTYPE_ERROR);
    static void ThreadFun(void pv)
    char sText[] = "select val from rec1 where id = :ses ";
    int i, nSes = (int)pv, nVal;
    OciSession ses;
    OCIStmt *pStmt;
    OCIDefine *pODefine = NULL;
    OCIBind *pOBind = NULL;
    InitSession(&ses);
    OCIHandleAlloc(g_pOciEnv, (void**)&pStmt, OCI_HTYPE_STMT, 0, NULL);
    CheckError(ses.pOciError, OCIStmtPrepare(pStmt, ses.pOciError,
    (OraText*)sText, strlen(sText), OCI_V7_SYNTAX, OCI_DEFAULT));
    CheckError(ses.pOciError, OCIBindByName(pStmt, &pOBind,
    ses.pOciError, "ses", strlen("ses"), &nSes, sizeof(int),
    SQLT_INT, NULL, NULL, NULL,
    0, NULL, OCI_DEFAULT));
    CheckError(ses.pOciError, OCIDefineByPos(pStmt, &pODefine,
    ses.pOciError, 1, &nVal, sizeof(int), SQLT_INT, NULL, NULL,
    NULL, OCI_DEFAULT));
    for(i = 0; i < NUM_INC; ++i) {
    CheckError(ses.pOciError, OCIStmtExecute(ses.pOciSvcCtx, pStmt,
    ses.pOciError, 1, 0, NULL, NULL, OCI_DEFAULT));
    printf("%d %d\n", nSes, i);
    CheckError(ses.pOciError, OCIHandleFree(pStmt, OCI_HTYPE_STMT) );
    CleanupSession(&ses);
    int main(int argc, char *argv[])
    pthread_t thread[NUM_THR];
    int i;
    if( argc < 3 ) {
    printf("usage: %s user password [dblink]\n", argv[0]);
    return 0;
    g_User = argv[1];
    g_Pass = argv[2];
    OCIEnvCreate(&g_pOciEnv, OCI_THREADED, NULL, NULL, NULL, NULL, 0, NULL);
    OCIHandleAlloc((dvoid *)g_pOciEnv, (dvoid**)&g_pOciError,
    OCI_HTYPE_ERROR, 0, NULL);
    OCIHandleAlloc((dvoid*)g_pOciEnv, (dvoid**)&g_pOciServer,
    OCI_HTYPE_SERVER, 0, NULL);
    CheckError(g_pOciError, OCIServerAttach(g_pOciServer, g_pOciError,
    (text*)argv[3], argc>3 ? strlen(argv[3]) : 0, OCI_DEFAULT));
    for(i = 0; i < NUM_THR; ++i)
    pthread_create(thread+i, NULL, ThreadFun, (void*)i);
    for(i = 0; i < NUM_THR; ++i)
    pthread_join(thread, NULL);
    OCIServerDetach(g_pOciServer, g_pOciError, OCI_DEFAULT);
    OCIHandleFree(g_pOciServer, OCI_HTYPE_SERVER);
    OCIHandleFree(g_pOciEnv, OCI_HTYPE_ENV);
    printf("OK\n");
    return 0;

    In your code the join for thread looks like:
    for(i = 0; i < NUM_THR; ++i)
    pthread_join(thread, NULL);
    is this actually what is there in your code or is it just a typo in posting the message ? If it is the former case then the problem is here itself

  • ORA-01001

    I've written two packages. It was working fine in Dev Database. But, when our onsite member uploads it in Stage DB it is showing the follwing error --
    ORA-01001: invalid cursor
    Cause: Either a host language program call specified an invalid cursor or the value of the MAXOPENCURSORS option in the precompiler command were too small.
    All cursors must be opened using the OOPEN call before being referenced in any of the following calls: SQL, DESCRIBE, NAME, DEFINE, BIND, EXEC, FETCH, and CLOSE.
    The Logon Data Area (LDA) must be defined by using OLON or OLOGON. If the LDA is not defined, this message is issued for the following calls: OPEN, COM, CON, ROL, and LOGOFF.
    Action: Check the erroneous call statement. Specify a correct LDA area or open the cursor as required.
    If there is no problem with the cursor, it may be necessary to increase the MAXOPENCURSORS option value before precompiling. What is the probable reason for such output? Can anyone have any idea? Thanks in advance for any feedback.
    Regards.
    Satyaki De.
    Still i'm looking for the answer....

    You can get this error by attempting to fetch from a cursor you haven't opened:
    DECLARE
        CURSOR c_emp IS SELECT ename FROM emp;
        r c_emp%ROWTYPE;
    BEGIN
        FETCH c_emp INTO r;
    END;
    ERROR at line 1:
    ORA-01001: invalid cursor
    ORA-06512: at line 5Something like his will also do it:
    DECLARE
        CURSOR c_emp IS SELECT ename FROM emp;
        r c_emp%ROWTYPE;
    BEGIN
        DBMS_OUTPUT.PUT_LINE(c_emp%ROWCOUNT);
    END;
    /btw the preformatting in your post makes it hard to read, and puts the "Reply" button about a mile off the screen.
    Message was edited by:
    William Robertson

  • Proxy connections getting ORA-01001: invalid cursor

    All,
    I am having tremendous difficulty using Oracle proxy connections under WebSphere 5.1. The problem appears to be that the proxy sessions (or the logical connections) are not being closed properly resulting in 'invalid cursor' and 'fetch out of sequence' exceptions.
    Here's the sequence of events:
    Environment
    AppServer : Websphere 5.1
    Database : Oracle 10gR2
    Datesource: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Start up application server
    Check the sessions on the db
    USERNAME                       TYPE       SERVER    MODULE
    * APAX                           USER       DEDICATED
    * APAX                           USER       DEDICATED
    SYS                            USER       DEDICATED sqlplus@apaxIIdb (TNS V1-V3)* = connection pool sessions
    Step 1: getting the connection
    // lookup datasource in jndi
    Connection myConnection = myDataSource.getConnection();Step 2: opening a proxy connection
    Properties myProperties = new Properties();
    myProperties.put("CONNECTION_TAG", aPrincipal);
    myProperties.put("PROXY_USER_NAME", aPrincipal);
    OracleConnection myOracleConnection =
      (OracleConnection) WSJdbcUtil.getNativeConnection((WSJdbcConnection) myConnection);
    myOracleConnection.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, myProperties);Step 3: check the sessions on the db
    SQL>  select username, type, server, module
    from v$session
    where type != 'BACKGROUND'
    and username is not null
    order by username;
    USERNAME                       TYPE       SERVER    MODULE
    APAX                           USER       DEDICATED
    APAX                           USER       DEDICATED
    APAX                           USER       DEDICATED
    SYS                            USER       DEDICATED sqlplus@apaxIIdb (TNS V1-V3)
    * USER1                          USER       PSEUDO* = proxy connection
    Step 4: prepare and execute query
    myResultSet = myStatement.executeQuery();Exception thrown: java.sql.SQLException: ORA-01001: invalid cursor
    SQLState = 72000
    vendorCode = 1001
    Session information:
    USERNAME                       TYPE       SERVER    MODULE
    APAX                           USER       DEDICATED
    APAX                           USER       DEDICATED
    SYS                            USER       DEDICATED sqlplus@apaxIIdb (TNS V1-V3)
    * USER1                          USER       DEDICATED* = proxy session appears to have changed
    Step 5: clear up
    OracleConnection myOracleConnection =
      (OracleConnection) WSJdbcUtil.getNativeConnection((WSJdbcConnection) aConnection);
    myOracleConnection.close(OracleConnection.PROXY_SESSION);
    myOracleConnection.close();Check sessions again
    USERNAME                       TYPE       SERVER    MODULE
    APAX                           USER       DEDICATED
    APAX                           USER       DEDICATED
    SYS                            USER       DEDICATED sqlplus@apaxIIdb (TNS V1-V3)There are no Oracle udump files or other tracing information.
    Any ideas?

    We were getting ORA-01001 error messages that didn't appear to make sense when calling certain pl/sql procedures from a application running on a Weblogic/Apache platform. The errors would not occur when we invoked the same procedures via script from a standalone SQL client.
    We were able to put an end to the Web application errors by upgrading our jdbc driver from 10.1.0.4.0 to 10.2.0.1.0.

  • "ORA-01001 Invalid Cursor" error

    Platform: oracle 8.X on ibm aix and java client code from
    windows NT.
    JDBC DRIVER: JDBC Oracle thin driver version 1.2.
    when i execute a Sql satement with Cursor expression from the
    java client code with XSU it returns an XML DOM But if the
    CURSOR EXPRESSION IN THE SQL QUERY RETURNS EMPTY ROWS i get
    back an error node with "ORA-01001 Invalid Cursor" error
    message.i had aslo set the setNullAttributes(true) property
    on oraclexmlquery.
    Interestingly, if i exceute the same query in the SQL plus
    it returns the column names with no rows.
    is there any way where i can get xml document with table
    structure, when there are no rows instead of ORA error message.
         

    This is just a guess,
    all you cursors are being opened regardless of any condition, for example;
    OPEN CUT(:NEW.LAYOUT_NO);
    OPEN DET(:NEW.LAYOUT_NO);
    OPEN ITM(:NEW.LAYOUT_NO);
    OPEN LOT(:NEW.LAYOUT_NO);
    OPEN DTN(:NEW.LAYOUT_NO, :NEW.CUT_NO, :NEW.NOTE);UNA however is opened after a condition;
    IF DTN%NOTFOUND THEN
      /** start --added for cha 2011-3172 6/14/2011 **/
          OPEN UNA(:NEW.LAYOUT_NO, :NEW.ACCOUNT_NO);All cursors arel however closed regardless, i.e. they are all assumes to be open;
      CLOSE CUT;
      CLOSE DET;
      CLOSE DTN;
      CLOSE ITM;
      CLOSE LOT;
      CLOSE STAT;
      CLOSE UNA;So I think you are closing the UNA cursors wen it is in fact not open.
    So, move the "CLOSE UNA;" line of code to before the END IF; on line 278, since that is when it will definitely be open.

  • ORA-01001: not all veriables bound

    Hi,
    I am calling stored procedure from java. I have registered all OUT parameters and set all IN parameters, also INOUT parameters are taken care of....
    I am getting this exception from database..
    ORA-01001: not all verialbes bound
    does anybody know what this means ?? or where I can find out some documentation which explains about this error ?
    -Thanks

    I found a different description for ORA-01001:
    ORA-01001 invalid cursor
    Cause: Either a host language program call specified an invalid cursor or the values of the AREASIZE and MAXOPENCURSORS options in the precompiler command were too small. All cursors must be opened using the OOPEN call before being referenced in any of the following calls: SQL, DESCRIBE, NAME, DEFINE, BIND, EXEC, FETCH, and CLOSE. The Logon Data Area (LDA) must be defined by using OLON or OLOGON. If the LDA is not defined, this message is issued for the following calls: OPEN, COM, CON, ROL, and LOGOFF.
    Action: Check the erroneous call statement. Specify a correct LDA area or open the cursor as required. If there is no problem with the cursor, it may be necessary to increase the AREASIZE and MAXOPENCURSORS options before precompiling.
    Jamie

Maybe you are looking for

  • Macbook pro 2011 running slow

    Problem description: my computer has been running ridiculously slowly to the point I am wondering if I am supposed to be upgrading to a different computer?  Applications, documents, everything takes forever to open. Also Microsoft Word crashes pretty

  • My Options- Sync does not offer a manage account so I cannot find a "recovery key" to sync with my Galaxy note III android.

    I run firefox browser on Windows 7. I am trying to synch with my android Galaxy note 3. When I am asked for a recovery key I am directed to pull down the "sync" option an use the choices. But all I pull down is a menu to set up synch. How do I find m

  • Determine Liquidity Item between GL Accounts

    I have created an assignment report from FI: IF (Document Type = ZP) AND (G/L Account = 2918073701) THEN  Liquidity Item --> CONTRACT620 Document (Document Type: ZP) Account Type     Posting Key     G/L Account               Amount S          40     

  • Itunes 8.0 - My ratings and play list are gone! External Drive

    Itunes 8.0 - My ratings and play list are gone! External Drive It has about one year I have been rating my songs and creating my play lists. I keep all my musics on a external drive. Always when I plug the drive I can play the musics list on the libr

  • Objects as parameters?

    Hello I have a question. I have 2 classes: a simpleInterest and compoundInterest. Now they pretty much do the same thing except calculate differently. Now my problem is that depending on what type of interest a person wants, I should do this somehow