Cursor in ORACLE

Hi,
Could anyone help me with this code.
Im getting an error "no data found" and i cant figure out what wrong in the code
declare cursor c1 is
select * from getdata_table;
begin
for r_c1 in c1 loop
SELECT B.f_name,
B.l_name
FROM employee A,
company B
WHERE A.emp_num = r_c1.EMP_NUM
AND A.POSITION = B.POSITION;
dbms_output.put_line(f_name|| l_name || r_c1.EMP_NUM);
end loop;
end;
Thanks!!!!

- you do not need open cursor or close cursor statements in a for rec in cursor loop statement.
- just eliminate the space in your query.
- also make sure you have records corresponding to this query in getdata_table. Use some specific data value to run the query to ensure it.
declare cursor c1 is
select * from getdata_table;
begin
for r_c1 in c1 loop
SELECT B.f_name,B.l_name
FROM   employee A,company B
WHERE  A.emp_num = r_c1.EMP_NUM
AND    A.POSITION = B.POSITION;
dbms_output.put_line(f_name|| l_name || r_c1.EMP_NUM);
end loop;
end;

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.

  • 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

  • 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

  • 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

  • Using plsql table and ref cursor in oracle forms 10g

    Hi all,
    Can anyone give me an example of a scenario where we need to create a form manually based on a database stored procedures.
    And in that procedure i have created a pl/sql table and a ref cursor in data base level.
    CREATE OR REPLACE PACKAGE SCOTT.BONUS_PKG IS TYPE bonus_rec
    IS RECORD(
    empno     bonus_EMP.empno%TYPE,
    ename     bonus_EMP.ename%TYPE,
    job     bonus_EMP.job%TYPE,
    sal     bonus_EMP.sal%TYPE,
    comm     bonus_EMP.comm%TYPE);
    TYPE b_cursor IS REF CURSOR RETURN bonus_rec;
    TYPE bontab IS TABLE OF bonus_rec INDEX BY BINARY_INTEGER;
    PROCEDURE bonus_refcur(bonus_data IN OUT b_cursor);
    PROCEDURE bonus_query(bonus_data IN OUT bontab);
    END bonus_pkg;
    CREATE OR REPLACE PACKAGE BODY SCOTT.BONUS_PKG IS
    PROCEDURE bonus_query(bonus_data IN OUT bontab) IS
    ii NUMBER;
    CURSOR bonselect IS
    SELECT empno, ename, job, sal, comm FROM bonus_EMP ORDER BY empno;
    BEGIN
    OPEN bonselect;
    ii := 1;
    LOOP
    FETCH bonselect INTO
    bonus_data( ii ).empno,
    bonus_data( ii ).ename,
    bonus_data( ii ).job,
    bonus_data( ii ).sal,
    bonus_data( ii ).comm;
    EXIT WHEN bonselect%NOTFOUND;
    ii := ii + 1;
    END LOOP;
    END bonus_query;
    PROCEDURE bonus_refcur(bonus_data IN OUT b_cursor) IS
    BEGIN
    OPEN bonus_data FOR SELECT empno, ename, job, sal, comm FROM bonus_EMP ORDER BY empno;
    END bonus_refcur;
    END bonus_pkg;
    i want to populate the data in forms manually not using forms data block wizard and programmatically.
    please reply...

    Can anyone give me an example of a scenario where we need to create a form manually based on a database stored procedures.Typically, you would use a procedure based block when you have a collection of data from multiple tables presented in a Form and your user needs to be able to update the information displayed.
    From your code example, it looks like you are using Oracle Support document "Basing a Block on a Stored Procedure - Sample Code [ID 66887.1]". If this is the case, keep following the document - it walks you through all of the steps. There is no need to Manually configure things that the Data Block Wizard will perform for you!
    i want to populate the data in forms manually not using forms data block wizard and programmatically. Why? Let the Data Block Wizard take care of configuring your block based on a procedure for you. There is no need to manually loop through the data! I've actually done what you are attempting and it was more work than was needed. Let Forms do the work for you. :)
    If you absolutely must do things manually, I recommend you use the PROCEDURE bonus_query(bonus_data IN OUT bontab) instead of the bonus_refcur(bonus_data IN OUT b_cursor) . Then, in your code create a variable of type BONTAB and then call the bonus_query procedure. Then it is a simple case of looping through the table of records returned by the bonus_query procedure. For example:
    DECLARE
       t_bonus    bonus_pkb.bontab;
    BEGIN
       bonus_pkg.bonus_query(t_bonus);
       FOR i in 1 .. t_bonus.count LOOP
          :YOUR_BLOCK.EMPLOYEE_NUMBER := t_bonus(i).empno;
          :YOUR_BLOCK.EMPLOYEE_NAME := t_bonus(i).ename;
          :YOUR_BLOCK.EMPLOYEE_JOB := t_bonus(i).job;
          :YOUR_BLOCK.EMPLOYEE_SALARY := t_bonus(i).sal;
          :YOUR_BLOCK.EMPLOYEE_COMMISSION := t_bonus(i).comm;
       END LOOP;
    END;This code sample demonstrates the basics, but as it is sample code - you will have to adapt it to your situation.
    Also, I strongly recommend you look at the article InoL listed. This is a very comprehensive discussion on REF CURSORs. If you are set on using a procedure based data source - it is more efficient to pass the table of records back to your form than it is to pass a ref cursor. Using a ref cursor, you might as well just using a standard named cursor and loop through your named cursor. The effect is the same (one row returned at a time creating lots of network traffic). Using the table of records is more efficient because the entire data set is returned so network traffic is reduced.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Cursors in Oracle 10g XE stored procedures

    I want to use a cursor in a stored procedure. I saw many examples on the net but none of them seem to work in Oracle 10g Express Edition.
    I am new to Oracle and any solution relevant to Oracle 10g XE is highly appreciated.
    Yosief Kesete

    Dear user!
    Simple error. Try that:
    CREATE OR REPLACE PROCEDURE "employeesgetlist
      p_FIRST_NAME IN VARCHAR2,
      returnValue OUT SYS_REFCURSOR
    IS
      p_EMPLOYEE_ID NUMBER;
      CURSOR C1 IS
      SELECT employee_id
      FROM employees
      WHERE first_name = p_FIRST_NAME;
    BEGIN
      BEGIN
        -- OPEN A PREVIOUSLY DECLARED CURSOR
        OPEN C1;
        LOOP
          FETCH C1 INTO p_EMPLOYEE_ID;
          EXIT WHEN C1%NOTFOUND;
        END LOOP;
         -- CLOSE THE CURSOR
        CLOSE C1;
      END;
      OPEN returnValue FOR
      SELECT * FROM employees
      WHERE employee_id = p_EMPLOYEE_ID;
    END;
    {code}
    Yours sincerely
    Florian W.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Open cursor query - oracle 10g

    Could anyone tell me which is the right query for fetching open cursor:
    1.
    select max(a.value) as highest_open_cur,s.sid, s.username, oc.sql_text, s.logon_time, s.status, s.machine
    from v$sesstat a, v$statname b, v$parameter p, v$session s, v$open_cursor oc
    where a.statistic# = b.statistic#
    and b.name = 'opened cursors current'
    and p.name= 'open_cursors'
    and username in ('USER_ID')
    and s.sid = a.sid
    -- and s.status <> 'KILLED'
    and oc.sid = s.sid
    group by s.sid,s.username, oc.sql_text, s.logon_time, s.status, s.machine
    order by s.logon_time desc
    2.
    SELECT user_name,sid,sql_text,count(1) total,sysdate snap_time
    FROM v$open_cursor
    WHERE user_name IN ('USER_ID')
    GROUP BY user_name,sid,sql_text
    HAVING count(1)>0;
    The issue is inthe secind query we have had hardly any open cursors and from the first query we are getting quiet a lot.
    Would like someone to explain me the the interpretation of both the queries.
    Does Oracle 10g has a different interpretation of these tables.
    How should we be reading the open cursors? and
    Does anyone feel there is a better way to check for open cursors ?

    ...etc...
    How should we be reading the open cursors? and
    Does anyone feel there is a better way to check for
    open cursors ?Forget cursors, if your purpose is to do some kind of research for performance tuning, just generate either the Enterprise Manager ASH or ADDM reports.

  • 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!

