Ref Cursors in a stored Procedure

Can some help me with an answer to the below question.
How many ref cursors can be declared in a stored procedure in oracle?
Thanks

user533016 wrote:
You are right. Keeping so many cursors open is not good at all. But i was doing this to see where it breaks and is there something that definitely controls the number of refcursors in allowed a PL/SQL block.As Karthick already mentioned you have the OPEN_CURSORS parameter which defines how many open cursors you may have in any one session.
However, this doesn't just apply to Ref Cursors. If you open explicitly defined cursors then this will also count towards that, as well as issuing select statements as they are implicit cursors... e.g.
declare
  cursor c1 is
    select * from emp;
  cursor c2 is
    select * from dept;
  v_c1 c1%ROWTYPE;
  v_c2 c2%ROWTYPE;
  v_cnt number;
begin
  open c1; -- now we have 1 open cursors
  loop
    fetch c1 into v_c1;
    exit when c1%notfound;
    open c2;  -- now we have 2 open cursors
    loop
      fetch c2 into v_c2;
      exit when c2%notfound;
      select count(*)  -- this counts as opening cursor number 3.
      into v_cnt
      from payroll;
      -- after the select statement the implicit cursor is automatically closed, so now we have 2 open again
    end loop;
    close c2; -- after this we just have 1 more open
  end loop;
  close c1; -- after this we have no open cursors
end;

