Oracle Array Fetches

Hi,
I've been reading information about Oracle driver advanced features, and I've
come across Oracle Array Fetches.
We we're thinking on using this, but we have several doubts. When you create
the Connection, it must be created using
myDriver.connect, but we wanted to make all connections using Datasource.
Is it possible to create connections using
Datasource and use Oracle Array Fetches?
If we don't use weblogic.oci.cacheRows, which value will it use? If it's 100,
for example, does it mean that every
100 records, it will perform a new fetch instruction that will ask for those
new 100 records to DBMS?
Which is the most accurate value for it? A big one to make DBMS work less
or a short one for not overwhelming weblogic?
Thanks in advance

Hi ,
One cause for that error is there is no type definition for formaters we are using.EX money and date formaters.
thanks

Similar Messages

  • REPORT PERFORMANCE TUNING:Array FETCH SIZE

    Hi Folks,
    DOES any one has an idea about   array fetch size  in CRYSTAL REPORTS XI connected to oracle database.
       I have two basic questions here
               1.   What is the default array fetch size in CRYSTAL XI 
               2.   how to change this parameter.
    Thanks In advance
    Mani

    Please re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • How To Switch On Array Fetch in JDev3.0

    Hi,
    I would like to use the Array Fetch in JDeveloper 3.0.
    How do I use the Array Fetch in JDev3.0?
    I can use the simlary thing and set Arrarysize in Option Menu of SQL*PLUS.
    I can also use this on Oracle Forms's RunTime program.
    Thanks.
    Alan

    Array fetch is a JDBC feature which you have to program following the JDBC-specific syntax (resultset). As such, we do not have a way to specify the arraySize in a menu. An alternative for you would be to use the InfoBus Wizard.
    Thanks,
    -Kishore

  • Array fetch of VArray and PObject, right way?

    I am trying to array fetch a type which is defined like:
    CREATE TYPE mytype as VARRAY(1024) of NUMBER
    I am trying to set buffer with
    ResultSet::setDataBuffer(...) but I am not able to make it work.
    Also I am trying to setDataBuffer for some PObject class (generated with OTT) but without success.
    What would be right parameters for setDataBuffer in this cases?
    I am using 10.2 with VC8.
    Thank you.

    ResultSet::setDataBuffer() is not for use with object/varray/nested table types. For retrieving a VARRAY column value, you need to use the appropriate getVector() methods of ResultSet :-
    http://download-east.oracle.com/docs/cd/B12037_01/appdev.101/b10778/reference025.htm#sthref1504
    To increase performance of your SELECT queries, you can evaluate the prefetch option of the Statement class.
    Regards.

  • Oracle Arrays and getVendorConnection API and Class Cast Exception

    I 've gone through various threads relating to the topic of Oracle Arrays and the getVendorConnecton API call to avoid the class Cast Exception.. i ve used all these but am still facing the problem...
    I would appreciate it if some one could resolve the following queries :
    I am using Weblogic 8.1 SP5 with oracle 8i
    1. I read that the need to use the getVendorConnection API to make pl/sql proc calls with oracle arrays from the WL Server wont be required to avoid classCastException...
    I tried to use the connection from the WL connection pool ..but it didnot work....I used the getVendorConnection API ..which also doesnot seem to work..
    I got the Heurisitc Hazard exception...I used the Oracle 9i driver ie ojdbc14.jar ...after this the exception is not coming but still the code doesnt seem to work...
    the snippet of the code is pasted below :
    ~~~~~~~~~~~~~~~~~~~~~~~code is : ~~~~~~~~~~~~~~~~~~~
    /*below :
    logicalCon is the Connection from the WL connection pool
    JDBCcon is the JDBC connection. */
    <div> try </div>
    <div>{ </div>
    <div>
    <b>vendorConn</b> = ((WLConnection)logicalCon).getVendorConnection();
    </div>
    <div>
    //Calling the procedure
    </div>
    <div>
    //java.util.Map childMap1 = JDBCcon.getTypeMap();
    </div>
    <div>
    java.util.Map childMap1 = <b>vendorConn</b>.getTypeMap();
    </div>
    <div>
    childMap1.put("SST_ROUTE_ENTRY", Class.forName("svm.stport.ejb.StaticRouteEntry"));
    </div>
    <div>
    //JDBCcon.setTypeMap(childMap1);
    <b>vendorConn</b>.setTypeMap(childMap1);
    </div>
    <div>
    // Create an oracle.sql.ARRAY object to hold the values
    </div>
    <div>
    /*oracle.sql.ArrayDescriptor arrayDesc1 = oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", JDBCcon); */
    </div>
    <div>
    oracle.sql.ArrayDescriptor arrayDesc1 =
    oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", <b>vendorConn</b>); // here if i use the JDBCcon it works perfectly.... <u>^%^%^%</u>
    </div>
    <div>
    code to fill in the sst route entry array....
    .....arrayValues1 */
    </div>
    <div>
    /* oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, JDBCcon, arrayValues1); */
    </div>
    <div>
    oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, <b>vendorConn</b>, arrayValues1);
    </div>
    <div>
    callStatement = logicalCon.prepareCall( "? = call procName(?, ?, ?)");
    </div>
    <div>
    /* ..code to set the ?s ie array1 */
    </div>
    <div>
    callStatement.execute();
    </div>
    <div>
    }catch(Exceptio e){
    </div>
    <div>
    }</div>
    <div>
    finally </div>
    </div>{</div>
    <div>System.out.println(" I ve come to finally"); </div>
    <div>}</div>
    <div>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~code snippet ends here ~~~~~~~~~~~~~~``
    </div>
    I have observed that the control immediately comes to the finally block after the call to the createDescriptor line above with <u>^%^%^%</u> in the comment. If i use the JDBCCon in this line...it works perfectly fine.
    Any pointers to where anything is getting wrong.
    I have jst set the vendorCon to null in the end of the file and not closed it. Subsequently i have closed the logicalCon. This has been mentioned in some of the thread in this forum also.
    Thanks,
    -jw

    Jatinder Wadhwa wrote:
    I 've gone through various threads relating to the topic of Oracle Arrays and the getVendorConnecton API call to avoid the class Cast Exception.. i ve used all these but am still facing the problem...
    I would appreciate it if some one could resolve the following queries :
    I am using Weblogic 8.1 SP5 with oracle 8i
    1. I read that the need to use the getVendorConnection API to make pl/sql proc calls with oracle arrays from the WL Server wont be required to avoid classCastException...
    I tried to use the connection from the WL connection pool ..but it didnot work....I used the getVendorConnection API ..which also doesnot seem to work..
    I got the Heurisitc Hazard exception...I used the Oracle 9i driver ie ojdbc14.jar ...after this the exception is not coming but still the code doesnt seem to work...
    the snippet of the code is pasted below :
    ~~~~~~~~~~~~~~~~~~~~~~~code is : ~~~~~~~~~~~~~~~~~~~Hi. Show me the whole exception and stacktrace if you do:
    try
    vendorConn = ((WLConnection)logicalCon).getVendorConnection();
    java.util.Map childMap1 = vendorConn.getTypeMap();
    childMap1.put("SST_ROUTE_ENTRY" Class.forName("svm.stport.ejb.StaticRouteEntry"));
    vendorConn.setTypeMap(childMap1);
    oracle.sql.ArrayDescriptor arrayDesc1 =
    oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR",
    vendorConn);
    oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, vendorConn, arrayValues1);
    callStatement = logicalCon.prepareCall( "? = call procName(? ? ?)");
    callStatement.execute();
    }catch(Exception e){
    e.printStackTrace();
    finally
    try{logicalCon.close();}catch(Exception ignore){}
    System.out.println(" I ve come to finally");
    /*below :
    logicalCon is the Connection from the WL connection pool
    JDBCcon is the JDBC connection. */
    <div> try </div>
    <div>{ </div>
    <div>
    <b>vendorConn</b> = ((WLConnection)logicalCon).getVendorConnection();
    </div>
    <div>
    //Calling the procedure
    </div>
    <div>
    //java.util.Map childMap1 = JDBCcon.getTypeMap();
    </div>
    <div>
    java.util.Map childMap1 = <b>vendorConn</b>.getTypeMap();
    </div>
    <div>
    childMap1.put("SST_ROUTE_ENTRY", Class.forName("svm.stport.ejb.StaticRouteEntry"));
    </div>
    <div>
    //JDBCcon.setTypeMap(childMap1);
    <b>vendorConn</b>.setTypeMap(childMap1);
    </div>
    <div>
    // Create an oracle.sql.ARRAY object to hold the values
    </div>
    <div>
    /*oracle.sql.ArrayDescriptor arrayDesc1 = oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", JDBCcon); */
    </div>
    <div>
    oracle.sql.ArrayDescriptor arrayDesc1 =
    oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", <b>vendorConn</b>); // here if i use the JDBCcon it works perfectly.... <u>^%^%^%</u>
    </div>
    <div>
    code to fill in the sst route entry array....
    .....arrayValues1 */
    </div>
    <div>
    /* oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, JDBCcon, arrayValues1); */
    </div>
    <div>
    oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, <b>vendorConn</b>, arrayValues1);
    </div>
    <div>
    callStatement = logicalCon.prepareCall( "? = call procName(?, ?, ?)");
    </div>
    <div>
    /* ..code to set the ?s ie array1 */
    </div>
    <div>
    callStatement.execute();
    </div>
    <div>
    }catch(Exceptio e){
    </div>
    <div>
    }</div>
    <div>
    finally </div>
    </div>{</div>
    <div>System.out.println(" I ve come to finally"); </div>
    <div>}</div>
    <div>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~code snippet ends here ~~~~~~~~~~~~~~``
    </div>
    I have observed that the control immediately comes to the finally block after the call to the createDescriptor line above with <u>^%^%^%</u> in the comment. If i use the JDBCCon in this line...it works perfectly fine.
    Any pointers to where anything is getting wrong.
    I have jst set the vendorCon to null in the end of the file and not closed it. Subsequently i have closed the logicalCon. This has been mentioned in some of the thread in this forum also.
    Thanks,
    -jw

  • OCI - Array-Fetch vs. One-row-per-fetch

    Hello guys,
    i have a question about the OCI and the possibilities about fetches.
    Is it possible to get only one row per fetch without setting the array size to 1?
    I have a third party application that shows this behaviour which i have rebuild in sqlplus.
    SQL> create table mytest (a number);
    SQL> begin
      2  for i in 1 .. 1500 loop
      3  insert into mytest values (i);
      4      end loop;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> set autotrace traceonly;
    -- Now with the default array size of 15 with sqlplus
    SQL> select * from mytest;
         118  consistent gets
         101  SQL*Net roundtrips to/from client
         1500  rows processed
    -- Now with a bigger array size (150)
    SQL> set arraysize 150
    SQL> select * from mytest;
         17  consistent gets
         11  SQL*Net roundtrips to/from client
         1500  rows processed
    -- Now the behaviour of the third party application
    SQL> set arraysize 1
    SQL> select * from mytest;
         757  consistent gets
         751  SQL*Net roundtrips to/from client
         1500  rows processed
    SQL> set arraysize 2
    SQL> select * from mytest;
         757  consistent gets
         751  SQL*Net roundtrips to/from client
         1500  rows processedThe third party application is a c program and i can not take a look at the code.
    So as you can see the consistent gets are the same with arraysize 1 and 2. The sql statement which is executed of the c-program is returning a huge amount of data and it seems like it is run with arraysize 1 or 2 or it is executing a different OCI call.
    So now is my question:
    Which methods does the OCI interface provide to recieve (fetch) data?
    - Is it only array fetching (like sqlplus do) or is it possible to return only one row per fetch with a specific call.
    I can speed up the query by setting the bigger array-size in sqlplus .. but i want to point the programers to the possibilities with the OCI.
    Thanks and Regards
    Stefan

    The following call in OCI can be used to control the fetched rows
    MAX_PREFETCH_ROWS is number of rows you want to fetch in one round trip.
    (void) OCIAttrSet((dvoid *)DBctx->stmthp, (ub4) OCI_HTYPE_STMT,
    (dvoid *)&MAX_PREFETCH_ROWS,(ub4)sizeof(MAX_PREFETCH_ROWS),(ub4) OCI_ATTR_PREFETCH_ROWS, DBctx->errhp);

  • Oracle Array

    Hi,
    I need to know all about Oracle Arrays. Where can I find some practical examples of working with Arrays in Oracle?
    For e.g. Example programs having definition, declaration, manipulating the array
    Regards,
    Lostworld

    I have given some basic examples. You can try it and learn
    BANNER
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Simple Varray type:-
    CREATE OR REPLACE PROCEDURE proc_arraytest
    AS
    ----- Varray Definition
    TYPE var_details IS VARRAY(14) OF emp.ename%TYPE;
    ----- Varray Declaration
    v_vardetails var_details := var_details();
    v_position NUMBER := 0;
    BEGIN
    FOR i IN (SELECT ename FROM emp)
      LOOP
       v_position := v_position+1;
       v_vardetails.EXTEND;
       ----- Manipulating into VARRAY
       v_vardetails(v_position) := i.ename;
       END LOOP;
      ---- Printing VARRAY values
      FOR j in 1..v_vardetails.COUNT
       LOOP
        DBMS_OUTPUT.PUT_LINE(v_vardetails(j));
       END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END proc_arraytest;
    EXEC proc_arraytest;
    Varray with record type:-
    CREATE OR REPLACE PROCEDURE proc_arrayrectest
    AS
    ----- Record Definition
    TYPE rec_details IS RECORD (empno emp.empno%TYPE,
                                 ename emp.ename%TYPE,
                                 deptno emp.deptno%TYPE,
                                 dname  dept.dname%TYPE
    ----- Varray Definition
    TYPE var_details IS VARRAY(20) OF rec_details;
    ----- Varray Declaration
    v_vardetails var_details := var_details();
    v_position NUMBER := 0;
    BEGIN
    FOR i IN (SELECT empno,ename,e.deptno deptno,dname FROM emp e,dept d WHERE e.deptno = d.deptno)
      LOOP
       v_position := v_position+1;
       v_vardetails.EXTEND;
       ----- Manipulating into VARRAY
       v_vardetails(v_position).empno := i.empno;
       v_vardetails(v_position).ename := i.ename;
       v_vardetails(v_position).deptno := i.deptno;
       v_vardetails(v_position).dname := i.dname;
       END LOOP;
      ---- Printing VARRAY values
      FOR j in 1..v_vardetails.COUNT
       LOOP
        DBMS_OUTPUT.PUT_LINE(v_vardetails(j).empno||','||
                             v_vardetails(j).ename||','||
                             v_vardetails(j).deptno||','||
                             v_vardetails(j).dname);
       END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END proc_arrayrectest;
    EXEC proc_arrayrectest;
    Simple Varray type With Bulk collect:-
    CREATE OR REPLACE PROCEDURE proc_arraybulktest
    AS
    ----- Varray Definition
    TYPE var_details IS VARRAY(14) OF emp.ename%TYPE;
    ----- Varray Declaration
    v_vardetails var_details;
    v_position NUMBER := 0;
    BEGIN
    ---- Manipulating into Varray using bulk collect
    SELECT ename BULK COLLECT INTO v_vardetails FROM emp;
      ---- Printing VARRAY values
      FOR j in 1..v_vardetails.COUNT
       LOOP
        DBMS_OUTPUT.PUT_LINE(v_vardetails(j));
       END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END proc_arraybulktest;
    EXEC proc_arraybulktest;
    Varray with record type(Bulk Collect):-
    CREATE OR REPLACE PROCEDURE proc_arrayrecbulktest
    AS
    ----- Record Definition
    TYPE rec_details IS RECORD (empno emp.empno%TYPE,
                                 ename emp.ename%TYPE,
                                 deptno emp.deptno%TYPE,
                                 dname  dept.dname%TYPE
    ----- Varray Definition(You need to mention the size of varray.. Here is 20)
    TYPE var_details IS VARRAY(20) OF rec_details;
    ----- Varray Declaration
    v_vardetails var_details := var_details();
    v_position NUMBER := 0;
    BEGIN
    ---- Manipulating into Varray using bulk collect
    SELECT empno,
            ename,
            e.deptno deptno,
            dname BULK COLLECT INTO v_vardetails
    FROM emp e,
         dept d
    WHERE e.deptno = d.deptno;
      ---- Printing VARRAY values
      FOR j in 1..v_vardetails.COUNT
       LOOP
        DBMS_OUTPUT.PUT_LINE(v_vardetails(j).empno||','||
                             v_vardetails(j).ename||','||
                             v_vardetails(j).deptno||','||
                             v_vardetails(j).dname);
       END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END proc_arrayrecbulktest;
    EXEC proc_arrayrecbulktest;
    ------ We have forall for bulk insert.
    Varray with FORALL:-
    CREATE OR REPLACE PROCEDURE proc_arrayrecbulkforalltest
    AS
    ----- Record Definition
    TYPE rec_details IS RECORD (empno emp.empno%TYPE,
                                 ename emp.ename%TYPE,
                                 deptno emp.deptno%TYPE,
                                 dname  dept.dname%TYPE
    ----- Varray Definition(You need to mention the size of varray.. Here is 20)
    TYPE var_details IS VARRAY(20) OF rec_details;
    ----- Varray Declaration
    v_vardetails var_details := var_details();
    v_position NUMBER := 0;
    BEGIN
    ---- Manipulating into Varray using bulk collect
    SELECT empno,
            ename,
            e.deptno deptno,
            dname BULK COLLECT INTO v_vardetails
    FROM emp e,
         dept d
    WHERE e.deptno = d.deptno;
      ----Bulk insert
      FORALL i in 1..v_vardetails.COUNT
       INSERT INTO test_empdet(empno,
                               ename,
                               deptno,
                               dname
                     VALUES (v_vardetails(i).empno,
                             v_vardetails(i).ename,
                             v_vardetails(i).deptno,
                             v_vardetails(i).dname
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END proc_arrayrecbulkforalltest;
    EXEC proc_arrayrecbulkforalltest;

  • Sequential read instead of array fetch

    Hi Guys,
    Im banging my head by trying to figure out why my SQL statement always turned up with sequential read(check against ST05) instead of array fetch eventhough i put INTO TABLE statement. FYI, im extracting data from table BSET(under cluster RFBLG). This is the code:
        SELECT bukrs belnr gjahr buzei bupla mwskz hkont 
               txgrp shkzg hwbas hwste ktosl knumh kbetr
               mlddt stbkz
          INTO TABLE LT_TEMP
          FROM bset
          PACKAGE SIZE 3000
          FOR ALL ENTRIES IN lt_bkpf
          WHERE bukrs  =  lt_bkpf-bukrs           
          AND   belnr  =  lt_bkpf-belnr    
          AND   gjahr  =  lt_bkpf-gjahr.                
        ENDSELECT
    Pls comment whats wrong with the above code.
    Thanks in advance.

    I think your code is correct. But remember that you have to process the internal table insice the SELECT/ENDSELECT:
       SELECT bukrs belnr gjahr buzei bupla mwskz hkont 
               txgrp shkzg hwbas hwste ktosl knumh kbetr
               mlddt stbkz
          INTO TABLE LT_TEMP
          FROM bset
          PACKAGE SIZE 3000
          FOR ALL ENTRIES IN lt_bkpf
          WHERE bukrs  =  lt_bkpf-bukrs           
          AND   belnr  =  lt_bkpf-belnr    
          AND   gjahr  =  lt_bkpf-gjahr.
    *  LOOP AT lt_temp.
    *  ENDLOOP.
    *    or
    *  APPEND LINES OF lt_temp
    *    TO lt_new.
        ENDSELECT
    Rob

  • Crystal Reports for Enterprise - SQL Command - Array Fetch Size

    We're attempting to migrate a report created in Crystal Reports 2013 Support Pack 3  Version 14.1.3.1257 to...
    Crystal Reports for Enterprise Version 14.1.3.1300 Build: 2013 Support Pack 3 Patch 1
    The originating report is successfully connecting and returning data from MySQL through the MySQL ODBC 3.51 Driver (3.51.30.00), using a SQL Command
    When opening up this report in CR for E and running the report against the same database and the same version of database driver, we get the following Crystal Reports error:
    Crystal Reports
    A problem was encountered
    The following error has occurred while trying to retrieve the data:
    Error on Fetch : Largevarchar and Largevarbinary data cannot retrieved as variable-length data if the array fetch size is not set to 1.
    Please check with your System Administrator that the data source is correctly configured.
    How would we check and where would we adjust the array fetch size within Crystal Report for Enterprise?
    Thank you

    Hi Vitaly,
    I had not yet tried creating a new report based on the query, within CR for E, but I did now upon your request\suggestion.  Yes, it fails as well with a brand new report..same new error as above: "Non Supported Datatype"
    I've pasted the SQL we are using below.  I just tried running this exact query natively through MyPHPAdmin, and also creating a brand new report with Crystal Reports 2013 against the same ODBC driver that I am trying to use within CR for E.  In both cases the query was accepted and ran successfully.
    Driver info:
    MySQL ODBC 3.51 Driver -  Version 3.51.30.00
    I have also tried 2 newer versions of the driver:
    MySQL ODBC 5.3 ANSI - Version 5.03.02.00
    MySQL ODBC 5.3 Unicode - Version 5.03.02.00
    ...where I also configure each within the Information Design Tool so that the "Array Fetch Size"=  1
    I receive the same "Non Supported Datatype" error for these drivers as well.  The MySQL server version is:  5.1.73-0ubuntu0.10.04.1-log
    Protocol Version: 10
    MySQL charset:  UTF-8
    Here is the query:
    SELECT ft.seq_id, ft.ticket_date, ft.posttotal,
    wl.name as current_approval_level,
    TIMESTAMPDIFF(DAY,ft.ticket_date,NOW()) AS Days_Since_TicketDate,
    TIMESTAMPDIFF(DAY,ft.date_created,NOW()) AS Days_Since_Created,
    TIMESTAMPDIFF(DAY,wph.workflow_date,NOW()) AS Days_Waiting_Your_Approval,
    ft.internal_comments
    FROM ticket AS ft
    LEFT JOIN unit AS unit ON (ft.unit_id = unit.id)
    LEFT JOIN unit_district AS udist ON (udist.unit_id = unit.id AND (udist.effective_date IS NULL OR udist.effective_date = 0 OR udist.effective_date <= ft.ticket_date)
           AND (udist.expiry_date IS NULL OR udist.expiry_date = 0 OR udist.expiry_date >= ft.ticket_date))
    LEFT JOIN workflow_document_process_map AS wdpm ON (ft.id = wdpm.document_id AND wdpm.document_type_id = 1)
    LEFT JOIN workflow_process AS wp ON (wp.id = wdpm.workflow_process_id)
    LEFT JOIN workflow_rule AS wr ON (wp.workflow_schema_id = wr.workflow_schema_id AND wp.workflow_level_id = wr.workflow_level_id AND wr.workflow_activity_id = 2  AND (wr.effective_date IS NULL OR wr.effective_date = 0 OR wr.effective_date <= ft.ticket_date) AND (wr.expiry_date IS NULL OR wr.expiry_date = 0 OR wr.expiry_date >= ft.ticket_date))
    LEFT JOIN workflow_rule AS wr2 ON (wp.workflow_schema_id = wr2.workflow_schema_id AND wp.workflow_level_id = wr2.workflow_level_id AND wr2.workflow_activity_id = 4 AND (wr2.effective_date IS NULL OR wr2.effective_date = 0 OR wr2.effective_date <= ft.ticket_date) AND (wr2.expiry_date IS NULL OR wr2.expiry_date = 0 OR wr2.expiry_date >= ft.ticket_date))
    LEFT JOIN workflow_process_history AS wph ON (wph.workflow_process_id = wp.id)
    LEFT JOIN ticket_attachment AS ftattach ON (ft.id = ftattach.ticket_id AND ftattach.attachment_type_id = 2)
    LEFT JOIN person AS p ON (ft.supervisor_id = p.id)
    LEFT JOIN person AS p2 ON (ft.head_office_contact_id = p2.id AND (p2.effective_date IS NULL OR p2.effective_date = 0 OR p2.effective_date <= ft.ticket_date)
           AND (p2.expiry_date IS NULL OR p2.expiry_date = 0 OR p2.expiry_date >= ft.ticket_date))
    LEFT JOIN person AS p3 ON (ft.sales_person_id = p3.id)
    LEFT JOIN person_company_sales AS pcs ON (p2.id = pcs.client_person_id AND pcs.company_id = ft.client_company_id)
    LEFT JOIN person AS p4 ON (ft.created_by = p4.id)
    LEFT JOIN person AS p5 ON (ft.well_site_supervisor_id = p5.id)
    LEFT JOIN division AS d ON (ft.division_id = d.id)
    LEFT JOIN district AS dist1 ON (ft.district_id = dist1.id)
    LEFT JOIN district AS dist2 ON (udist.district_id = dist2.id)
    LEFT JOIN company AS c ON (ft.client_company_id = c.id)
    LEFT JOIN province AS prov ON (ft.job_province_id = prov.id)
    LEFT JOIN ticket_attachment AS ftattach2 ON (ft.id = ftattach2.ticket_id AND ftattach2.attachment_type_id != 2)
    LEFT JOIN locale_currency AS lc ON (lc.id = ft.locale_currency_id)
    LEFT JOIN operation_type AS ot ON (ot.id = ft.operation_type_id)
    LEFT JOIN incident AS i ON (i.ticket_id = ft.id)
    LEFT JOIN invoice_type AS it ON (it.id = ft.invoice_type_id)
    LEFT JOIN workflow_level AS wl ON (wl.id = wp.workflow_level_id)
    LEFT JOIN company AS dist1_company ON (dist1_company.id = dist1.internal_company_id)
    WHERE 1
    AND ( pcs.sales_person_id = 2113 AND pcs.effective_date <= ft.ticket_date AND ( pcs.expiry_date >= ft.ticket_date OR pcs.expiry_date = '0000-00-00 00:00:00' OR pcs.expiry_date IS NULL) )
    AND ft.closed_flag <> 1 AND (wr2.id IS NOT NULL OR wr2.id != 0)
    AND ft.commit_flag = 1
    AND ft.dispatch_status = 0
    AND dist1_company.country_id = 1
    AND wr2.role_id = 2
    GROUP BY ft.id
    ORDER BY ticket_date ASC, ft.id ASC
    Thanks you for your help.

  • Oracle Array from J++

    I am trying to access oracle array from J++ and couldn't have any luck. Can any one help me and show me some code. i want to access array (String array) from oracle stored procedure using j++ . thanks
    [email protected]

    I'm able to send arrays from flex but to a web service
    written in ASP.Net, i dont know i this could help you.

  • LOB array fetch help required

    Hi All
    I am developing an OCCI application to read data from oracle 10g server. I used setdatabuffer() to allocate resultset buffers and then fetch data into them using resultset->next(rowCount) method. It works perfectly with all data types(NUMBER,CHAR,VARCHAR,TIMESTAMP etc) but i can't make it work with LOBs. Currently whole data from lobs is read into buffers, its fine for small entries but for LOBS with large size I get truncation error. Is there some way i can retrieve an array of LOB objects and then use them to read data in manageable chunks.
    thanks
    Adi

    Dear KaviSqlHelp
    Elaborate your requirement more clearly like TableA have millions of records and i need to compare with TableB etc..
    only then someone can propose a closer answer for your question.
    To simply save the records into excel, you can write click the result set and save rows as, also you can use SQL Server Import/Export wizard also.
    If both tables exist in the database itself, you can make join on the key columns to retrieve the columns from another master table. 
    If you are not satisfied with my answer, please post more details about your requirement..
    Based on my assumtion you may need something like below, you may have tableA, tableB and col1,col2,col3 is your required field on which the data needs to be null
    Select col1,col2
    from tableA
    inner join TableB on TableA.id = TableB.id
    where col1 is null and col2 is null
    Working as a Senior Database Analyst & Architect at Ministry of Higher Education in KSA

  • Sessions opening\closing in oracle while fetching data from XI

    Hi Friends,
    I used JDBC adaptor to fetch data from Oracle. I set the poll interval 86400 seconds because we need to run it on daily basis.
    Now when XI fetch data from Oracle, It will open session in oracle, but it is not closed automatically. So, I have nearly 100 channels, and all channels are activated. So, for each channel 1 session is opened in oracle. By this way, the oracle server performance goes down. It is not working properly at that time.
    How can I close these sessions in oracle.
    Regards,
    Narendra

    Did u try this paramter in JDBC sender adapter...
    Disconnect from Database After Processing Each Message
    Set this indicator if the database connection is to be released and reestablished before every poll interval.
    -Siva Maranani

  • Trying to pass Oracle array/object type to Java

    I have a Java class with two inner classes that are loaded into Oracle:
    public class PDFJ
        public static class TextObject
            public String font_name;
            public int font_size;
            public String font_style;
            public String text_string;
        public static class ColumnObject
            public int left_pos;
            public int right_pos;
            public int top_pos;
            public int bottom_pos;
            public int leading;
            public TextObject[] column_texts;
    }I have object types in Oracle as such that bind to the Java classes:
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT" AS OBJECT
    EXTERNAL NAME 'PDFJ$TextObject'
    LANGUAGE JAVA
    USING SQLData(
      "FONT_NAME" VARCHAR2(25) EXTERNAL NAME 'font_name',
      "FONT_SIZE" NUMBER EXTERNAL NAME 'font_size',
      "FONT_STYLE" VARCHAR2(1) EXTERNAL NAME 'font_style',
      "TEXT_STRING" VARCHAR2(4000) EXTERNAL NAME 'text_string'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT_ARRAY" AS
      TABLE OF "PROGRAMMER"."PDFJ_TEXT";
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN" AS OBJECT
    EXTERNAL NAME 'PDFJ$ColumnObject'
    LANGUAGE JAVA
    USING SQLData(
      "LEFT_POS" NUMBER EXTERNAL NAME 'left_pos',
      "RIGHT_POS" NUMBER EXTERNAL NAME 'right_pos',
      "TOP_POS" NUMBER EXTERNAL NAME 'top_pos',
      "BOTTOM_POS" NUMBER EXTERNAL NAME 'bottom_pos',
      "LEADING" NUMBER EXTERNAL NAME 'leading',
      "COLUMN_TEXTS" "PROGRAMMER"."PDFJ_TEXT_ARRAY" EXTERNAL NAME 'column_texts'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN_ARRAY" AS
        TABLE OF "PROGRAMMER"."PDFJ_COLUMN";
    /I successfully (as far as I know) build a PDFJ_COLUMN_ARRAY object in a PL/SQL procedure. The PDFJ_COLUMN_ARRAY contains PDFJ_COLUMN objects; each of those objects contains a PDFJ_TEXT_ARRAY of PDFJ_TEXT objects (Example: pdf_column_array(i).pdf_text_array(i).text_string := 'something';). In this procedure, I pass this PDFJ_COLUMN_ARRAY as a parameter to a Java function. I assume the Java function parameter is supposed to be a oracle.sql.ARRAY object.
    I cannot figure out how to decompose this generic ARRAY object into a ColumnObject[] array. I also tried Googling and searching the forums, but I can't figure out matching search criteria. I was wondering if anyone here knows anything about passing user-defined Oracle type objects to a Java function and retrieving the user-defined Java class equivalents that they are supposedly mapped to--especially a user-defined array type of user-defined object types containing another user-defined array type of user-defined object types.

    Ok. I will try asking on the JDBC forum. So, don't
    flame me for cross-posting. :PWe won't, if over there you just post basically a
    link to this one.
    sigh Guess what, he did it the flame-deserving way. It's crossposted at:
    http://forum.java.sun.com/thread.jspa?threadID=602805
    <flame level="mild">Never ceases to amaze me how people don't think that posting a duplicate rather than a simple link isn't wasteful, as people could end up answering in both of them, not seeing each other's answers</flame>

  • Oracle Arrays support in WLS7.0

    Getting a ClassCast Exception when using Oracle.jdbc.ArrayDescriptor.createDescritor("array",conn)

    Hi,
    If you don't set the datatype (i.e. leave it as "unknown", or set it back to "unknown"), it will generate
    TEST_V AS ( CASE WHEN EVENT_NAME = 'XXXX' THEN 'MMMM' ELSE 'KKKK' END )
    The Oracle 11gR2 documentation for the virtual_column_definition clause notes that "The keyword VIRTUAL is optional and for syntactic clarity."
    So the fact that Data Modeler does not output the keyword VIRTUAL does not make any difference to the effect of the SQL statement.
    David

  • Troubleshooting Oracle array type names in JDBC calls

    Hi,
    There are several threads in this forum about people having trouble with the array SQL type names that the Oracle JDBC driver recognizes (e.g., in a call setting up PLSQL procedure OUT parameters like "call.registerOutParameter(1, Types.ARRAY, "VARCHAR_NESTED_TAB_TYP");"). I've seen at least the following threads:
    * vinay saini's "accessing package defined datatypes in oracle from JDBC" thread (Re: Heterogeneous Connectivity to SQL Server from 8.0.5
    * fwelland's "PL/SQL Tables as IN parameters???" thread (Re: entity relationship/model of database diagram
    * Ernesto Marquina's "Table Type as OUT parameter" thread (Re: Changing namespace
    * Nazneen Nahid's "Oracle PL/SQL type defined within a package can't be passed from JAVA" thread (Re: BI Beans Graph in JSp
    * vinay saini's "mapping Table/VARRAY data type to JDBC data type" thread (Re: 9.0.3 unable to find session bean for AM
    I'm stuck in the middle of this myself, and found that something useful to look at is the PLSQL procedure that the driver uses to determine whether the type is there. You can run the following test PLSQL block with your schema name and type name to check on the database side whether it will work:
    declare
    schemaname varchar(255);
    typename varchar(255);
    typoid raw(255);
    version integer;
    tds long raw;
    lds long raw;
    begin
    schemaname := 'MKT2_SMD9';
    typename := 'VARCHAR_NESTED_TAB_TYP';
    dbms_output.put_line('Result for '||schemaname||','||typename||'='||
    dbms_pickler.get_type_shape(schemaname, typename, typoid, version, tds, lds));
    end;
    If the procedure returns 0, then the JDBC code should have no trouble picking up the array type and handling your call. If the procedure returns a nonzero number, the JDBC code using the same schemaname and typename will probably fail. This at least allows you to try a number of different schema and type names with the application and driver layers eliminated. Unfortunately, I have no idea how get_type_shape works, and it doesn't seem to be documented in Oracle's 9i docs, so I can't shed any light on why some things work and others don't.
    Jim

    I guess, in hibernate, in order to make it serialized object, try using set/collection implementation.

Maybe you are looking for

  • ActiveX pie chart range limit

    I have a problem with creating a pie chart using ActiveX that seems to be related to the range. When I give it a source of 8 cells (source 1) the pie chart works fine (Right Pie). If I give it 9 cells (source 2) the pie chart data has 9 series instea

  • Webdynpro Application is not Deploying into Netweaver 2004s From NWDS CE

    Hi, I Developed Webdynpro Application in NWDS CE 7.1 SP5. I Am using Netweaver 2004s AS JAVA . After Deploying application i will get page can not be displayed and in the browser url is following below http://localhost:-1/webdynpro/dispatcher/demo.sa

  • Service Account in Proxy Service

    I have two Proxy Services A and B. B is password protected and I have created a Service account in OSB. Now, A accesses B. So, where to configure the Service Account so that A can access B successfully. Thank You!

  • Why do Karaoke CD's change tempo when uploaded?

    I am new to Garageband. When I uploaded karaoke songs into iTunes they sounded fine, but when I transferred them to Garageband they sound slower and flat. When I noticed this I tried changing the tempo within Garageband but it wouldn't change, only t

  • 32-bit windows 7 install with Mavericks - need Boot Camp 4?

    Hello, I've tried fairly extensive searching and can't find precise answers, wondering if anyone can help? I have a retina MBP (mid 2012) with latest OS X (Mavericks) installed, and thus Boot Camp 5 installed. I have an academic version of Windows 7