Increased # of cursors in Oracle cause AccessControlException?

I have a signed applet that connects to oracle using the thin client. I've been able to connect to the database for the last week until today. The database was shut down momentarily and the number of cursors were increased. Now, I get the same error that I got before I set up my policy file correctly(over a week ago).
<pre>
java.security.AccessControlException: access denied (java.net.SocketPermission 207.98.248.27:1135 connect,resolve)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkConnect(Unknown Source)
     at java.net.Socket.<init>(Unknown Source)
     at java.net.Socket.<init>(Unknown Source)
     at oracle.sqlnet.SQLnet.Connect(SQLnet.java:330)
     at oracle.sqlnet.SQLnet.ConnectToAddress(SQLnet.java:266)
     at oracle.sqlnet.SQLnet.Connect(SQLnet.java:400)
     at oracle.sqlnet.SQLnet.Connect(SQLnet.java:290)
     at oracle.sqlnet.SQLnet.Connect(SQLnet.java:199)
     at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1021)
     at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:186)
     at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:127)
     at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:170)
     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
     at java.sql.DriverManager.getConnection(Unknown Source)
     at java.sql.DriverManager.getConnection(Unknown Source)
     at ExsequorWeb.init(ExsequorWeb.java:155)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
</pre>
I closed and reopened the applet, same exception. I rebooted my pc, same exception I recompiled my driver class re-jared, and resigned jar, same exception.
My question is this: Does increasing the number of cursors cause my applet to be untrusted or compromise my policy file? This is very strange to me! It also scares me b/c if simply increasing the number of cursors in the database causes my applet not to run, we are in trouble!

It appears right now that all is back to normal (if there is such a thing!). I failed to explain in the first posting that our R&D dept. is getting new machines. These machines were placed on the network yesterday to allow us to move files over. This is the same day that the database started having trouble connecting or resolving me or my applet. I was not aware that these machines were placed on the network when I started having problems.
I cannot tell you why, but by this new machine being on the network, oracle rejected my old machine's connection requests. Though similar, "mcash" and "mcash1", they are unique names for my old and new machines respectively. I shut down the new machine and oracle is my friend again!
The good news is that it had nothing to do with the oracle change. At the same time I cannot understand why two different machines on the network confused oracle. If this makes sense to anyone let me know!