Similar Messages

  • How to get an UPDATABLE REF CURSOR from the STORED PROCEDURE

    using C# with
    ORACLE OLE DB version: 9.0.0.1
    ADO version: 2.7
    I returns a REF CURSOR from a stored procedure seems like:
    type TCursor is ref cursor;
    procedure test_out_cursor(p_Dummy in varchar, p_Cur out TCursor) is
    begin
         open p_Cur for select * from DUAL;
    end;
    I create an ADO Command object and set
    cmd.Properties["IRowsetChange"].Value = true;
    cmd.Properties["Updatability"].Value = 7;
    cmd.Properties["PLSQLRSet"].Value = 1;
    cmd.CommandText = "{CALL OXSYS.TEST.TEST_OUT_CURSOR(?)}";
    and I use a Recordset object to open it:
    rs.Open(cmd, Missing.Value,
    ADODB.CursorTypeEnum.adOpenStatic,
    ADODB.LockTypeEnum.adLockBatchOptimistic,
    (int) ADODB.CommandTypeEnum.adCmdText +
    (int) ADODB.ExecuteOptionEnum.adOptionUnspecified);
    The rs can be opened but can NOT be updated!
    I saved the recordset into a XML file and there's no
    rs:baseschema/rs:basetable/rs:basecolumn
    attributes for "s:AttributeType" element.
    Any one have idea about this?
    thanks very much

    It is not possible through ADO/OLEDB.
    Try ODP.NET currently in Beta, it is possible to update DataSet created with refcursors. You need to specify your custom SQL or SP to send update/insert/delete.
    As I remember there is a sample with ODP.NET Beta 1 just doing this.

  • Passing Ref Cursor to Oracle Stored Procedure Via C#

    Hi all,
    I am new to oracle and stuck with an issue. I have three insert stored procedures for three different tables. Two of them have multiple rows to be inserted, which is currently done via iterating through each row and insert to db in C# code. My requirement is to merge these three procedures in one and instead of iterating from C# code send table rows as (ref cursor or collection) to procedure and the procedure will handle the rest.
    I read that ref cursor only works if you're data is in database as it reference the memory but in my case data is build on client side.
    I am using Oracle 11i and ASP.Net 2.0
    Can any help me on this please?
    Edited by: 929463 on Apr 23, 2012 12:38 AM

    929463 wrote:
    I am new to oracle and stuck with an issue. I have three insert stored procedures for three different tables. Two of them have multiple rows to be inserted, which is currently done via iterating through each row and insert to db in C# code. My requirement is to merge these three procedures in one and instead of iterating from C# code send table rows as (ref cursor or collection) to procedure and the procedure will handle the rest.Why a single procedure? How is the procedure to determine the target table to insert the data into? And please - no dynamic SQL as that is 99% of the time wrong.
    A ref cursor is something that PL/SQL creates - with the purpose of passing the cursor handle to your code. This enables the actual SQL statement for that cursor to be moved from client code, into a PL/SQL stored proc. It abstracts the client from having to understand SQL, understand the data model and so on. All clients use the same PL/SQL proc and thus the same code for creating that cursor. Thus no issue of some clients getting it half right or half wrong and dealing with data inconsistencies between clients.
    The PL/SQL proc can be tuned and optimised, modified for catering for data model changes and so on. Without your client code having to be even recompiled as it is isolated against these server changes.
    For all other interaction (running PL/SQL code, doing insert/update/delete/etc SQL statements), you need to create the cursor yourself in your code.
    Also, the SQL engine only sees cursors. There are no differences between cursors. The client (e.g. PL/SQL) can call it a reference cursor, or an implicit cursor, or a DBMS_SQL cursor.. the SQL engine does not know that and does not care.
    A ref cursor is simply a special type of client interface to a SQL cursor, allowing PL/SQL to create that SQL cursor and then pass the handle of that SQL cursor to other code to consume that cursor.
    Okay, so if you want to insert data, you need in your code to create a cursor. This can be a SQL INSERT cursor - the actual insert statement. Or it can be a PL/SQL call - an anonymous PL/SQL code block that calls a stored proc that performs the insert (after applying validation and business logic).
    The cursor will have one or more bind variables. Your client will pass values for these variables and the server-side code (SQL or PL/SQL) will be executed using this as variable data.
    You can for example create a cursor as follows:
    begin
      DoFunkyInsert( :1, :2, :3 );
    end;
    {code}
    3 bind variables are expected. You can now in the client build an array for each of these variables, containing a 100 values each (total of a 100 rows to insert). Do a single execute of the cursor, and tell Oracle that the bind is actually a 100 element array.
    The complete array ships to Oracle - Oracle opens a loop and execute the cursor for each element in the array.
    This is called bulk binding.
    An alternative approach is to define the bind variable as a collection (a non-scalar value). And then code the PL/SQL procedure to open a loop and iterate through the collection/array, inserting a row per iteration.
    The binding itself is more complex as your code know needs to understand Oracle object types and be able to define an array/collection that is a valid Oracle non-scalar data type.
    The +Oracle Call Interface+ (OCI) is quite flexible in this regard. However, as you work via an abstraction layer (e.g. ADO, OleDB, ODBC, etc) your code is subject to whatever functionality this abstraction layer makes available to your code. And this is seldom includes all the power, functionality and flexibility of the (more complex) OCI itself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem passing REF CURSOR to JAVA STORED PROCEDURE

    Hi,
    I've written a small Java class with a static method and
    imported that into Oracle 8i. The method expects a
    java.sql.ResultSet object as parameter. According to the
    documentation of Oracle, a REF CURSOR (cursor variable) maps to
    java.sql.ResultSet in JDBC.
    The definition of the Java Stored Procedure was accepted without
    problems:
    CREATE OR REPLACE PROCEDURE RESULTSETPASSINGTESTPROC (row
    WASTypes.GenericCurType)
    as language java
    name 'sqlj.ResultSetPassingTest.testResultSetPassing
    (java.sql.ResultSet)';
    WASTypes is a package containing the definition of the generic
    cursor:
    CREATE OR REPLACE PACKAGE WASTYPES
    is
    TYPE GenericCurType IS REF CURSOR;
    END WASTypes;
    In a function I'm opening the cursor via
    'Open cursorVariable for sqlStatement';
    Then this cursor variable is passed to the java method and the
    error ORA-03113 is shown.
    I tried to solve the problem by changing the type of the
    parameter to oracle.sql.REF without success.
    Does anybody know what wents wrong?
    Thanks in advance.
    Jan

    Hi,
    I've written a small Java class with a static method and
    imported that into Oracle 8i. The method expects a
    java.sql.ResultSet object as parameter. According to the
    documentation of Oracle, a REF CURSOR (cursor variable) maps to
    java.sql.ResultSet in JDBC.
    The definition of the Java Stored Procedure was accepted without
    problems:
    CREATE OR REPLACE PROCEDURE RESULTSETPASSINGTESTPROC (row
    WASTypes.GenericCurType)
    as language java
    name 'sqlj.ResultSetPassingTest.testResultSetPassing
    (java.sql.ResultSet)';
    WASTypes is a package containing the definition of the generic
    cursor:
    CREATE OR REPLACE PACKAGE WASTYPES
    is
    TYPE GenericCurType IS REF CURSOR;
    END WASTypes;
    In a function I'm opening the cursor via
    'Open cursorVariable for sqlStatement';
    Then this cursor variable is passed to the java method and the
    error ORA-03113 is shown.
    I tried to solve the problem by changing the type of the
    parameter to oracle.sql.REF without success.
    Does anybody know what wents wrong?
    Thanks in advance.
    Jan

  • REF CURSOR RETURNED FROM STORED PROCEDURE OPENED WITH CURRENT_USER PRIVILEGES

    Hi.
    I was wondering if anyone knows when this bug will be fixed. The bug# is 899567 off of metalink.
    I am running into this problem as well, and we do not want to use OCI/SQLNet as the fix. We have an application with secure data concerns and only want to give access to stored procedures to an application user.
    Thanks,
    Brad

    I'm using version 8.1.6.0.0 on a W2K server.
    PS: a strange behaveour
    if i try to insert a row using the following anonymous pl/sql block
    begin
    insert into objects select 2, 'B', ref(c) from meta.classes c where id =1;
    end;
    i get the following error msg
    ERROR at line 1:
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-302: component 'OBJ_T' must be declared
    but if i use only the sql command from the sql plus prompt
    insert into objects select 2, 'B', ref(c) from meta.classes c where id =1;
    the row is inserted.
    OBJ_T is the object type(id number, label varchar2, class ref class_t),
    OBJECTS is a table of obj_t,
    CLASS_T is an object type(id number, label varchar2)
    CLASSES is a table of CLASS_T.
    null

  • Retrieving cursor from a stored procedure

    Hi,
    Is there any means to retrieve a cursor from a stored procedure using java.sql.* package, without using database specific type code like OracleTypes.CURSOR?
    Regards,
    Shalin.

    Hi,
    I had some across this problem some time ago. Although, there is no direct answer to this solution, there is a "kloog" that you can apply.
    Please note that the signature for registerOutParameter(int parameterIndex, int sqlType), and note that where ever sqlType is mentioned it is an int.
    Now JDBC is an interface and the implementation is given by Oracle. So to register an "out" parameter all you have to do is registerOutParameter(1, OracleTypes.CURSOR). It works!
    Or otherwise try and find out what the int value of CURSOR is and replace. This is because not all databases can support returning a "cursor" type, since ORACLE and few other databases have a concept of "STORED PROCEDURE" and PLSQL is specific to ORACLE.
    I hope this helps!
    Cheers,
    John.

  • More than 1 cursor in a stored procedure

    Is it possible to open more than 1 cursor in a stored procedure? I have 2 stored procedure which use the same 2 parameters, and figured I could probably combine the two. Thanks

    If you used the example provided by SBH more or less as it was posted, then both cursors were closed before they got to coldfusion. If you are passing them out of you procedures for processing by another piece of code you need to leave them open. More along the lines of:
    create procedure protest(p_empno number,
                             p_ename out varchar2,
                             p_sal out number,
                             p_dummy out varchar2) is
       cursor c1 is
          select ename,sal
          from employee
          where empid = p_empno;
       cursor c2 is
          select name
          from stname;
    begin
       open c1;
       open c2;
    end;Just make sure to close them in your calling code once you have finished with them.
    John

  • REF CURSOR from Java Stored Proc

    Does Oracle 8i/9i allow to return REF CURSROR from Java Stored Procedure?

    Sorry,
    No I don't think this type of Java->SQL mapping was ever fixed. I know it was discussed here on the OTN forums as far back as the 8i driver, but I don't think they have ever implemented this. Perhaps someone who has actually made it work will speak up.

  • Getting a ref cursor out of a procedure

    Hello,
    I am having some issues getting the ref cursor out of this procedure that returns a ref cursor when given inputs.
    I have included the code below and made bold the call to the package and procedure where the requested function lies. I put c2 in the first parameter because that is the out and is defined first in the procedure. Am I going about this the wrong way? I am mainly a .NET developer and am still learning the syntax of PL/SQL.
    Thanks!
    Jeffrey Kevin Pry
    DECLARE
    TYPE r_cursor IS REF CURSOR;
    c2 r_cursor;
    CURSOR c1
    IS
    SELECT *
    FROM ELEMENT E
    WHERE E.SUBTYPE_CD = 'PAT';
    BEGIN
    FOR ROW_ITEM IN c1
    LOOP
    PKG_DTEST.GET_CHILDREN(c2,ROW_ITEM.ELEMENT_ID,1);
    FOR ROW_ITEM2 in c2
    LOOP
    dbms_output.put_line(ROW_ITEM2.ELEMENT_ID);
    END LOOP;
    END LOOP;
    END;
    Edited by: jeffrey.pry on Jan 21, 2011 6:01 AM

    You should probably post the code of PKG_DTEST.GET_CHILDREN as well as the error you are getting. It's hard to troubleshoot without knowing all the parts and pieces.
    Additionally, I see that you are using a nested FOR loop to process your data. You should rethink this. The best way to process data in Oracle is to compact it all into a single SQL statement if possible. If you are having trouble doing this please post the following and we can help.
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Cast error message when discovering ref cursor parameter from stored proced

    We are today using Microsoft's Oracle provider with some code from the old Data Application Block (from MSDN) to discover parameters from the stored procedures. This code uses the OracleCommandBuilder.DeriveParameters to get the parameters from the stored procedure and command.Parameters.CopyTo copies the discovered parameters into the command object.
    If I test with a simple function returning a ref cursor I get one parameter with type refCursor and ParameterDirection.OutPut. This is working fine as long we where using Microsoft's Oracle provider. But using Oracle ODP .NET I get the following error message on datadapter.Fill (I fill a dataset with the result from the reference cursor)
    Unable to cast object of Type 'Oracle.DataAccess.Client.OracleDataReader' to type 'Oracle.DataAccess.Types.OracleRefCursor.
    If I create a ref parameter manualy like this:
    OracleParameter myrefCursor = new OracleParameter();
    myrefCursor .OracleDbType = OracleDbType.RefCursor;
    myrefCursor .ParameterName = "myParameterName";
    myrefCursor .Direction = ParameterDirection.ReturnValue;
    and add it to the command object this is working OK. So it seems to be a problem with discovering ref cursor parameters from the database, other parameter types is OK.. I have compared the properties of my manual ref cursor parameter with the one discovered from the stored procedure, but I cannot see any difference. (I see the Value property has some values for the discovered one, but I have set this to DBNull.Value without any result)
    Any ideas why I get this error code? Is there any other code blocks I can use to discover the parameters? We send in params object[] with the different values into the helper class and the value is added to the parameter. (Se I don't need to set the data type etc for each parameter, I just need to have the correct order of the parameters)

    For accuracy's sake, just wanted to let everyone know that this is actually a bug. The correct bug number is 8423178.
    Christian
    Mark_Williams wrote:
    Just to follow-up on this issue...
    The bug has been closed as "not a bug" as it seems undocumented behavior was relied upon for this to work in earlier releases.
    Note from the documentation on DeriveParameters:
    "The output values of derived parameters return as .NET Types by default. To obtain output parameters as provider types, the OracleDbType property of the parameter must be set explicitly by the application to override this default behavior. One quick way to do this is to set the OracleDbType to itself for all output parameters that should be returned as provider types." (emphasis added)
    The issue, as you might already know, is that there is no corresponding .NET Framework Type for an Oracle Ref Cursor and the type is, therefore, set to Object. So, explicitly setting the type to OracleDbType.RefCursor should work.
    Regards,
    Mark

  • How do I get the returned cursor from a stored procedure to an asp.

    Sorry if this topic has been answered before but I am new to Oracle and ASP. I have been asked to create some stored procedures and access the results from the ASP. I will be passing one variable in and could be getting upto 200 rows returned.
    I have no trouble with the stored procedure but have no clue how to retrieve the data returned by it.

    Assuming that the stored procedure has a single argument, an OUT cursor, you should be able to do
    SQLExecDirect
    {call <stored_proc>() }
    SQLFetch
    SQLGetData
    We'll handle all the 'magic' underneath.
    Justin Cave
    ODBC Development

  • Server Crashes when using Cursor Vars in Stored Procedure

    Can anyone make a suggestion
    We are experiencing a problem that causes our Weblogic Server to crash
    when a JDBC call is made to our Oracle database.
    Host Details
    Operating System: Solaris Version 8
    SunOS 5.8 Generic_108528-15 sun4u sparc SUNW,UltraAX-i2
    WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    JDBC Driver Weblogic JDriver for Oracle
    The jdbc command that causes the problem is similar the spcursor
    example code file:
    // Here we prepare a CallableStatement using a WebLogic extension
    // to JDBC that supports binding an Oracle cursor to an output
    // parameter. Register the output parameter type as OTHER . . .
    cstmt =
         (weblogic.jdbc.common.OracleCallableStatement)conn.prepareCall("BEGIN
    OPEN ? FOR select * from emp; END;");
    cstmt.registerOutParameter(1, java.sql.Types.OTHER);
    The crash happens when the re.next() method is invoked after the
    execute()
    This is the core dump message that is generated:
    An unexpected exception has been detected in native code outside the
    VM.
    Unexpected Signal : 11 occurred at PC=0xd339f37c
    Function name=kpcxk2u
    Library=/u01/app/oracle/product/8.1.7/lib/libclntsh.so.8.0
    Current Java thread:
    at weblogic.db.oci.OciCursor.arrayFetch(Native Method)
    at weblogic.db.oci.OciCursor.oci_arrayFetch(OciCursor.java:2002)
    at weblogic.jdbc.oci.ResultSet.next(ResultSet.java:759)
    at weblogic.jdbc.pool.ResultSet.next(ResultSet.java:180)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.next(ResultSetImpl.java:132)
    at weblogic.jdbc.rmi.internal.ResultSetImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Dynamic libraries:
    0x10000 /opt/bea/jdk131/jre/bin/../bin/sparc/native_threads/java
    0xff350000 /usr/lib/libthread.so.1
    0xff390000 /usr/lib/libdl.so.1
    0xff200000 /usr/lib/libc.so.1
    0xff330000 /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
    0xfe480000 /opt/bea/jdk131/jre/lib/sparc/hotspot/libjvm.so
    0xff2e0000 /usr/lib/libCrun.so.1
    0xff1e0000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff0d0000 /usr/lib/libm.so.1
    0xff310000 /usr/lib/libw.so.1
    0xff0b0000 /usr/lib/libmp.so.2
    0xff080000 /opt/bea/jdk131/jre/lib/sparc/native_threads/libhpi.so
    0xff050000 /opt/bea/jdk131/jre/lib/sparc/libverify.so
    0xfe440000 /opt/bea/jdk131/jre/lib/sparc/libjava.so
    0xff020000 /opt/bea/jdk131/jre/lib/sparc/libzip.so
    0xfe230000 /opt/bea/jdk131/jre/lib/sparc/libnet.so
    0xfe160000 /usr/lib/nss_files.so.1
    0xd3700000 /opt/bea/wlserver6.1/lib/solaris/oci817_8/libweblogicoci37.so
    0xd3000000 /u01/app/oracle/product/8.1.7/lib/libclntsh.so.8.0
    0xfd090000 /usr/lib/libC.so.5
    0xfd3b0000 /u01/app/oracle/product/8.1.7/lib/libwtc8.so
    0xfd070000 /usr/lib/libgen.so.1
    0xfd050000 /usr/lib/libsched.so.1
    0xfd020000 /usr/lib/libaio.so.1
    0xfafd0000 /opt/bea/wlserver6.1/lib/solaris/libmuxer.so
    Local Time = Thu Apr 3 10:39:37 2003
    Elapsed Time = 178
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.3.1-b24 mixed mode)
    # An error report file has been saved as hs_err_pid7599.log.
    # Please refer to the file for further information.
    Abort - core dumped
    TIA
    Tony

    Tony,
    "Tony Ross" <[email protected]> wrote in message
    news:[email protected]...
    Thanks Mitesh for your response.
    We have followed your advice on using the 901 driver and updating the
    config.xml file. Alas it has not stopped the Solaris WLS from
    crashing.Actually, Mitesh sugested you replacing weblogic driver
    with oracle one. As it follows from the stacktrace, it has
    not been done.
    I'd also recommend moving to oracle thin driver as it
    doesn't have native code thus is more stable.
    Regards,
    Slava Imeshev
    In addition to this we tried using WLS 6.1 SP2 on a Win2000 box
    (connecting to same database). We managed to crash this instance as
    well. The core dump is as follows:
    An unexpected exception has been detected in native code outside the
    VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at
    PC=0x6021bc08
    Function name=kpcxk2u
    Library=C:\Oracle\Ora81\BIN\oracommon8.dll
    Current Java thread:
    at weblogic.db.oci.OciCursor.arrayFetch(Native Method)
    - locked <2956f78> (a weblogic.db.oci.OciCursor)
    at weblogic.db.oci.OciCursor.oci_arrayFetch(OciCursor.java:2022)
    at weblogic.jdbc.oci.ResultSet.next(ResultSet.java:759)
    - locked <3423480> (a weblogic.db.oci.OciConnection)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.next(ResultSetImpl.java:133)
    at weblogic.jdbc.rmi.internal.ResultSetImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
    atweblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
    2)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Dynamic libraries:
    0x00400000 - 0x00405000 c:\bea\jdk131\bin\java.exe
    0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
    0x77DB0000 - 0x77E0D000 C:\WINNT\system32\ADVAPI32.dll
    0x77E80000 - 0x77F36000 C:\WINNT\system32\KERNEL32.DLL
    0x77D30000 - 0x77DA1000 C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
    0x6D420000 - 0x6D4EE000 c:\bea\jdk131\jre\bin\hotspot\jvm.dll
    0x77E10000 - 0x77E75000 C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
    0x77570000 - 0x775A0000 C:\WINNT\System32\WINMM.dll
    0x6D220000 - 0x6D227000 c:\bea\jdk131\jre\bin\hpi.dll
    0x6D3B0000 - 0x6D3BD000 c:\bea\jdk131\jre\bin\verify.dll
    0x6D250000 - 0x6D266000 c:\bea\jdk131\jre\bin\java.dll
    0x6D3C0000 - 0x6D3CD000 c:\bea\jdk131\jre\bin\zip.dll
    0x6D2A0000 - 0x6D2BB000 c:\bea\jdk131\jre\bin\jdwp.dll
    0x6D1D0000 - 0x6D1D5000 c:\bea\jdk131\bin\dt_socket.dll
    0x75030000 - 0x75043000 C:\WINNT\System32\ws2_32.dll
    0x75020000 - 0x75028000 C:\WINNT\System32\WS2HELP.DLL
    0x74FD0000 - 0x74FED000 C:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000 C:\WINNT\System32\wshtcpip.dll
    0x6D340000 - 0x6D348000 C:\bea\jdk131\jre\bin\net.dll
    0x75050000 - 0x75058000 C:\WINNT\System32\WSOCK32.dll
    0x782C0000 - 0x782CC000 C:\WINNT\System32\rnr20.dll
    0x77980000 - 0x779A4000 C:\WINNT\System32\DNSAPI.DLL
    0x77340000 - 0x77353000 C:\WINNT\System32\iphlpapi.dll
    0x77520000 - 0x77525000 C:\WINNT\System32\ICMP.DLL
    0x77320000 - 0x77337000 C:\WINNT\System32\MPRAPI.DLL
    0x75150000 - 0x75160000 C:\WINNT\System32\SAMLIB.DLL
    0x75170000 - 0x751BF000 C:\WINNT\System32\NETAPI32.DLL
    0x77BE0000 - 0x77BEF000 C:\WINNT\System32\SECUR32.DLL
    0x751C0000 - 0x751C6000 C:\WINNT\System32\NETRAP.DLL
    0x77950000 - 0x7797A000 C:\WINNT\system32\WLDAP32.DLL
    0x77A50000 - 0x77B45000 C:\WINNT\system32\OLE32.DLL
    0x779B0000 - 0x77A4B000 C:\WINNT\system32\OLEAUT32.DLL
    0x773B0000 - 0x773DE000 C:\WINNT\System32\ACTIVEDS.DLL
    0x77380000 - 0x773A2000 C:\WINNT\System32\ADSLDPC.DLL
    0x77830000 - 0x7783E000 C:\WINNT\System32\RTUTILS.DLL
    0x77880000 - 0x7790D000 C:\WINNT\System32\SETUPAPI.DLL
    0x77C10000 - 0x77C6E000 C:\WINNT\System32\USERENV.DLL
    0x774E0000 - 0x77512000 C:\WINNT\System32\RASAPI32.DLL
    0x774C0000 - 0x774D1000 C:\WINNT\System32\RASMAN.DLL
    0x77530000 - 0x77552000 C:\WINNT\System32\TAPI32.DLL
    0x71730000 - 0x717BA000 C:\WINNT\system32\COMCTL32.DLL
    0x70BD0000 - 0x70C20000 C:\WINNT\system32\SHLWAPI.DLL
    0x77360000 - 0x77379000 C:\WINNT\System32\DHCPCSVC.DLL
    0x777E0000 - 0x777E8000 C:\WINNT\System32\winrnr.dll
    0x777F0000 - 0x777F5000 C:\WINNT\System32\rasadhlp.dll
    0x10000000 - 0x10055000
    C:\bea\wlserver6.1\bin\oci901_8\weblogicoci37.dll
    0x0DE20000 - 0x0DE3A000 C:\Oracle\Ora81\BIN\OCI.dll
    0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll
    0x60400000 - 0x60502000 C:\Oracle\Ora81\BIN\OraClient8.Dll
    0x60600000 - 0x60682000 C:\Oracle\Ora81\BIN\oracore8.dll
    0x60800000 - 0x60848000 C:\Oracle\Ora81\BIN\oranls8.dll
    0x0DE40000 - 0x0DE46000 C:\Oracle\Ora81\BIN\oravsn8.dll
    0x60200000 - 0x60264000 C:\Oracle\Ora81\BIN\oracommon8.dll
    0x60000000 - 0x6011F000 C:\Oracle\Ora81\BIN\orageneric8.dll
    0x60350000 - 0x60356000 C:\Oracle\Ora81\BIN\orawtc8.dll
    0x60A00000 - 0x60A2B000 C:\Oracle\Ora81\BIN\oranl8.dll
    0x60B00000 - 0x60BAA000 C:\Oracle\Ora81\BIN\oran8.dll
    0x60E00000 - 0x60E10000 C:\Oracle\Ora81\BIN\orancrypt8.dll
    0x61100000 - 0x61137000 C:\Oracle\Ora81\BIN\oranro8.dll
    0x0DE50000 - 0x0DEAE000 C:\Oracle\Ora81\BIN\orannzsbb8.dll
    0x61500000 - 0x6150E000 C:\Oracle\Ora81\BIN\oranldap8.dll
    0x61700000 - 0x6171C000 C:\Oracle\Ora81\BIN\oraldapclnt8.dll
    0x61900000 - 0x61906000 C:\Oracle\Ora81\BIN\oranhost8.dll
    0x62100000 - 0x62106000 C:\Oracle\Ora81\BIN\oranoname8.dll
    0x0DEB0000 - 0x0DEB6000 C:\Oracle\Ora81\BIN\orancds8.dll
    0x62300000 - 0x62306000 C:\Oracle\Ora81\BIN\orantns8.dll
    0x62500000 - 0x62508000 C:\Oracle\Ora81\BIN\orannds8.dll
    0x0DEC0000 - 0x0DEDC000 C:\Oracle\Ora81\BIN\orannms8.dll
    0x62700000 - 0x62741000 C:\Oracle\Ora81\BIN\ORATRACE8.dll
    0x62900000 - 0x62B1B000 C:\Oracle\Ora81\BIN\orapls8.dll
    0x63100000 - 0x63108000 C:\Oracle\Ora81\BIN\oraslax8.dll
    0x63200000 - 0x63272000 C:\Oracle\Ora81\BIN\orasql8.dll
    0x64700000 - 0x6470C000 C:\Oracle\Ora81\bin\orantcp8.dll
    0x64500000 - 0x6450D000 C:\Oracle\Ora81\bin\orannts8.dll
    0x75500000 - 0x75504000 C:\WINNT\System32\security.dll
    0x782D0000 - 0x782EE000 C:\WINNT\system32\msv1_0.dll
    0x11260000 - 0x11265000 C:\bea\wlserver6.1\bin\wlntio.dll
    0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000 C:\WINNT\System32\PSAPI.DLL
    Local Time = Thu Apr 03 17:31:00 2003
    Elapsed Time = 327
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_01 interpreted mode)
    So now we have a situation where - we can crash either server with a
    call to a function. We can now run the spcursors.java example without
    problem. The procedure that does crash the WLS can be run successfully
    from within sqlplus (it involves multiple subqueries and outer joins).
    FYI - the cursors we are returning in the function are weak cursor
    types (TYPE ref_cursor IS REF CURSOR)
    Any other suggestions greatly welcomed.
    Tony
    Mitesh Patel <[email protected]> wrote in message
    news:<[email protected]>...
    Please do the following:
    Make sure you have login delay sec=1 for connection pool in config.xml
    Should have TestConnOnReserve=true
    and use 901 driver instead of 817 driver. Using suggested driver, stillyou can connect to
    your original database.
    Thanks,
    Mitesh
    Tony Ross wrote:
    Can anyone make a suggestion
    We are experiencing a problem that causes our Weblogic Server to crash
    when a JDBC call is made to our Oracle database.
    Host Details
    Operating System: Solaris Version 8
    SunOS 5.8 Generic_108528-15 sun4u sparc SUNW,UltraAX-i2
    WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    JDBC Driver Weblogic JDriver for Oracle
    The jdbc command that causes the problem is similar the spcursor
    example code file:
    // Here we prepare a CallableStatement using a WebLogic extension
    // to JDBC that supports binding an Oracle cursor to an output
    // parameter. Register the output parameter type as OTHER . . .
    cstmt =
    (weblogic.jdbc.common.OracleCallableStatement)conn.prepareCall("BEGIN
    OPEN ? FOR select * from emp; END;");
    cstmt.registerOutParameter(1, java.sql.Types.OTHER);
    The crash happens when the re.next() method is invoked after the
    execute()
    This is the core dump message that is generated:
    An unexpected exception has been detected in native code outside the
    VM.
    Unexpected Signal : 11 occurred at PC=0xd339f37c
    Function name=kpcxk2u
    Library=/u01/app/oracle/product/8.1.7/lib/libclntsh.so.8.0
    Current Java thread:
    at weblogic.db.oci.OciCursor.arrayFetch(Native Method)
    atweblogic.db.oci.OciCursor.oci_arrayFetch(OciCursor.java:2002)
    at weblogic.jdbc.oci.ResultSet.next(ResultSet.java:759)
    at weblogic.jdbc.pool.ResultSet.next(ResultSet.java:180)
    atweblogic.jdbc.rmi.internal.ResultSetImpl.next(ResultSetImpl.java:132)
    atweblogic.jdbc.rmi.internal.ResultSetImpl_WLSkel.invoke(Unknown
    Source)
    atweblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    atweblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:
    atweblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Dynamic libraries:
    0x10000/opt/bea/jdk131/jre/bin/../bin/sparc/native_threads/java
    0xff350000 /usr/lib/libthread.so.1
    0xff390000 /usr/lib/libdl.so.1
    0xff200000 /usr/lib/libc.so.1
    0xff330000 /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
    0xfe480000 /opt/bea/jdk131/jre/lib/sparc/hotspot/libjvm.so
    0xff2e0000 /usr/lib/libCrun.so.1
    0xff1e0000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff0d0000 /usr/lib/libm.so.1
    0xff310000 /usr/lib/libw.so.1
    0xff0b0000 /usr/lib/libmp.so.2
    0xff080000 /opt/bea/jdk131/jre/lib/sparc/native_threads/libhpi.so
    0xff050000 /opt/bea/jdk131/jre/lib/sparc/libverify.so
    0xfe440000 /opt/bea/jdk131/jre/lib/sparc/libjava.so
    0xff020000 /opt/bea/jdk131/jre/lib/sparc/libzip.so
    0xfe230000 /opt/bea/jdk131/jre/lib/sparc/libnet.so
    0xfe160000 /usr/lib/nss_files.so.1
    0xd3700000/opt/bea/wlserver6.1/lib/solaris/oci817_8/libweblogicoci37.so
    0xd3000000 /u01/app/oracle/product/8.1.7/lib/libclntsh.so.8.0
    0xfd090000 /usr/lib/libC.so.5
    0xfd3b0000 /u01/app/oracle/product/8.1.7/lib/libwtc8.so
    0xfd070000 /usr/lib/libgen.so.1
    0xfd050000 /usr/lib/libsched.so.1
    0xfd020000 /usr/lib/libaio.so.1
    0xfafd0000 /opt/bea/wlserver6.1/lib/solaris/libmuxer.so
    Local Time = Thu Apr 3 10:39:37 2003
    Elapsed Time = 178
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.3.1-b24 mixed mode)
    # An error report file has been saved as hs_err_pid7599.log.
    # Please refer to the file for further information.
    Abort - core dumped
    TIA
    Tony

  • Retrieve to forms 6i a ref cursor from a store procedure

    hi, i wanna know how to retrieving to forms 6i a ref cursor or a sys_refcursor from a function or a store procedure.
    i`ll be very gradeful if someone send me the code.
    sorry about my english, the spanish is my native languaje.

    I think you can use procedure similar to this one:
    example:
    My sample table:
    SQL> desc small_perf_table1;
    Name                                      Null?    Type
    COL1                                               NUMBER
    COL2                                               VARCHAR2(10)
    COL3                                               VARCHAR2(1)
    Simple data inside:
    SQL> select col1 from small_perf_table1
      2  where rownum < 10;
          COL1
             1
             2
             3
             4
             5
             6
             7
             8
             9
    9 rows selected.
    Create procedure which return variable sys_refcursor type:
    SQL> CREATE OR REPLACE PROCEDURE proc_cursor_test
      2  (v_cursor OUT sys_refcursor)
      3  IS
      4  BEGIN
      5   OPEN v_cursor FOR select col1 from small_perf_table1 where rownum < 10;
      6  END;
      7  /
    Procedure created.
    And here is code you can write inside forms:
    SQL> DECLARE
      2   type t_cursor IS REF CURSOR;
      3   v_cursor t_cursor;
      4   v_col1 NUMBER;
      5  BEGIN
      6   proc_cursor_test(v_cursor);
      7   LOOP
      8     FETCH v_cursor INTO v_col1;
      9     EXIT WHEN v_cursor%NOTFOUND;
    10     -- DBMS_OUTPUT.PUT_LINE(v_col1); This line is only for testing inside SQL*PLUS.
    11   END LOOP;
    12  END;
    13  /
    1
    2
    3
    4
    5
    6
    7
    8
    9
    PL/SQL procedure successfully completed.This is just an example.
    If this example does not resolve your problems then maybe you should ask your question on forms forum.
    Forms
    Peter D.

  • Cursor Not working stored Procedure but it working in anonymous Procedure

    Hi Gurus....
    My problem looks different.....my code was working as anonymous block where as it was not working as stored Procedure
    Declare
    cursor c_tblspace is
    select fs.tablespace_name TBL_SPC_NAME
           , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free 
             from sys.dba_data_files df
           , sys.dba_free_space fs
            ,partition_tables ms
         where df.file_id(+) = fs.file_id
         and fs.tablespace_name =ms.tbspc_nam
         group by fs.file_id, df.bytes, fs.tablespace_name;
    begin
      for rec_tblspace in c_tblspace
           loop
            if ( rec_tblspace.PCT_Free > 5 )
             then
             insert into t_space (tbspc_nm,ftr_spc)
             values(rec_tblspace.TBL_SPC_NAME,'full');
             dbms_output.put_line(rec_tblspace.TBL_SPC_NAME||' is full');
             end if;
           end loop;
    end;where as it working while i want to create a stored Procedure...
    create or replace procedure p_upd_space is
    cursor c_tblspace is
    select fs.tablespace_name TBL_SPC_NAME
           , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free 
             from sys.dba_data_files df
           , sys.dba_free_space fs
            ,partition_tables ms
         where df.file_id(+) = fs.file_id
         and fs.tablespace_name =ms.tbspc_nam
         group by fs.file_id, df.bytes, fs.tablespace_name;
    begin
      for rec_tblspace in c_tblspace
           loop
             if ( rec_tblspace.PCT_Free > 5 )
             then
             insert into t_space (tbspc_nm,ftr_spc)
             values(rec_tblspace.TBL_SPC_NAME,'full');
             dbms_output.put_line(rec_tblspace.TBL_SPC_NAME||' is full');
             end if;
           end loop;
    end;It was throwing following error...
    PL/SQL: ORA-00942: table or view does not exist

    Justin is right. You are creating definer right stored procedure.
    Roles are disabled during definer rights stored procedure compilation and execution.
    Here is the test case:
    #1. Anonymous Procedure
    HRDEMO@fmw//scripts> conn / as sysdba
    SYS@fmw//scripts> create user todd identified by oracle;
    SYS@fmw//scripts> grant dba to todd; --DBA role granted
    SYS@fmw//scripts> conn todd/oracle
    TODD@fmw//scripts> declare
    2 cursor c is select * from dba_data_files;
    3 begin
    4 null;
    5 end;
    6 /
    PL/SQL procedure successfully completed.
    #2. Stored Procedure
    TODD@fmw//scripts> create or replace procedure p1
    2 is
    3 cursor c is select * from dba_data_files;
    4 begin
    5 null;
    6 end;
    7 /
    Warning: Procedure created with compilation errors.
    TODD@fmw//scripts> show error
    3/27
    PL/SQL: ORA-00942: table or view does not exist

  • Return ref cursor from database link/stored proc? do-able?

    Is it possible to return a REF CURSOR from a stored procedure that is being called from a remote database via a database link???
    We are trying from Pro*Cobol on MVS (which has db link pointing to AIX thru db link) and get a 00993 error, which seems to say this is not possible.
    Before I give up, thought I would check with the experts....
    Thanks in advance.

    You can't return Java objects as stored procedure or query results.
    Douglas

Maybe you are looking for

  • Issue in Addition of  attribute column in VO

    Hi All, I have a custom VO in which dependent on custom EO which requires a extra attribute to be added. i added that attribute in both EO & VO. But changed the definition of page to add this extra field to accomdate the extra attribute, im getting b

  • Time Machine External Hard Drive Disk Check/Repair

    Howdy I have a 24" iMac using Time Machine for a backup. The external drive that Time Machine writes to is a 500 GB FW400 hard drive. I am occasionally getting an error message stating that Time Machine was unable to complete a back up to a write err

  • Garageband 10.03

    Just installed a new mini mac upgraded it to Yosemite. I opened GB and cannot select preferences or pretty much anything. It's all greyed out! While I am an advanced DAW user and computer tech, I don't understand why I can't even import a wave file.

  • When I plug in my iPod, iTunes dies

    Well the title say it all, when I plug in my iPod, Itunes "stops working". WHY??? PLEASE HELP!!!

  • Photo Transfer From PC To IPad

    Looking for recommendations for an App (or another method) that will permit me to copy or simply drag selected photos from my PC to my IPad. Having come from the simplicity of the PC world, I am very disappointed in the complexity and need to synchro