Only on tempfile used during sql sorts

environment : Entreprise 92010/W2K
My temp tablespace (locally managed and temporary) has 3 tempfile, each with autoextend and maxsize limit.
When i create an index on a big table, my 3 tempfile are used.
But when a big sort occurs during a sql statement, only one tempfile is used and i get an ora-1652.
Why all tempfiles are not used during sorts statements (union, max...) ?
This behavior can be easily tested :
- create a new temp ts with 3 small tempfile, autoextend on but very small maxsize
- alter the user who will do the sorts
- log on as user altered
- create an index on a big table => the 3 tempfiles will grow
- execute a query (max, min, union ,distinct...) => only one tempfile is used.
SQL sort always done in only one file or bug ?
Jean-Fran�ois L�guillier

The 3 tempfile belong to the same ts.
This ts is the temporary ts for my user which executes the sort sql statement.
During execution, i monitor size of the 3 files (from v$tempfile) : only one was used during query and when it reached maxsize, i got ora 1652 but fres space were available in the 2 others tempfile.
When i create a big index, i see changes in bytes for all tempfiles (in v$tempfile).
One of my customer has same problem. He added tempfile to his temp ts but sort statement failed again.
I tested this behavior with 92010/EE with W2K.
I think it's a bug but nothing appears in patchset 9204.