Similar Messages

  • Viewer leaving open cursors in Oracle

    We are using the JRC to display reports in our software. We are running jboss-4.2.0 as our application server. The backend could be either SQL Server or Oracle. For Oracle we are using the oracle.jdbc.driver.OracleDriver driver. The reports are set up using a JDBC (JNDI) connection. Generally we have it working ok but in Oracle the JRC is leaving open cursors leading to  ORA-01000: MAXIMUM OPEN CURSORS EXCEEDED. I have found that a new cursor is opened when the data source is changed in the following code snippet
    Iterator tableIT = tableNames.iterator();
    while (tableIT.hasNext()) {
      ITable oldTable = (ITable)tableIT.next();
      ITable table = (ITable) ((IClone)oldTable).clone(true);
      table.setQualifiedName(table.getName());
      clientDoc.getDatabaseController().setTableLocation(oldTable, table);
    When we hit the last line in this loop, a new cursor is opened in Oracle so if a report has 10 tables, I get 10 cursors opened. I know that I need to close the cursors somehow but nothing I do seems to make a difference. After my processHttpRequest call to the viewer I added:
    crystalReportPageViewer.getReportSource().dispose();
    clientDoc.getReportSource().dispose();
    The code definately executes but the the number of open cursors in Oracle does not change. I am at a loss.

    A couple more things to think about then.
    1.  When you go through your loop to set your table location, you are using the clone method to create a new table and then pass that table to the report.  Cloning tables is no longer necessary with the JRC.  We do know that a fix was provided for the JRC SDK, however this fix would probably not have been applied to the clone method since it has been deprecated.
    I have attached a sample that shows the new methodology for setting table location; very similar, just not using clone anymore.
    2.  When you want to destroy any connections that the ReportClientDocument has made, you will need to call .close() on this object.  This can be done in conjunction with the viewer.dispose().  One thing to note is that if you call the .close() method, it will need to be done as the user is closing the browser, or you will not have access to your report object when you have it open in the HTML Viewer.

  • How to increase the memory of oracle

    Hi,
    I am having oracle database version 11.0.1.6 on windows server 2003 R2.
    My Server Ram size is 12 GB.
    select * from V$SGAINFO;
    Fixed SGA Size     1335136     No
    Redo Buffers     12529664     No
    Buffer Cache Size     1073741824     Yes
    Shared Pool Size     176160768     Yes
    Large Pool Size     8388608     Yes
    Java Pool Size     16777216     Yes
    Streams Pool Size     8388608     Yes
    Shared IO Pool Size     0     Yes
    Granule Size     8388608     No
    Maximum SGA Size     1297321984     No
    Startup overhead in Shared Pool     58720256     No
    Free SGA Memory Available     0     
    I want to increase my memory for oracle because i need to insert 31 billion rows into a table with nologging. I am inserting them chunk by chunk and commit after each chunk. But it is taking 62 hours to insert the rows. So i think if i increase the memory i could reduce the time to insert the rows.
    I really am not sure whether i am thinking in the right way. Please advise. If i want to increase the memory please let me know how to increase it.
    Thanks in advance

    Are all columns in the WHERE clause indexed?
    Are statistics current & accurate for all tables & indexes?
    post EXPLAIN PLAN for SQL below
    PROCEDURE Pro_unpvt_usm_dr
    IS
    BEGIN
        FOR k IN (SELECT DISTINCT pr_id
                  FROM   unpvt_im_dr_e0322) LOOP
            INSERT /*+ append */ INTO unpvt_usm_dr_e0322
            SELECT pr_id,
                   nr,
                   col,
                   Corr(n, m) val
            FROM   (SELECT a.pr_id,
                           a.nr,
                           b.nr  col,
                           a.n,
                           b.val m
                    FROM   unpvt_usm_drpre1_e0322 a,
                           unpvt_im_dr_e0322 b
                    WHERE  a.pr_id = k.pr_id
                           AND b.pr_id = k.pr_id
                           AND a.col = b.col)
            GROUP  BY pr_id,
                      nr,
                      col;
            COMMIT;
        END LOOP;
        dbms_output.Put_line('POPULATED UNPVT_USM_DR_E0322');
    END pro_unpvt_usm_dr;

  • Cursor in ORACLE FORMS 10g/6i

    Dear All Seniors
    Please tell me with complete example about CURSORS in ORACLE 10g/ 6i.
    i.e
    -> declaration
    ->opening
    -> fetching
    -> close etc
    Shall be very thankfull to him.
    thanks in advance
    yassen

    Here is an example
    DECLARE
         /* cursor declaration */
         CURSOR C IS
         SELECT  EMP_MST.EMP_ID,EMP_MST.EMP_DESIG_ID,     
         EMP_MST.EMP_CODE, EMP_MST.EMP_NAME,
         DESIG_MST.DESIG_NAME,EMP_MST.EMP_MIN_DOLLAR,EMP_MST.EMP_GROSS_SAL,  EMP_MST.EMP_BASIC,
         EMP_MST.EMP_MOBILE_BILL,EMP_MST.EMP_TA,EMP_MST.EMP_FES_BONUS
         FROM EMP_MST, DEPT_MST,DESIG_MST
         WHERE NVL(EMP_MST.EMP_QUIT, 0) = 0
         AND EMP_MST.EMP_CID_ID=:GLOBAL.GUNIT_ID
         AND EMP_MST.EMP_DEPT_ID=:GLOBAL.GDEPT_ID
         AND EMP_MST.EMP_DEPT_ID=DEPT_MST.DEPT_ID
         AND EMP_MST.EMP_DESIG_ID=DESIG_MST.DESIG_ID
         AND EMP_MST.EMP_SAL_TYPE=1
         ORDER BY EMP_MST.EMP_CODE;
         ALT NUMBER;
         R C%ROWTYPE;
         N NUMBER;
         errnum NUMBER       := ERROR_CODE;
      V_COUNT NUMBER;
      SD_COUNT NUMBER;
         V_ADD_AMT NUMBER;
         V_ADD_DEDUCT NUMBER;
         V_SAL_ADD_AMT NUMBER;
    BEGIN     
         SELECT COUNT(SD_EMP_ID) INTO SD_COUNT
         FROM SALARY_DTL,SALARY_MST
         WHERE SALARY_DTL.SD_SM_ID=SALARY_MST.SM_ID
         AND SALARY_MST.SM_MONTH=:SALARY_MST.SM_MONTH;
    /*cursor open*/
         OPEN C;
         --=================
           IF errnum = 40508 THEN    
                ALT:=SHOW_ALERT('DUP_MYD');
                RAISE Form_Trigger_Failure;
           END IF;      
         --================     
              GO_BLOCK('SALARY_DTL');     
              IF SD_COUNT=0 THEN
              FIRST_RECORD;
              ELSE
                   LAST_RECORD;
                   NEXT_RECORD;
              END IF;
         LOOP
          FETCH C INTO R;               ----cursor fetch/read
          EXIT WHEN C%NOTFOUND;     
          :SALARY_DTL.SD_EMP_ID:=R.EMP_ID;         --- data assign...
          :SALARY_DTL.SD_DESIG_ID:=R.EMP_DESIG_ID;     
          :SALARY_DTL.TXT_EMP_CODE:=R.EMP_CODE;     
          :SALARY_DTL.TXT_NAME:=R.EMP_NAME;     
          :SALARY_DTL.TXT_DESIG:=R.DESIG_NAME;
          :SALARY_DTL.SD_OLD_GROSS_SAL:=R.EMP_GROSS_SAL;
          :SALARY_DTL.SD_GROSS_SAL:=ROUND(R.EMP_MIN_DOLLAR*:SALARY_MST.SM_DOLLAR_RATE);
    --      :SALARY_DTL.SD_ORG_BASIC:=R.EMP_BASIC;     
          :SALARY_DTL.SD_ORG_BASIC:=ROUND(:SALARY_DTL.SD_GROSS_SAL*60/100);
          :SALARY_DTL.SD_MOBILE_BILL:=R.EMP_MOBILE_BILL;     
          IF NVL(:SM_BONUS_MONTH,0) =1 THEN
               :SALARY_DTL.SD_FES_BONUS:=R.EMP_FES_BONUS;     
          ELSE
               :SALARY_DTL.SD_FES_BONUS:=NULL;
          END IF;
          NEXT_RECORD;     
         END LOOP;
         PREVIOUS_RECORD;
         CLOSE C;
    END;Hope this helps..

  • To_date function in cursor in oracle 8i

    Please tell me how to use to_date in cursor in oracle 8i. when i m using to_date in where clause in cursor it's giving error to_date function is out of scope.

    CURSOR C1 IS
    SELECT A.XO_NO,to_char(A.XO_DATE,'dd-mm-yyyy') XO_DATE,A.TO_CITY,A.FILE_CODE F_CODE,A.ARR_DATE,A.DEP_DATE,A.VCH_TYPE_CODE,
    A.VCH_NO,A.REMARKS,A.AMOUNT,A.COMP_CODE,to_char(A.SERVICE_DATE,'dd-mm-yyyy')SERVICE_DATE,
    B.AGENT_CODE,B.ROOM_TYP_CODE,
    (B.NO_OF_SINGLE+B.NO_OF_DOUBLE*2+B.NO_OF_EX_BED+B.NO_OF_TWIN*2) NO_OF_PAX,
    B.PER_SR SNGL_BED,B.PER_DR DOUBLE_BED,B.PER_EB TWIN,B.PER_DR EXTRA_BED,B.MEAL_PLAN,
    B.EXCH_RATE,A.FILE_CODE,C.COMP_NAME
    FROM XOS_MS A,QUOT_HOTEL_DS B,AC_COMPANY_MS C
    WHERE A.COMP_CODE=B.COMP_CODE
    AND A.XO_NO=B.XO_NO
              AND A.COMP_CODE=C.COMP_CODE
    AND TRUNC(A.XO_DATE)=TO_DATE('21/03/2005','DD/MM/YYYY');

  • Using Implicit REF Cursor in Oracle DB 12c

    For those interested in using ODP.NET implicit REF Cursors in Oracle DB 12c, the syntax is different from what was available in Oracle 11g. Here's a 12c-specific example:
    =======================
    Create or Replace PROCEDURE GetEmpAndDept
    AS
    EMPS  sys_refcursor;
    DEPTS  sys_refcursor;
    BEGIN
      OPEN EMPS for SELECT empno, ename from emp;
      dbms_sql.return_result(EMPS);
      OPEN DEPTS for SELECT deptno, dname from dept;
      dbms_sql.return_result(DEPTS);
    END;
    =======================
    // C#
    OracleConnection conn = new OracleConnection("User Id=scott; Password=tiger);
      conn.Open(); // Open the connection to the database
    // Create the command object for executing cmdTxt
      OracleCommand cmd = new OracleCommand("GetEmpAndDept", conn);
      cmd.CommandType = CommandType.StoredProcedure;
      OracleDataReader rdr = cmd.ExecuteReader();
      while(rdr.Read())
         Console.WriteLine("{0}\t{1}", rdr.GetInt32(0), rdr.GetString(1) );
      rdr.NextResult();
       while(rdr.Read())
           Console.WriteLine("{0}\t{1}", rdr.GetInt32(0), rdr.GetString(1) );

    i am using Oracle.ManagedDataAccess.dll v4.121.1.0
    Oracle Data Base 12c
    Visual Studio 2012 .net framework 4
    But if I use Unmanaged Dll I get implicit results in my .net application.

  • "fast cursor " in oracle

    Hi
    is there any concept "fast cursor " in oracle.Some one ask me this question.please help me.

    No, seriously, what is a "fast cursor" supposed to be? Possibly a close relative of a Better Performance using Fast Delete instead of Bulk Delete or Normal Delet? (One hopes not, of course.)

  • Scrollable cursors in oracle 8.1.7

    We are devloping application which is using VB as a front-end and SQL Server 2000 & Oracle 8.1.7 as back-end. I have created the procedure in SQL Server 2000 in which we have made an extensive use of scrollable cursors. But now i want to create such procedure in oracle 8.1.7, But i am not getting any help regarding scrollable cursors in oracle 8.1.7. So can anyone tell me is there any scrollable attribute defined in oracle 8.1.7 so that the previous or next record can be retreived.
    Thanks in Advance !

    For further reading:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1180618018840#3260280102622
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064#6969336986834
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:311216724461#31102007054659

  • Implicit PL/SQL cursors remain open, causing ORA-01000 (Client 9.2.0.1)

    Hello,
    since migrating our system from Oracle Client 9.0.X to 9.2.0.1 (Windows XP), i am encountering troubles when calling a stored procedure from a Cobol-Program:
    after a while i run into a 'Maximum open cursors exceeded'-message (ORA-01000)
    The stored procedure returns a cursor (ref_cursor)
    When Executing the stored procedure, there are actually 2 cursors involved, in fact the stored PL/SQL procedure implicitely opens a child-cursor when doing a select within the PL/SQL.
    After fetching the result and closing the cursor in my cobol-program, it correctly closes the cursor associated with the stored-procedure, but it does not close the cursor that was implicitely opened by oracle.
    After a while i am running into a Maximum open cursors message, because those cursors have not properly been closed.
    Here's a simple PL/SQL package that illustrates the problem:
    create or replace package scott.SCOTTS_PACKAGE is
    type ref_cursor IS REF CURSOR;
    function GET_EMP(EMP_IN CHAR) return ref_cursor;
    end SCOTTS_PACKAGE;
    create or replace package body scott.SCOTTS_PACKAGE is
    -- Function and procedure implementations
    function GET_EMP(EMP_IN CHAR) return ref_cursor is
    MyCurs ref_cursor;
    begin
    OPEN MyCurs FOR
    SELECT EMPNO ,
    ENAME ,
    JOB
    FROM SCOTT.EMP
    WHERE ENAME = EMP_IN;
    return(MyCurs);
    end;
    end SCOTTS_PACKAGE;
    Here are some exerpts from my cobol program:
    (The program iterates 100x through the section that executes the PL/SQL. After each iteration an additional open cursor remains in the database)
    003800 EXEC SQL BEGIN DECLARE SECTION END-EXEC.
    003900*
    004000 01 SQL-USERNAME PIC X(16) VARYING.
    004100 01 SQL-PASSWD PIC X(16) VARYING.
    004200 01 SQL-DBNAME PIC X(64) VARYING.
    004300 01 ORACLE.
    004700 02 ORA-CUR-EMP SQL-CURSOR.
    01 EMPREC.
    02 EMPREC-EMPNO PIC X(4).
    02 EMPREC-ENAME PIC X(10).
    02 EMPREC-JOB PIC X(9).
    005400 EXEC SQL END DECLARE SECTION END-EXEC.
    018400 PROCEDURE DIVISION.
    CONTINUE.
    018700 EXEC SQL
    018800 WHENEVER SQLERROR DO PERFORM SQL-ERROR
    018900 END-EXEC.
    019000*
    CONTINUE.
    019100 EXEC SQL
    019200 WHENEVER NOT FOUND DO PERFORM SQL-NOT-FOUND
    019300 END-EXEC.
    022400 EXEC SQL
    022500 ALLOCATE :ORA-CUR-EMP
    022600 END-EXEC
    PERFORM VARYING I FROM 1 BY 1 UNTIL I > 100
    ACCEPT DUMMY FROM TER
    IF DUMMY = "E"
    MOVE 100 TO I
    END-IF
    PERFORM GET-EMP
    ADD 1 TO I
    END-PERFORM
    119300 GET-EMP SECTION.
    119400************************
    119500 GAM0.
    MOVE SPACES TO EMPREC-EMPNO EMPREC-JOB
    MOVE "SMITH" TO EMPREC-ENAME
    120200 EXEC SQL AT SSSI EXECUTE
    120300 BEGIN
    120400 :ORA-CUR-EMP:=
    120500 SCOTT.SCOTTS_PACKAGE.GET_EMP(:EMPREC-ENAME );
    120900
    END;
    121000 END-EXEC
    121200 IF DB-ERR-CODE NOT = HIGH-VALUE
    121300 DISPLAY "CCSIFSO:GET-AUTRE-MATR:APPEL PERS... OK"
    121400 EXEC SQL
    121500 FETCH :ORA-CUR-EMP
    121600 INTO
    121700 :EMPREC-EMPNO,
    121800 :EMPREC-ENAME,
    121900 :EMPREC-JOB
    122400 END-EXEC
    122500 END-IF
    122600*
    122700 IF DB-ERR-CODE NOT = HIGH-VALUE
    122800 DISPLAY "CCSIFSO:GET-AUTRE-MATR:APPEL FETCH.. OK"
    123000 ELSE
    123100 MOVE LOW-VALUE TO DB-ERR-CODE
    123200 END-IF
    123300 EXEC SQL
    123400 CLOSE :ORA-CUR-EMP
    123500 END-EXEC
    123600 GA-EX.
    123700 EXIT.
    124000 SQL-NOT-FOUND SECTION.
    124100*----------------------
    124200 NF0.
    124300 DISPLAY "CCSIFSO:SQL-NOT-FOUND SECTION."
    124400 MOVE HIGH-VALUE TO DB-ERR-CODE.
    124500 NF-EX.
    124600 EXIT.
    124700*
    124800 SQL-ERROR SECTION.
    124900*-----------------
    125000 ER0.
    125200 EXEC SQL
    125300 WHENEVER SQLERROR CONTINUE
    125400 END-EXEC
    125700 MOVE HIGH-VALUE TO DB-ERR-CODE
    125800*
    126100 DISPLAY "ORACLE ERROR DETECTED: " SQLCODE UPON TER
    126200 DISPLAY SQLERRMC UPON TER
    126300*
    126400 EXEC SQL AT SSSI
    126500 ROLLBACK WORK
    126600 RELEASE
    126700 END-EXEC
    126800 DISPLAY "----------------------------" UPON TER
    126900 DISPLAY " ! ROLLBACK ET DISCONNECT ! " UPON TER
    127000 DISPLAY "----------------------------" UPON TER
    127200 CALL "PPTERMJ".
    127400 ER-EX.
    127500 EXIT.
    Finally here's an exerpt from V$OPEN_CURSOR, after a few iterations:
    1 begin :b1 := SCOTT . SCOTTS_PACKAGE . GET_EMP (:b2 ) ; END ;
    2 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    3 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    4 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    5 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    6 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    7 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    8 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    9 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    10 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    11 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    As you see, there is only 1 cursor starting with 'begin ... '
    but there are 10 implicit cursors 'SELECT EMPNO, ... ' that have not been properly closed, nor reused by ORACLE.
    In our old configuration (ORACLE CLient 9.0.X), you would only see:
    1 begin :b1 := SCOTT . SCOTTS_PACKAGE . GET_EMP (:b2 ) ; END ;
    2 SELECT EMPNO , ENAME , JOB FROM EMP WHERE ENAME = :B1
    meaning all the other cursors have properly been closed.
    As a conclusion: the program correctly closes the implicit cursors when using a 9.0 Client, wheras the implicit cursors remain open on Client 9.2.0.1 (Windows XP)
    The underlying database can be either 8.i or 9, the problem remains the same.
    Finally here's a small Delphi code, using ODAC-components, that somewhat illustrates the same problem:
    procedure TForm1.ExecProcClick(Sender: TObject);
    var I: INTEGER ;
    begin
    FOR I := 1 TO 5 DO
    BEGIN
    SP1.StoredProcName:='SCOTT.SCOTTS_PACKAGE.GET_EMP';
    SP1.Prepare;
    SP1.ParamByName('EMP_IN').AsString := 'SMITH';
    SP1.ExecProc;
    SP1.Next;
    SP1.Close;
    SP1.UnPrepare;
    END;
    end;
    After each call to 'PREPARE', an additional implicit cursor remains open on the database. (using Oracle Client 9.2.0.1)
    On our old system (Oracle Client 9.0 or 8.X), the same program would not generate accumulating open cursors on the database
    Any suggestions would be welcome,
    Claude

    Cobol.. been many years since I last even saw some Cobol source code. Invokes all kinds of memories. :-)
    Since you found the patch, the advice is superfluous, but works. Close the cursor at the PL/SQL side, e.g.
    create or replace procedure CloseRefCursor( cRefCursor TYPELIB.TRefCursor ) is
    begin
      close cRefCursor;
    exception when OTHERS then
      -- if the cursor is already gone, not a problem
      NULL;
    end;In Delphi for example, one can subclass the class used for ref cursor calls and add a call to the above PL/SQL proc in the destructor. Or add create a standard Cobol close ref cursor section that does similar.

  • How to open a Ref cursor in Oracle Reports

    I have a stored procedure that returns a ref cursor as an output parameter. I want to call this stored procedure in Oracle Reports After Form trigger. I am having trouble with the syntax of the output parameter. Event_record is the name of the cursor.
    After Form Trigger
    pkg_DEAL_WHITESHEET_CONCERTS.prc_Event_Information(:p_field_6,event_record);
    Error: Event_record must be declared

    Re-Write the procedure as Package Spec and Body. Declare the REFCursor in the Package Spec. Probably that helps.

  • Maximum Open Cursors Exceeded - Oracle & Java

    I am using NetBeans ( Forte 5) for developing an application with Oracle Database. My application makes use of executeUpdate, executeQuery statements inorder to access Database.
    After few insertions and deletions of data through the host language( Java), my application stops working. It gives out the error.
    java.sql.SQLException: ORA-01000: maximum open cursors exceeded[/b
    Is this the problem with Forte or Oracle. I am using Oracle in a network in which i have got a tablespace in the Database server.
    How to tackle this problem.

    I am using 3 methods preparedStatements
    1. execute - returns boolean
    2. executeQuery - returns ResultSet
    3. executeUpdate - returns int
    I am closing the ResultSet object returned by executeQuery using
    close() method.
    Is this the correct way to close the open cursor.
    I access the table attributes using a rs.getString(colNum) and
    rs.getInt(colNum)
    Even then i am getting the maximum open cursors exceeded message.
    Will Oracle open a cursor for execute and executeUpdate which is not returning a ResultSet object .
    If Oracle opens a cursor for these two methods, how should i close the open cursor.

  • How to populate data into a tabular datablock from a cursor in oracle forms

    Hello experts,
                  I am new in oracle forms.I am using Oracle forms 11g with weblogic server 10.3.5 at windows 7.My issue is that I am trying to populate data from a cursor into a tabular datablock(record number property is set to 5).I am using a button press trigger with code as:
    declare
        cursor c3 is  select empno,ename from emp;
    begin
        go_block('C');
        first_record;
        loop
        open c3;
        Fetch C3 into :c.t1,
    :c.t2;
    Exit when :system.last_record = 'TRUE';
    next_record;
    Close C3;
        End loop;
        end;
    Everything is OK here except,I have 5 record rows in C datablock but only first record is fetched into datablock.I want all records are fetched into data block
    Thank you
    regards
    aaditya

    Yes
    when i m using below query,so binary data display not display actual format
    select UTL_RAW.CAST_TO_VARCHAR2 (DBMS_LOB.SUBSTR(SOAPRTFDESC,10,1)) from soaptxsection

  • Invalid cursor in Oracle 9i (but works on 11g)

    Hi,
    I have the function:
    function get_capat_transa(p1 sys_refcursor, p2 number) return varchar2 is
      cod varchar2(40);
    begin
      for i in 1..p2 loop
        fetch p1 into cod;
      end loop;
      return cod;
    end;Ok, when i call this function in 11g like:
    select get_capat_transa( osapi_ni.getCapatTransa('0373',100, 23453425), 1 ) cod
    from dual
    The first parameter supplied is osapi_ni.getCapatTransa('0373',100, 23453425), another function within a package, which returns a ref_cursor.
    This works with no errors in Oracle 11g.
    The same select written in Oracle 9i generates the error:
    ORA-01001: invalid cursor
    I pressed Yes to view the stack error and i got that the error raises from the line 'fetch p1 into cod'.
    Any workaround for this, to work in 9i also?
    Thanks!
    Edited by: Roger22 on 18.08.2011 09:02
    Edited by: Roger22 on 18.08.2011 09:03

    Hi, It did not helped me..
    More simply (so a simplest example) - you can try in 9i:
    create or replace function getCapatTransa2 return sys_Refcursor is
       tmp sys_Refcursor;
       error varchar2(1500);
    begin
        open tmp for select 'x' from dual;
        return tmp;
    end getCapatTransa2;then
    create or replace function get_capat_transa(p1 sys_refcursor, p2 number) return varchar2 is
      cod varchar2(40);
    begin
      for i in 1..p2 loop
    --    if p1%isopen then
          --raise_application_error (-20667, cod);
          fetch p1 into cod;
      end loop;
      return cod;
    end;and finally:
    select get_capat_transa(getCapatTransa2, 1 ) cod
      from dualWhy in 9i returns invalid cursor and in 11 returns 'x' ? Seems like in 9i the cursor p1 is not open, but why? i can't explain..
    Edited by: Roger22 on 18.08.2011 10:43

  • How can i increase sga size in oracle 10g

    Hello friends
    how can i increase my sga size in oracle 10g
    Regards
    Vicky
    Edited by: Vignesh Chinnasamy on 31-Jul-2012 02:28

    HI
    **SQL> Show parameter sga ;**
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     FALSE
    sga_max_size                         big integer 2G
    sga_target                           big integer 2G
    **SQL> show parameter memory;**
    NAME                                 TYPE        VALUE
    hi_shared_memory_address             integer     0
    shared_memory_address                integer     0
    **[root@mte ~]# ulimit -a**
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 1024
    max locked memory       (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 278528
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    *[root@mte ~]#*

  • Error in Cursors in Oracle 10g

    We have a VB program that is running a procedure with a cursor like this:
    cursor cleo is select * from tabla1 where campo1='valor1';
    leer cleo%rowtype;
    begin
    open cleo;
    loop
    fetch cleo into leer;
    exit when cleo%notfound;
    end loop;
    close cleo;
    end
    Then return rows that not are part of the set given by the select statement.
    The problem is given randomly when running the VB program, instead if run the same statement in sqlplus it works fine.
    The program works fine against an Oracle 8 database, the error appears against an Oracle 10g database
    null

    the code to execute is:
    create or replace procedure cpc_jz_aux (dirname varchar2, plan varchar2, error out varchar2) is
    file_write sys.utl_file.file_type;
    cursor cleo is select *
    from oper.plan_hidro_et_per_cpcs
    where id_plan = plan
    and id_etapa = 1 order by id_hidro,id_per;
    leer cleo%rowtype;
    BEGIN
    error:=NULL;
    if sys.utl_file.is_open(file_write) then
    sys.utl_file.fclose(file_write);
    end if;
    file_write := sys.utl_file.fopen(dirname,'cpc_jt3.dat','w');
         open cleo;
         loop
              fetch cleo into leer;
              exit when cleo%notfound;
              sys.utl_file.put_line(file_write,leer.id_hidro||','||leer.id_per||','||
                   nvl(leer.ymin,0)||','||nvl(leer.ymax,0)||','||nvl(leer.zmin,0)||
                        ','||nvl(leer.zmax,0));
         end loop;
         close cleo;
         sys.utl_file.fclose(file_write);
    exception
    when others then
    dbms_output.put_line('error:'||sqlcode||' '||sqlerrm);
    error := sqlerrm;
    if sys.utl_file.is_open(file_write) then
    sys.utl_file.fclose(file_write);
    end if;
    raise;
    end cpc_jz_aux;
    Message was edited by:
    jpastro

Maybe you are looking for

  • When I download itunes, it's a .exe file but I have a mac.

    Why is this happening? Also, when I go to any website on Google Chrome, it says the "certificate" is invalid. Help anyone?

  • How do i transfer music from my pc to my mac?

    How do I transfer music from my pc to my mac book pro?

  • Running Background  java program

    Hi Everybody, I have written a client server application in java where in the client interacts with the user for some set of steps after which it calls the server method and waits for the response. During this i want the application to run in the bac

  • Changing sort order on Netware mapped drive

    We have a problem on our Netware drives. Changing the sort order (by date) more than two times makes the actual explorer window almost unusable. The gray progress bar within the adress field takes hours to complete the command. This happens only on n

  • InDesign CS4 and PhotoShop CS4 Integration issue.

    When working in inDesign CS4 Mac, I often click on a image to edit it in photoshop CS4 via the edit button in the InDesign links pallet That brings up the file in PhotoShop so that I can make my adjustments. When trying to save the photo in Photoshop