Maybe you are looking for

  • Last purchase order and goods receipt for material

    Hello to everyone, is there any standard report where I can see the last purchase order and goods receipt for a material? Regards

  • Can you change rollover text in the same slice for different triggers?

    Hi, I haven't used Fireworks since version 3, which was about 6 years ago, when I dabbled in web development.  My past has come back to haunt me, and I need to make a fairly simple website pretty quickly for my boss.  I've got myself CS4, and now tha

  • Multiple Alarms for 1 Event

    Keep getting multiple alarms (usually 3) popping up for each event in ical. I go into the event and edit it down to 1 alarm but that is not fixing problem. I just updated to 10.5.5 and it is still happening. Any suggestions?

  • I started setting up a web page with iWeb. Auto play box is checked, but music will not play when page is opened.

    I started setting up a web page with IWeb. Several proplems so far: 1) Auto Play box checked for music, but music does not start when page is opened. 2) Can't get Quicktime "start/stop" slide to start and finish a section within a long piece of music

  • Error ora-02070

    Hi to all, I have created a view in oracle 10g using an MS SQL 2005 table, like this: CREATE OR REPLACE VIEW EXTRACT_VIEW (D_FLD1, D_NOTES, D_CODE, D_DATE, D_FLAG) AS SELECT D_FLD1, D_NOTES, LPAD(TO_CHAR(D_CODE), 6, '0'), SUBSTR(D_DATE, 7,2) || '/' |