Similar Messages

  • Hello!I only want to use the sql loader,and then what sould I do?

    Such as the title

    f7ae7c6c-6210-4d88-b8c9-fad38d9ee626 wrote:
    but somebaby say i can
      1> scp [email protected]:/home/oracle/oracle_home/bin/sqlldr/usr/local/oracle/sqlldr
       2> mkdir -p /usr/local/oracle/rdbms/mesg
          cd /usr/local/oracle/rdbms/mesg/
          scp [email protected]:/home/oralce/oracle_home/rdbms/mesg/ulus.msb./ulus.msb
    and then can use the sqlldr
    but somebaby say i can
    Ok, knock yourself out ...
    Guy: Where did you hear that?
    Girl: On the internet
    Guy: And you believed it?
    Girl: Sure. They can't put anything on the internet that isn't true
    Guy: Where did you hear that?
    Girl: On the internet.  Oh, here comes my date.  I met him on the internet.  He's a French Model.
    Guy 2 (with sly wink) : Bonjour
    http://www.youtube.com/watch?v=bufTna0WArc
    ============================================================================
    BTW, it would be really helpful if you would go to your profile and give yourself a recognizable name.  It doesn't
    have to be your real name, just something that looks like a real name.  Who says my name is really Ed Stevens?  But at
    least when people see that on a message they have a recognizable identity.  Unlike the system generated name of
    'ed0f625b-6857-4956-9b66-da280b7cf3a2', which is like going to the pub with a bag over your head.
    Call me a racist, but all you ed0f625b-6857-4956-9b66-da280b7cf3a2's look alike to me. 
    ============================================================================

  • Displaying diff dates using PL/SQL expression for 'display only' item ?

    Hi ,
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    I tried it doing under 'Source ' of item using PL/SQL expression and PL/SQL function body. Not working
    Can someone help ?
    Thanks & Regards
    Umer

    Nice1 wrote:
    declare
    lv_date number;
    begin
    select to_char(sysdate,'D') into lv_date from dual;
    if lv_date=2 then
    :P2_FROM_DATE := to_char(sysdate-1);
    end if;
    end;I tried this under " PL/SQL function body " in "Source " tab of the item P2_FROM_DATE
    When I run this , nothing is displayed corresponding to the item P2_FROM_DATEExactly as expected. This code will only set a value for <tt>P2_FROM_DATE</tt> when run on Mondays in territories where the first day of the week is Sunday, and when run on Tuesdays where Monday is the first day of of the week:
    SQL> var P2_FROM_DATE varchar2(30)
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> select sysdate from dual
    SYSDATE
    Mon 25-JUN-2012
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    Sun 24-JUN-2012
    SQL> alter session set nls_territory='UNITED KINGDOM';
    Session altered.
    SQL> exec :p2_from_date := null
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    SQL>Hence the questions about language above.
    >
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    >
    The coming Monday is 25-JUN-2012.
    Aren't these rules equivalent to "Monday this week, where Monday is the first day of the week"? In which case the PL/SQL Expression you require is:
    trunc(sysdate, 'iw')For example:
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level <= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level &lt;= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.Also note that using the item source properties will only set the <tt>P2_FROM_DATE</tt> in the rendered page, not in session state.

  • I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?

    I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?

    You only need the ODBC driver on each computer. If you are distributing the SQL Toolkit app as an executable and do not install the whole toolkit on each computer, you'll need the SQL Toolkit support files. This is about a dozen files. You can get the list at http://digital.ni.com/public.nsf/websearch/b814be005f9da9258625658700550c75?OpenDocument.

  • Crosstab query using pure SQL only

    Hi all,
    Found a lot of threads on crosstab, but none seems to address what I need. I need to perform crosstab query using pure SQL only & the number of columns are dynamic. From a query, I obtained the below table:
    Name Date Amount
    Alex 2005-06-10 1000
    Alex 2005-06-20 1000
    Alex 2005-07-10 1000
    Alex 2005-07-20 1000
    Alex 2005-08-10 1000
    Alex 2005-08-20 1000
    John 2005-06-10 2000
    John 2005-06-20 2000
    John 2005-07-10 2000
    John 2005-07-20 2000
    John 2005-08-10 2000
    John 2005-08-20 2000
    And I need to transform it into:
    Name 06-2005 07-2005 08-2005
    Alex 2000 2000 2000
    John 4000 4000 4000
    Reason for the columns being dynamic is because they'll be a limit on the date ranges to select the data from. I'd have a lower & upper bound date say June-2005 to August-2005, which explains how I got the data from the above table.
    Please advise.
    Thanks!

    Hi,
    I couldn't resist the intellectual challenge of a pure SQL solution for a pivot table with a dynamic number of columns. As Laurent pointed out, a SQL query can only have a fixed number of columns. You can fake a dynamic number of columns, though, by selecting a single column containing data at fixed positions.
    <br>
    <br>
    If it were me, I'd use a PL/SQL solution, but if you must have a pure SQL solution, here is an admittedly gruesome one. It shows the sum of all EMP salaries per department over a date range defined by start and end date parameters (which I've hardcoded for simplicity). Perhaps some of the techniques demonstrated may help you in your situation.
    <br>
    <br>
    set echo off
    set heading on
    set linesize 100
    <br>
    select version from v$instance ;
    <br>
    set heading off
    <br>
    column sort_order noprint
    column sal_sums format a80
    <br>
    select -- header row
      1        as sort_order,
      'DEPTNO' as DEPTNO ,
      sys_connect_by_path
        ( rpad
            ( to_char(month_column),
              10
          ' | '
        ) as sal_sums
    from
        select
          add_months( first_month, level - 1 ) as month_column
        from
          ( select
              date '1981-01-01' as first_month,
              date '1981-03-01' as last_month,
              months_between( date '1981-03-01', date '1981-01-01' ) + 1 total_months
            from dual
        connect by level < total_months + 1
      ) months
    where
      connect_by_isleaf = 1
    connect by
      month_column = add_months( prior month_column, 1 )
    start with
      month_column = date '1981-01-01'
    union all
    select -- data rows
      2 as sort_order,
      deptno,
      sys_connect_by_path( sum_sal, ' | ' ) sal_sums
    from
      select
        dept_months.deptno,
        dept_months.month_column,
        rpad( to_char( nvl( sum( emp.sal ), 0 ) ), 10 ) sum_sal
      from
          select
            dept.deptno,
            reporting_months.month_column
          from
            dept,
            ( select
                add_months( first_month, level - 1 ) as month_column
              from
                ( select
                    date '1981-01-01' as first_month,
                    date '1981-03-01' as last_month,
                    months_between( date '1981-03-01', date '1981-01-01' ) + 1 total_months
                  from
                    dual
              connect by level < total_months + 1
            ) reporting_months
        ) dept_months,
        emp
      where
        dept_months.deptno = emp.deptno (+) and
        dept_months.month_column = trunc( emp.hiredate (+), 'MONTH' )
      group by
        dept_months.deptno,
        dept_months.month_column
    ) dept_months_sal
    where
      month_column = date '1981-03-01'
    connect by
      deptno = prior deptno and
      month_column = add_months( prior month_column, 1 )
    start with
      month_column = date '1981-01-01'
    order by
      1, 2
    <br>
    VERSION
    10.1.0.3.0
    <br>
    DEPTNO      | 81-01-01   | 81-02-01   | 81-03-01
    10          | 0          | 0          | 0
    20          | 0          | 0          | 0
    30          | 0          | 2850       | 0
    40          | 0          | 0          | 0
    <br>
    Now, if we substitute '1981-03-01' with '1981-06-01', we see 7 columns instead of 4
    <br>
    DEPTNO      | 81-01-01   | 81-02-01   | 81-03-01   | 81-04-01   | 81-05-01   | 81-06-01
    10          | 0          | 0          | 0          | 0          | 0          | 2450
    20          | 0          | 0          | 0          | 2975       | 0          | 0
    30          | 0          | 2850       | 0          | 0          | 2850       | 0
    40          | 0          | 0          | 0          | 0          | 0          | 0
    <br>To understand the solution, start by running the innermost subquery by itself and then work your way outward.

  • Using a SQL Query in an Alert and Matching a String

    I've created an alert in 12.0.4 using a SQL Query and the field that I'm trying to match is a string.  Originally the query returned multiple rows but when the alert still didn't fire, I modified the query WHERE clause to return only one row:
    NAME                                RESPONSE
    Are area lights working?            No
    My expression in the metric is RESPONSE.  In the Monitor I'm matching a string equal to No.  (Do I need double quotes around the matchvalue?  Single quotes?  No quotes?)  The metric is in the 15min scan group, the role is xMII Developers and I'm in that role. The monitor alert string is ' =  '.  Both metric and monitor are active and I've subscribed to the monitor.  Other alerts in the 15min scan group (all based on tag queries) are firing off properly.
    Why is nothing showing up in the Alert Log?
    David Macindoe

    David,
    Did you figure out the answer?  If not, I will try to find someone to address your question.
    Mike

  • Urgent HELP required on forming the Matrix of data using PL/SQL

    Hi All,
    I'm new to this thread and require your urgent help in this regard.
    I've got a requirement for building a 5000 X 5000 matrix using PL/SQL. My original data tables have 5000 rows each and I need to do a correlation analysis using this data and need to store in a physical table and not in-memory. Is this feat achievable using mere PL/SQL? I understand that Oracle DB has a limitation of 1000 columns(but not sure) and hence I'd like to know whether there is any work-around for such scenarios. If not, what are the other alternative method(s) to achieve this feat? Do I need to use any 3rd party tools to get this done? An early reply from the experts is highly appreciated.
    Thanking you all Gurus in advance.
    Rgds
    Sai

    Welcome to OTN!
    I'll get to your quesiton in a moment, but first some welcome information. Many OTN posters consider it impolite to mark threads as "urgent". We are volunteers and have jobs of our own to do without people we don't know making demands. You are brand new and deserve some patience but please understand this. It is very likely before I finish this post someone will complain about the word "urgent" in your subject.
    On to more interesting things :)
    You can do the matrix, but are out of luck with a 5000 x 5000 table because Oracle only allows 1000 columns per table. There are ways to work around this.
    How do do the matrix depends on what you want to do. You can do this different ways. You can create a table beforehand and use PL/SQL or simple SQL to populate it, or use the CREATE TABLE AS syntax to create and populate it in one step if you can get the underlying SQL to work the way you want, something like
    create table my_table as
      select a.*, b.*
        from table1 a, table2 bcan populate a matrix from 2 tables with an intentional cartesian join (the WHERE clause was left out intentionally, provided your data is already in the data base.
    If not you can use a PL/SQL routine to populate the data.
    There are a couple of ways to solve the 1000 column limit. The easiest way might be to have 5 collections of 1000 columns each. A more complicated but more elegant soltion would be to have nested collections, allowing 2 colliections that you can loop through - a collection of collections. Nested collections can be hard to work with. A third way would be to use nested tables in the database but I personally do not like them and the insert, update, and delete statements for nested tables are hard to use.
    I'm not going to give a code example because I am not sure which solution is best for you. If you have further questions post them.

  • Unable to connect to Oracle Database using Oracle Sql developer 2.1.1.64

    Hi Everyone,
    I am searching for some help regarding my problem with Oracle connectivity. I have installed Oracle 11g release 2 on my Windows XP Professional Laptop. For a few days after installation i could connect to the Oracle database with the SYSTEM account using Oracle SQL developer ( installed on the same Laptop) but now i am unable to do so.It gives me this annoying message:
    An error was encountered performing the required operation  Got a minus one from read call .Vendor code 0
    However i am able to connect using Sql Plus by supplying the username SYSTEM and the corresponding password.
    My TNSNAMES .ora file is as follows:
    ORACLE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORACLE)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    My Listener.ora file is as follows:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:D:\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    (SID_DESC =
    (GLOBAL_DBNAME = Oracle)
    (ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
    (SID_NAME = Oracle)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (PROTOCOL_STACK =
    (PRESENTATION = GIOP)
    (SESSION = RAW)
    ADR_BASE_LISTENER = D:\app
    My Sqlnet.ora file is as follows:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    I am new to Oracle and so i need someone in this forum who can help me resolve this problem. Also i even tried connecting to the database using Toad 10.5.0.41. It give me the following error:
    ORA 12537 : TNS Connection closed
    Thanks for your patience and help in advance.
    ---Prashant

    Hello Irian and Sue,
    I can connect to the Oracle database using SQL Plus. Now when i TNSPING ORACLE from command line i get the following message :
    Used parameter files:
    D:\app\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =localhost
    *)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORACLE)))*
    TNS-12537: TNS:connection closed
    Thanks for your response to my initial post.Do u have any other methods to resolve this?

  • Using a SQL for Oracle in Microsoft Excel Query

    I am having the most difficult time (in fact, I can't get it to work) trying to use an SQL I created in Toad for Oracle. It works fine in Toad for Oracle...gives me all the data I need. I am trying to use it in Excel for users that don't know SQL or Oracle so they can use the query to extract data they need for Charts, Graphs, etc.
    Here is the SQL code from Toad for Oracle:
    /* Formatted on 2006/09/22 11:42 (Formatter Plus v4.8.6) */
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )Can someone help me...maybe point out what I'm doing wrong.
    Note: I also tried creating this query in Microsoft Query (the simple way) and when I first create it...it works...But then if I go back in to edit the query, and refresh the query or try to Return data to Excel, it gives me a ORA-00936 error message.
    Why it works when I first create the query in Excel, I don't know. But I have to validate the queries I'm creating (SQL or not) and I can't validate it if every time I go into edit the query (which may have to happen; that's why I have to fix this before I can submit my validation).
    Anyway, any help would be greatly appreciated.

    Okay, I know I'm replying to my own threads here...but I want to add a little bit more information again.
    I was successful in figuring out that changing the :criteria to a ? worked.
    I tested this on 1 criteria at a time. Adding one more scenario ? at at time.
    It only worked up until about 3 scenarios of each criteria.
    Then when I refreshed the query in Microsoft Excel Query, I got an "out of memory" error, and then it ended up just erasing the SQL I had been using.
    Here's the SQL I had where it gave me this error. Am I possibly just making Excel work too hard? It just doesn't make sense because Toad for Oracle handled it in like 4 seconds. Which brings me back to an intial question I had. Can Excel use Toad for Oracle somehow?
    Here's the code:
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
    AND (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= ?
                 AND a_compl_summary.entry_date <= ?
            AND (   a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
            AND (a_compl_summary.region = ?)
            AND (   a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
            AND (a_compl_summary.complaint = ?)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
               ))

  • Performance of AQ when using callback procedure (using PL/SQL notification)

    I am enqueueing XMLType in AQ.XML file is large in size.NOw I want to dequeue the AQ using PL/SQL notification(using callback procedure which will call DBMS_AQ.DEQUEUE to dequeue the AQ and process the XML.After fetching the data from XML ,I want to store these data in another table columns).
    Please suggest,In this case which approach would be better to dequeue the AQ table :
    1.PL/SQL notification(using callback procedure)
    OR
    2.Scheduling the call to DBMS_AQ.DEQUEUE to dequeue the AQ table
    What would be the impact on performance of above two approaches?

    Hi,
    The question of performance is not down to the technique one employes to enqueue/dequeue, but at a basic level, is relative to the number of messages!
    The is what the Oracle documentation states:
    >
    When persistent messages are enqueued, they are stored in database tables. The performance characteristics of queue operations on persistent messages are similar to underlying database operations. The code path of an enqueue operation is comparable to SELECT and INSERT into a multicolumn queue table with three index-organized tables. The code path of a dequeue operation is comparable to SELECT, DELETE, and UPDATE operations on similar tables.
    >
    So, if anything, the dequeue is a fraction more time & resource consuming. However, it is only a "fraction". You could always add multiple subscribers to dequeue if you want!
    You could ofcourse choose to have non-persistent messages if your application does not need the kind of fault-tolerance that persistent messaging offers, which speed things up, but only a bit, so don't get too excited about it!
    There are other things to consider however, which you may wish to read up on before getting bogged down on whether you should use notification or the scheduler:
    - Is your system clustered?
    - Concurrency on a single queue (i.e. multiple enqueues/dequeues, but single queue)
    - Propogation latency issues
    Read about these and much more at:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/perform.htm
    Finally, whether you pl/sql notification or not and whether you use dbms_scheduler is down to your application requirements!
    P;

  • Use PL/SQL procedure to guard against malformed CSV files before upload

    Hi all,
    In my CSV upload utility, I've implemented error checking procedures, but they are invoked only AFTER data has been uploaded to temp table. This doesn't catch the following sample scenarios:
    1. The CSV is malformed, with some rows shifted due to fields and separators missing here and there.
    2. User has chosen a wrong CSV to upload (most likely number of fields mismatch)
    I'm wondering if it is a good idea to have procedure to read in the CSV, scan each line, count the number of fields (null fields but with delimiters showing the field exist is ok) for each record. If every single record matches the required number of fields for that table, then the CSV is ok, and the insert from external table to temp table is allow. This will ensure at least the CSV file has a valid matrix size for the target table, but rest of error checking is left until after temp table is populated.
    One of my concerns is, I specify "missing field values are null" in the external table parameters, which is necessary since not all fields are required. Does this specification causes a row with missing trailing separators still considered valid? If so then the stored procedure must be programmed to omit such a case.
    What do you think? Many thanks.

    Hi, Cuauhtemoc Amox
    Thank you for your advice. I have set web adi  using PL SQL interface.
    I have decided to go futher
    i have a procedure like that
    procedure delete_old_data ( p_id in number, p_description in varchar2)
    as
    begin
                   begin
                   if g_flag ='N' then
                   delete from xx_test;
                    g_flag='Y';
                    else null;
                    end if;
                    end;
    insert into xx_test (p_id,p_descriptiom);
    end;
    G_FLAG is a global variable with default value ='N'  in my package. When web_adi upload
    first row from excel sheet, then procedure delete all data from table and change g_flag to 'Y'.
    All other rows uploads succesfully; it  works fine.
    But when user change data in excel sheet and try to upload second time. DELETE_OLD_DATA procedure doesnt work in proper way.
    I have found what problem is. when user use same template and try to upload data several times there is same SESSION_ID in database.
    i.e. g_flag ='Y' when user try to upload second time. But when user log off and create template again it is work properly.
    My question is: How i can different upload attempts? May be there is some id for each upload proccess.
    if i can use this ID in my procedure user will have opportunity to use same template.
    Thank you

  • How to use PL/SQL table

    Hi all,
    can you guys suggest me how can I use pl/sql tables for the below query to incresing the performance.
    DECLARE
        TYPE cur_typ IS REF CURSOR;
        c           cur_typ;
        total_val varchar2(1000);
        sql_stmt varchar2(1000);
        freeform_name NUMBER;
        freeform_id NUMBER;
        imgname_rec EMC_FTW_PREVA.EMC_Image_C_Mungo%rowtype;
        imgval_rec  EMC_FTW_PREVA.EMC_Content_C_Mungo%rowtype;
        CURSOR imgname_cur IS
            select * from EMC_FTW_PREVA.EMC_Image_C_Mungo
            where cs_ownerid in (
                        select id from EMC_FTW_PREVA.EMC_Image_C
                        where updateddate > '01-JUN-13'
                        and path is not null
                        and createddate != updateddate)
            and cs_attrid = (select id from EMC_FTW_PREVA.EMC_ATTRIBUTE where name = 'Image_Upload');
    BEGIN
        OPEN imgname_cur;
        LOOP
          FETCH imgname_cur INTO imgname_rec;
          EXIT WHEN imgname_cur%NOTFOUND;
          total_val := 'EMC_Image_C_' || imgname_rec.cs_ownerid;
          sql_stmt := 'SELECT instr(textvalue,''' || total_val || '''), cs_ownerid FROM EMC_FTW_PREVA.EMC_Content_C_Mungo a Where cs_attrid = (select id from EMC_FTW_PREVA.EMC_ATTRIBUTE where name = ' || '''' || 'Body_freeform' || '''' || ')';
            OPEN c FOR sql_stmt;
            LOOP
              FETCH c INTO freeform_id,freeform_name;
              EXIT WHEN c%NOTFOUND;
                                      IF freeform_id > 0 THEN
                dbms_output.put_line (imgname_rec.cs_ownerid || ',' || total_val || ',' || freeform_id || ',' || freeform_name);
                                      END IF;
            END LOOP;
            CLOSE c;     
       END LOOP;
       CLOSE imgname_cur;
    END;
    Thanks in Advance.

    can you guys suggest me how can I use pl/sql tables for the below query to incresing the performance.
    There would be absolutely no point at all in improving the performance of code that has NO benefit.
    The only result of executing that code is to possibly produce some lines of output AFTER the entire procedure if finished:
    dbms_output.put_line (imgname_rec.cs_ownerid || ',' || total_val || ',' || freeform_id || ',' || freeform_name);
    So first you need to explain:
    1. what PROBLEM you are trying to solve?
    2. why you are trying to use PL/SQL code to solve it.
    3. why are you using 'slow by slow' (row by row) processing and then, for each row, opening a new cursor to query more data?
    You should be using a single query rather than two nested cursors. But that begs the question of what the code is even supposed to be doing since the only output is going to a memory buffer.

  • Get site id in WCS jsp without using ics.SQL

    Hi,
    Is there a way i can get siteId of my current site in JSP without using ics.SQL tags and getting it from publication table
    We are trying to implemet a lucene search for loading assets present in current site only.
    Thanks in advance for your help.

    Use the below code to get it.
    <publication:load name="thisPub" field="name" value='<%=ics.GetVar("site") %>'/>
    <publication:get name="thisPub" field="id" output="thisPubID"/>
    Dont forget to import publication.tld
    Regards,
    Ravi G

  • Hi experts, how to use open sql to read data from one " maintenance view"?

    i want to use this part of data within report ,so how to use open sql statement to read data from one " maintenance view"?

    Hi
    You can't use OPEN SQl statements to fetch data from maintenance view
    You have to use only Database views
    see the different types of views and the difference
    The followings are different types of views:
    - Database View (SE11)
    Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
    In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
    - Help View ( SE54)
    Help views are used to output additional information when the online help system is called.
    When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
    - Projection View
    Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
    A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
    - Maintenance View ( SE54 )
    Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
    Please have a look at below link. It will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
    for more detailed info look on:
    http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
    Reward points for useful Answers
    Regards
    Anji

  • Future support for using PL/SQL core business logic with ADF BC

    We want to migrate our large Forms client/server (6i) application to ADF, possibly using a migration tool like Ciphersoft Exodus.
    One scenario could be to use ADF BC and ADF-Faces or a different JSF-Implementation for presentation and business layer but keep our heavy PL/SQL-businesslogic inside the Oracle database in packages, triggers, functions and procedures.
    This scenario could be chosen due to the huge amount of interconnected logic inside the database (10 years of development; no technical components; any package may access any table and more of this kind of dependencies). The business logic nowadays held in Forms client will be moved mainly into the database as a prerequisite to this scenario.
    Choosing this "keep-logic-in-DB"-scenario we need a good support by ADF BC to do so. We know and prototyped that it is possible to call some PL/SQL via JDBC from ADF BC and it is possible to use stored procedure calls for standard business entity data access (ins, del, upd, ..). But this does not solve our problems. We want to reuse core business logic coded in PL/SQL. This is much more than change the ADF standard behavior for an update with an own PL/SQL-call.
    Now my question:
    Will there be a kind of sophisticated support to use ADF BC in combination with database-kept logic?
    If so, when will this happen and how will the common problems of transactional state inside the database and inside the ADF BC be solved? Any plans or ideas yet?
    Many other clients do have similar applications built in Forms and PL/SQL and would be glad to hear about a path of direction.
    I've read the technical article 'understanding the ADF BC state management feature' which you have contributed to. One current limitation is pointed out there: Using PL/SQL with ADF BC limits ADF AM pooling to 'restricted level' which reduces scalability.
    Are you aware of additional main problems/tasks to solve when using PL/SQL heavily with ADF BC, which we have to think about?
    Thank you for any response.
    Ingmar

    My main problem is two 'concurrent' areas holding state in an application system based on DB-stored PL/SQL-logic in combination with ADF BC.
    For a new System everything can be made ok:
    Sure, it is possible to build a new system with the business logic included in ADF BC only. All long-living state will be handled in the BC layer ( including support for UnitsOfWork longer than the webside short HTTP-requests and HTTP-sessions and longer than the database transactions.
    For an old system these problems arise:
    1. DB data changes not reflected in BC layer:
    Our PL/SQL-logic changes data in tables without notifying the ADF BC layer (and its cache). To keep the data in ADF BC entity objects identical to the changed database content a synchronization is needed. BC does not know which part of the application data has been changed because it has not initiated the changes through its entity objects. Therefore a full refresh is needed. In a Forms4GL environment the behavior is similar: We do frequently requeries of all relevant (base)tables after calling database stored logic to be sure to get the changed data to display and to operate on it.
    -> Reengineering of the PL/SQL-logic to make the ADF BC layer aware of the changes is a big effort (notifying BC about any change)
    2. longer living database transactions
    Our PL/SQL-logic in some areas makes use of lengthy database transactions. The technical DB-transaction is similar to the UnitOfWork. If we call this existing logic from ADF BC, database state is produced which will not be DB-committed in the same cycle.
    This reduces scalability of ADF BC AM pooling.
    Example:
    a) Call a DB-stored logic to check if some business data is consistent and prepare some data for versioning. This starts a DB-transaction but does not commit it.
    b) Control is handed back to the user interface. Successful result of step a) is displayed
    c) User now executes the versioning operation
    d) Call another DB-stored logic to execute the versioning. DB-transaction is still open
    e) Business layer commits the transaction automatically after successful finishing step d). Otherwise everything from a) to e) is rolled back.
    -> redesign of this behavior (= cutting the 1to1 relation between LogicalUnitOfWork and the technicalDatabaseTransaction is a big effort due to the big amount of code.

Maybe you are looking for

  • How to transfer files on the same computer

    After setting up new Mac which has OS X Lion installed, I setup my mail, new software etc. in my user account. I then transferred my PC files to Mac using Migration assistant and as its supposed to do, it transferedr these files to a new user account

  • Bar coding with batch management

    Hi, I have a scenario like: I have chemicals as a raw materials which need to be processed to make one type of medicine. These chemiacals go into the mixing unit which is automatic. Now requirement is like in a mixing unit there are many bins in whic

  • I can't select lines in a pdf ? illustrator has already selected a series of blue rectangles that prevent me from select?

    Hi there, I'm new to illustrator I have been using it to change line weights in pdf's. however the last time i imported a pdf it opens with a series of blue selection boxes which prevent me from selecting individual lines. any ideas? any advice would

  • DVI connected external monitor now having mouse troubles

    Hi Everyone, I'm new. I recently bought a 27inch imac and a DVI adapter to hook up a second monitor. When the second monitor is plugged in and on everything is ok. When the second monitor is unplugged everything is ok. When the second monitor is plug

  • How to create JNDI for Oracle Apps Adapter

    I have created a data-source(jdbc/testds) and connection pool which connects to apps schema in Weblogic console. Then i go to Deployments-> Oracle Apps Adapter -> Configuration -> Outbound Connection Pools. In the Outbound Connection Pools table i ex