How to test issue with accessing tables over a DB link?

Hey all,
Using 3.1.2 on XE, I have a little app. The database schema for this app only contains views to the actual tables, which happen to reside over a database link in a 10.1.0.5.0 DB.
I ran across an issue where a filter I made on a form refused to work (see [this ApEx thread| http://forums.oracle.com/forums/message.jspa?messageID=3178959] ). I verified that the issue only happens when the view points to a table across a DB link by recreating the table in the local DB and pointing the view to it. When I do this, the filter works fine. When I change the view back to use the remote table, it fails. And it only fails in the filter -- every other report and every other tool accessing the remote table via the view works fine.
Anyone know how I can troubleshoot this? For kicks, I also tried using a 10.2.0.3.0 DB for the remote link, but with the same results.
TIA,
Rich
Edited by: socpres on Mar 2, 2009 3:44 PM
Accidental save...

ittichai wrote:
Rich,
I searched metalink for your issue. This may be a bug in 3.1 which will be fixed in 4.0. Please see Doc ID 740581.1 Database Link Tables Do NoT Show Up In Table Drop Down List In Apex. There is a workaround mentioned in the document.
I'm not sure why I never thought of searching MetaLink, but thanks for the pointer! It doesn't match my circumstances, however. The Bug smells like a view not being queried in the APEX development tool itself -- i.e. the IDE's coding needs changing, not necessarily those apps created with the IDE.
I'm working on getting you access to my hosted app...
Thanks,
Rich

Similar Messages

  • Issue with  OBIEE ROW_NUMBER() OVER (PARTITION BY)

    Hi All,
    I am facing some issue with the ROW_NUMBER() OVER (PARTITION BY function in the query that is being generated. I am currently on version 11.1.1.6. I have 1 FACT and 1 Dimension table. Within the dimension I have create a level based hierarchy namely REGION -> GROUP - DIVISION etc. Now the problem is that the OBIEE automatically applies *"ROW_NUMBER() OVER (PARTITION BY T9.PRODUCT_TYPE_DESC, T130.DIVISION_DESC, T130.REGION_DESC ORDER BY T9.PRODUCT_TYPE_DESC ASC, T130.DIVISION_DESC ASC, T130.REGION_DESC ASC) "
    to the query where in it is not required at it returns with 3 different row numbers. If i remove this line and the where clause I am able to get correct results however its not working whatever I do in the RPD. Please advise.
    WITH
    SAWITH0 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6
    from
    (select sum(T157.PL_GRAND_TOTAL) as c1,
    sum(T157.TRANSACTION_AMT) as c2,
    T130.DIVISION_DESC as c3,
    T130.REGION_DESC as c4,
    T130.GROUP_DESC as c5,
    T9.PRODUCT_TYPE_DESC as c6,
    ROW_NUMBER() OVER (PARTITION BY T9.PRODUCT_TYPE_DESC, T130.DIVISION_DESC, T130.REGION_DESC ORDER BY T9.PRODUCT_TYPE_DESC ASC, T130.DIVISION_DESC ASC, T130.REGION_DESC ASC) as c7
    from
    DIM_ALL_MODULES_REF T9,
    DIM_MIS_TREE_REF T130,
    DIM_DATE_SERIES T123,
    FCT_ALL_MODULES_TRANS T157
    where ( T9.SGK_MIS_ID = T130.SGK_MIS_ID and T9.SGK_MODULE_ID = T157.SGK_MODULE_ID and T123.SGK_TIME_ID = T157.SGK_TIME_ID and T123.TRANS_DATE between TO_DATE('2011-01-01 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') and TO_DATE('2011-03-31 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') )
    group by T9.PRODUCT_TYPE_DESC, T130.DIVISION_DESC, T130.GROUP_DESC, T130.REGION_DESC
    ) D1
    where ( D1.c7 = 1 ) ),
    SACOMMON42934 AS (select T130.DIVISION_DESC as c2,
    T130.REGION_DESC as c3,
    T130.GROUP_DESC as c4,
    T9.PRODUCT_TYPE_DESC as c5,
    sum(T258.BEG_NMK_EQ_COST_AMT) as c6,
    T123.TRANS_DATE as c7,
    sum(T258.END_NMK_EQ_COST_AMT) as c8
    from
    DIM_ALL_MODULES_REF T9,
    DIM_MIS_TREE_REF T130,
    DIM_DATE_SERIES T123,
    FCT_MODULES_BEG_END_BAL T258
    where ( T123.SGK_TIME_ID = T258.SGK_TIME_ID and T9.SGK_MIS_ID = T130.SGK_MIS_ID and T9.SGK_MODULE_ID = T258.SGK_MODULE_ID and T258.PRODUCT_TYPE_ID = 2 and T123.TRANS_DATE between TO_DATE('2011-01-01 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') and TO_DATE('2011-03-31 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') )
    group by T9.PRODUCT_TYPE_DESC, T123.TRANS_DATE, T130.DIVISION_DESC, T130.GROUP_DESC, T130.REGION_DESC),

    Hi Dhar,
    Thanks for replying back. But the ROW_NUMBER thing is inserted with the "WITH SUPPORTED" clause only but that is something which are the default settings. However, I notice that ROW_NUMBER() OVER (PARTITION BY) lines are erratic and are not consistent. So sometimes the drill works properly when no ROW_NUMBER() OVER (PARTITION BY) is generated but other times data is wrong. I am not sure why this behaviour is erratic even though I select the same values.
    This is surely a product problem as the condition where c7 = 1 filters the result and does not take into account all values.
    Even when I do not use WITH_SUPPORTED clause the stitch does not happen properly. Please advice if this is ever going to be by Oracle or any work around for this?
    Thanks

  • Issues with accessing HD on Time Capsule

    I have a Windows 7 32 bit machine that I just built. I have a Windows XP system and a Mac Book Pro running Snow leopard. My XP and Mac are able to access the HD of my Time Capsule. My Windows 7 is having issues logging into the Time Capsule HD. When trying to log into the base station using the Airport Base Station Utility I get a message stating "Unknown user, incorrect password, or login is disabled. Please retypre the login information or contact the disk's administrator (86)." I have the AirPort Utility installed on my Windows 7 and am able to log into the settings to modify the settings of the Time Capsule. Does anyone have any insight as to how to assist me?

    Note: Mac 3 had a single user on it, my son. He was the admin. I created a new non-admin acct and moved all his stuff there (Not sure I did it the right way so it took a long time.). Now I am admin on that Mac. Not sure if that is relevant here (leading to the problem identified above) but thought I would mention it. 
    Thanks in advance for your help.
    The fact that you cannot access the backup now only on this Mac does suggest this is part of the issue. Did you do this before or after the issue with access?
    Permissions can be pretty tricky things.. certainly to do backups or to retrieve them from an existing backup created with different user permissions might be a mess.. Pondini is perhaps the only one who can tell you the ins and outs of that.
    On the more general note.. lots of people are having issues with USB drive on the TC from Lion.. for many it stops working forever the moment the disk spins down from a reboot.. making it useless.
    But it is dog slow for everyone.. The reality is USB is less than half its native speed on the TC cf on the computer.. and it wasn't that fast to begin with.
    Plug the hard drive directly into the computer and mount the sparsebundle and see if the TM then can access it.. but you might need to use your admin login not your son's.
    Personally if the TC disk is not big enough.. replace the TC with a larger disk version.. or the disk in the present one.. do not use disks hanging off TC. It has enough reliability issues without adding to them.

  • How to make report with access 2010 from SharePoint Discussion lists 2013

    HI,
    I want to make an access report from SharePoint Discussion lists 2013. When i open the list with access, the body of the list is in HTML format in access. Also if i reply something to one subject in the discussion, the reply is not mapped to that subject
    but instead it is shown as a separate entry in the database.
    Anyone can please help?
    SAN
    Santhiya
    Santhiya

    Hi Santhiya,
    I have seen a similar post from you, my understanding is that you wonder that the reply is mapped to the related subject. You can take a look at Daniel's reply in the following thread:
    http://social.technet.microsoft.com/Forums/en-US/dfb5bcb9-0076-412a-b34f-46aa9cfba876/how-to-make-report-with-access-2010-from-sharepoint-discussion-lists-2013?forum=sharepointgeneral
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Hello Gurus..... ISSUE with child Table update

    I have an issue with child table update
    I have created a GTC with one parent table and two child tables. I'm able to update the parent table and the values are found in db, but the ISSUE is the child Table values are not updating the db.
    please give me a solution
    regards
    Srikanth

    If you are keeping referential integrity in the database, not in the application, it is easy to find the child and parent tables. Here is a quick and dirty query. You can join this to dba_cons_columns to find out on which columns the referential constraints are defined. This lists all child-parent table including SYS and SYSTEM users. You can run this for specific users of course.
    select cons1.owner child_owner,cons1.table_name child_table,
    cons2.owner parent_owner,cons2.table_name parent_table
    from dba_constraints cons1,dba_constraints cons2
    where cons1.constraint_type='R'
    and cons1.r_constraint_name=cons2.constraint_name;

  • Issues with Advance Table Add Row New Row not work in some scenarios.

    Hi,
    Wondering if there's any issue with Advanced Tables where it does not create any rows. I don't know if anyone tried this or not. I have one OA Page with Advanced Table and a button that when clicked open a new OA Page in a POP-UP Window. The pop-up page conatins one textbox where u enter a data and this gets saved in one of the VO's transient attribute. Now on the ase page if you don't click a button to open a pop-up page you can Add New Rows in the Advanced Table by clicking Add Row Button. But as soon as you open a popup window and close it Add New Rows button doesn't work and is not creating any new rows. Basically page stops working. Both the POP-UP and the base page share the same AM but have different controllers.
    POP-UP page is a custom page that I open giving the Destination URI value in the button item and target frame _blank.
    I even tried creating rows programmatically for Advance Table but this too doesn't work once u open a pop-up. Also I have used pageContext.putTransactionValue in the pop-up page and am checking and removing this in the base page.
    Any help is appreciated.
    Thanks

    anyone

  • Having an issue with passing the text of a link to a session variable.

    I am having an issue with passing the text from a link to a session variable. I am adding this html as a literal for each item in the list that i have populated with a query.
    List<Literal> lit = new List<Literal>();
    for (int i = 0; i < posts.Count; i+=4)
    Literal someLit = new Literal();
    someLit.Text=
    @"<div class='row'>" +
    "<div class='col-md-12'>" +
    "<div class='panel'>" +
    " <div class='panel-body'>" +
    " <!--/stories-->" +
    " <div class='row'> " +
    " <br>" +
    "<div class='col-md-2 col-sm-3 text-center' id='javascript'> <h3>" +
    " <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>" +
    "</h3>" +
    " </div>" +
    " <div class='col-md-10 col-sm-9'>" +
    "<h3><a href='Thread.aspx' runat='server' onserverclick='MyFuncion_Click'> " + posts[i] + " </a></h3>" +
    " <div class='row'>" +
    " <div class='col-xs-9'> " +
    posts[i + 1] +
    " </div>" +
    "<div class='col-xs-3'></div>" +
    posts[i + 2] +
    " </div>" +
    "<br><br>" +
    " </div>" +
    " </div>" +
    " <!--/stories-->" +
    " </div>" +
    " </div>" +
    " </div><!--/col-12-->" +
    " </div>" +
    "</div>";
    lit.Add(someLit);
    for(int i=0; i<lit.Count; i++)
    this.Controls.Add(lit[i]);
    I use one of the list positions as the text for a link in two different spots. For now, lets only talk about the line:
    <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>
    Since I am generating these controls at pageLoad, I can't make them <asp:Linkbutton>s. And since they are anchor elements, I don't have access to an onCommand attribute or onservercommand attribute.
    All I want to do is access the content from inside the specific link tags that I generate on link click and set it as a session variable. That's what I would like my UserProfile_Click function to do. I cant commandargs it in like i can with a linkbutton's
    OnCommnad attribute, however.
    My fear is that the onserverclick attribute resolves so something else on pageLoad normally and since I am generating it the way I am similar to the way a <asp:linkButton> resolves to a generated JavaScript.
    Any help?

    @Brunellus
    For questions related to ASP.NET use the ASP.NET forum http://forums.asp.net     
    You should get more, better and faster answers on the other forum.  Thanks, ahead of time.
    Best Regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a ms-access table with java?

    hi all
    i've my application and i want to add the capability to creat an access file (.mdb) and then, via SQL , create a table, with many columns of many types, and with a primary key too.
    i know that it's also an SQL problem, but i'm searching for it everywhere
    thanx for your reply
    sandro

    Hi,
    It would have been much better if you had specified your development environment- the database driver class depends on which environment you are working with. Forexample, if you are working with vj++6 you can make use of the com.ms.jdbc.odbc.JdbcOdbcDriver class. If you are using IBM's Visual Age for Java3.5 you can find the sun.jdbc.odbc.JdbcOdbcDriver. Oneway or another you should have the .class for jdbc-odbc(usu they have the form: xxx:jdbc:odbc:JdbcOdbcDriver). Check all the packages that are available in your development environment that have the form xxx.jdbc.odbc.JdbcOdbcDriver.(And not clear what you know and what you don't - so I start from the very elementary steps)
    Anyways, What you have to know is that it is not possible to create databases (e.g. .mdb) directly from a Java application(as far as I know). What is possible is to create new tables inside an already created database and process queries based on those tables.In short what I am saying is : you need to have a DSN before writing applications that create tables.
    Follow the following steps to create DSN(for win2000):
    1)Go to the control panel and click the 'administrative tools'
    2)In the 'administrative tools' click to open ODBC(data sources)
    3)Click the 'add' button and choose 'Microsoft Access driver'
    4)In the DSN text field enter the dsn (e.g., Test)
    5)If you want to create a table in an already existing database choose select and select one. However, if you want to create a new database click 'create' and enter a name for your database(e.g. ExampleDB.mdb). If you do this successfully it will issue a successfull operation message.
    6)Click advanced and enter the login name(e.g. Albert) and password(e.g. mxvdk) for the database
    7)Click 'ok's to finish the operation.
    After the above three operations what you will have is an empty database(with no tables) named "ExampleDB.mdb" in the directory you specified.
    Now, you can write a java application that creates a table inside the database "ExampleDB.mdb".
    Check this out:
    import java.sql.*;
    public class Class1{
    public Class1(){
    String userName = "Albert";
    String password = "mxvdk";
    String dsn = "Test";
    String databaseURL = "jdbc:odbc:"+dsn;
    //This is just an sql table creating statement- have nothing to do with java
    String sqlCreateStmt = "CREATE TABLE StudentTable" +
    "(StudentID varchar(32) PRIMARY KEY," +
    "name varchar(30)," +
    "age int)";
         try{
         Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
         }catch(ClassNotFoundException eCNF){
              System.err.println("ClassNotFoundException:");
              System.err.println(eCNF.getMessage());
         try{
         con = DriverManager.getConnection(databaseURL,userName,password);
         stmt = con.createStatement();
         stmt.executeUpdate(sqlCreateStmt);
         }catch(SQLException e){
    System.err.println("SQLException:");
    e.printStackTrace();
         //insert one sample data
    insertSampleData();
    private void insertSampleData(){
         String sampleStudentID = "scr-342-tch";
         String sampleStudentName = "Tom James";
         int sampleStudentAge = 24;
    //This is just an sql table updating statement- have nothing to do with java
         String sqlUpdateStmt = "INSERT INTO StudentTable VALUES ('"+
                             sampleStudentID+"','"+
                             sampleStudentName+"',"+
                             sampleStudentAge+")";
         try{
              stmt.executeUpdate(sqlUpdateStmt);
              }catch(SQLException e){
              System.err.println("SQLException:");
              e.printStackTrace();
    public static void main(String[] args){
    new Class1();
    private Connection con;
    private Statement stmt;
    //This program runs perfectly in my VJ++6.0 (console application mode) and also in my IBM's
    //visual Age for Java3.5 (with sun.jdbc.odbc.JdbcOdbcDriver as my database driver)
    //If you are developing in another development environment, what you need to change is the
    //"com.ms.jdbc.odbc.JdbcOdbcDriver" in Class.forName("com...") stmt.
    //If you run this program more than once, it will issue 'tableAlreadyExists' message
    If you still experience the problem, pls be specific and repost!

  • Performance issues with pipelined table functions

    I am testing pipelined table functions to be able to re-use the <font face="courier">base_query</font> function. Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? The <font face="courier">processor</font> function is from [url http://www.oracle-developer.net/display.php?id=429]improving performance with pipelined table functions .
    Edit: The underlying query returns 500,000 rows in about 3 minutes. So there are are no performance issues with the query itself.
    Many thanks in advance.
    CREATE OR REPLACE PACKAGE pipeline_example
    IS
       TYPE resultset_typ IS REF CURSOR;
       TYPE row_typ IS RECORD (colC VARCHAR2(200), colD VARCHAR2(200), colE VARCHAR2(200));
       TYPE table_typ IS TABLE OF row_typ;
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ;
       c_default_limit   CONSTANT PLS_INTEGER := 100;  
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY);
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ);
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ);
    END pipeline_example;
    CREATE OR REPLACE PACKAGE BODY pipeline_example
    IS
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ
       IS
          o_resultset   resultset_typ;
       BEGIN
          OPEN o_resultset FOR
             SELECT colC, colD, colE
               FROM some_table
              WHERE colA = ArgA AND colB = argB;
          RETURN o_resultset;
       END base_query;
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY)
       IS
          aa_source_data   table_typ;-- := table_typ ();
       BEGIN
          LOOP
             FETCH p_source_data
             BULK COLLECT INTO aa_source_data
             LIMIT p_limit_size;
             EXIT WHEN aa_source_data.COUNT = 0;
             /* Process the batch of (p_limit_size) records... */
             FOR i IN 1 .. aa_source_data.COUNT
             LOOP
                PIPE ROW (aa_source_data (i));
             END LOOP;
          END LOOP;
          CLOSE p_source_data;
          RETURN;
       END processor;
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT /*+ PARALLEL(t, 5) */ colC,
                      SUM (CASE WHEN colD > colE AND colE != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD != '0' THEN '1' END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM TABLE (processor (base_query (argA, argB),100)) t
             GROUP BY colC
             ORDER BY colC
       END with_pipeline;
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT colC,
                      SUM (CASE WHEN colD > colE AND colE  != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD  != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD  != '0' THEN 1 END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM (SELECT colC, colD, colE
                         FROM some_table
                        WHERE colA = ArgA AND colB = argB)
             GROUP BY colC
             ORDER BY colC;
       END no_pipeline;
    END pipeline_example;
    ALTER PACKAGE pipeline_example COMPILE;Edited by: Earthlink on Nov 14, 2010 9:47 AM
    Edited by: Earthlink on Nov 14, 2010 11:31 AM
    Edited by: Earthlink on Nov 14, 2010 11:32 AM
    Edited by: Earthlink on Nov 20, 2010 12:04 PM
    Edited by: Earthlink on Nov 20, 2010 12:54 PM

    Earthlink wrote:
    Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? Well, we're missing a lot here.
    Like:
    - a database version
    - how did you test
    - what data do you have, how is it distributed, indexed
    and so on.
    If you want to find out what's going on then use a TRACE with wait events.
    All nessecary steps are explained in these threads:
    HOW TO: Post a SQL statement tuning request - template posting
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    Another nice one is RUNSTATS:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551378329289980701

  • Insert performance issue with Partitioned Table.....

    Hi All,
    I have a performance issue during with a table which is partitioned. without table being partitioned
    it ran in less time but after partition it took more than double.
    1) The table was created initially without any partition and the below insert took only 27 minuts.
    Total Rec Inserted :- 2424233
    PL/SQL procedure successfully completed.
    Elapsed: 00:27:35.20
    2) Now I re-created the table with partition(range yearly - below) and the same insert took 59 minuts.
    Is there anyway i can achive the better performance during insert on this partitioned table?
    [ similerly, I have another table with 50 Million records and the insert took 10 hrs without partition.
    with partitioning the table, it took 18 hours... ]
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4195045590
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 643K| 34M| | 12917 (3)| 00:02:36 |
    |* 1 | HASH JOIN | | 643K| 34M| 2112K| 12917 (3)| 00:02:36 |
    | 2 | VIEW | index$_join$_001 | 69534 | 1290K| | 529 (3)| 00:00:07 |
    |* 3 | HASH JOIN | | | | | | |
    | 4 | INDEX FAST FULL SCAN| PK_ACCOUNT_MASTER_BASE | 69534 | 1290K| | 181 (3)| 00:00
    | 5 | INDEX FAST FULL SCAN| ACCOUNT_MASTER_BASE_IDX2 | 69534 | 1290K| | 474 (2)| 00:00
    PLAN_TABLE_OUTPUT
    | 6 | TABLE ACCESS FULL | TB_SISADMIN_BALANCE | 2424K| 87M| | 6413 (4)| 00:01:17 |
    Predicate Information (identified by operation id):
    1 - access("A"."VENDOR_ACCT_NBR"=SUBSTR("B"."ACCOUNT_NO",1,8) AND
    "A"."VENDOR_CD"="B"."COMPANY_NO")
    3 - access(ROWID=ROWID)
    Open C1;
    Loop
    Fetch C1 Bulk Collect Into C_Rectype Limit 10000;
    Forall I In 1..C_Rectype.Count
    Insert test
         col1,col2,col3)
    Values
         val1, val2,val3);
    V_Rec := V_Rec + Nvl(C_Rectype.Count,0);
    Commit;
    Exit When C_Rectype.Count = 0;
    C_Rectype.delete;
    End Loop;
    End;
    Total Rec Inserted :- 2424233
    PL/SQL procedure successfully completed.
    Elapsed: 00:51:01.22
    Edited by: user520824 on Jul 16, 2010 9:16 AM

    I'm concerned about the view in step 2 and the index join in step 3. A composite index with both columns might eliminate the index join and result in fewer read operations.
    If you know which partition the data is going into beforehand you can save a little bit of processing by specifying the partition (which may not be a scalable long-term solution) in the insert - I'm not 100% sure you can do this on inserts but I know you can on selects.
    The APPEND hint won't help the way you are using it - the VALUES clause in an insert makes it be ignored. Where it is effective and should help you is if you can do the insert in one query - insert into/select from. If you are using the loop to avoid filling up undo/rollback you can use a bulk collect to batch the selects and commit accordingly - but don't commit more often than you have to because more frequent commits slow transactions down.
    I don't think there is a nologging hint :)
    So, try something like
    insert /*+ hints */ into ...
    Select
         A.Ing_Acct_Nbr, currency_Symbol,
         Balance_Date,     Company_No,
         Substr(Account_No,1,8) Account_No,
         Substr(Account_No,9,1) Typ_Cd ,
         Substr(Account_No,10,1) Chk_Cd,
         Td_Balance,     Sd_Balance,
         Sysdate,     'Sisadmin'
    From Ideaal_Cons.Tb_Account_Master_Base A,
         Ideaal_Staging.Tb_Sisadmin_Balance B
    Where A.Vendor_Acct_Nbr = Substr(B.Account_No,1,8)
       And A.Vendor_Cd = b.company_no
          ;Edited by: riedelme on Jul 16, 2010 7:42 AM

  • Performance issue with MSEG table

    Hi all,
    I need to fetch materials(MATNR) based on the service order number (AUFNR) in the selection screen,but there is performance isssue with this , how to over come this issue .
    Regards ,
    Amit

    Hi,
    There could be various reasons for performance issue with MSEG.
    1) database statistics of tables and indexes are not upto date.
    because of this wrong index is choosen during the execution.
    2) Improper indexes, because there is no indexes with the fields mentioned in the WHERE clause of the statement. Because of this reason, CBO would have choosen wrong index and did a range scan.
    3) Optimizer bug in oracle.
    4) Size of table is very huge, archive.
    Better switch on ST05 trace before you run this statements, so it will give more detailed information, where exactly time being spent during the execution.
    Hope this helps
    dileep

  • Issue with Multiple Tables in Report

    Post Author: dwessell
    CA Forum: General
    Hi,
    I'm using Crystal Reports 2k8.
    I'm doing a report with three tables, CQ_HEADER, SO_HEADER and SALESPERSON. Both the CQ_HEADER and the SO_HEADER tables link to the SALESPERSON table via a SPN_AUTO_KEY field.
    However, I always receive duplicates in my result set, due to the joins made, and I don't receive results that are valid in one table, and empty in another (Such that it only counts a CQ, if there is a SO associated with it. Here's the query that's produced by CR.
      SELECT "CQ_HEADER"."CQ_NUMBER", "CQ_HEADER"."ENTRY_DATE", "CQ_HEADER"."TOTAL_PRICE", "SALESPERSON"."SALESPERSON_NAME", "SO_HEADER"."ENTRY_DATE", "SO_HEADER"."TOTAL_PRICE"
    FROM   "CQ_HEADER" "CQ_HEADER" INNER JOIN ("SO_HEADER" "SO_HEADER" INNER JOIN "SALESPERSON" "SALESPERSON" ON "SO_HEADER"."SPN_AUTO_KEY"="SALESPERSON"."SPN_AUTO_KEY") ON "CQ_HEADER"."SPN_AUTO_KEY"="SALESPERSON"."SPN_AUTO_KEY"
    WHERE  ("CQ_HEADER"."ENTRY_DATE">={ts '2007-12-01 00:00:00'} AND "CQ_HEADER"."ENTRY_DATE"<{ts '2007-12-18 00:00:00'}) AND ("SO_HEADER"."ENTRY_DATE">={ts '2007-12-01 00:00:00'} AND "SO_HEADER"."ENTRY_DATE"<{ts '2007-12-18 00:00:00'})
    ORDER BY "SALESPERSON"."SALESPERSON_NAME"
    There is no link between the SO_HEADER and the CQ_HEADER.  Can anyone make a suggestion as to how I could go about structuring this such that it doesn't return duplicate values?
    Thanks
    David     

    Hey,
    I understand you used Retainsameconnection property true for all the OLEDB connections you used in the package if not make sure its for all the connection including file connection as well.
    Additionally, you can try to set Delayvalidation property to true for all the dataflows and control flows in the connection and try running the package for 10MB file.
    I hope this will fix the intermittent failure issue you are facing with SSIS.
    (Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker)
    Thanks,
    Atul Gaikwad.

  • Rebate related issue with database table VKDFS & VBAK

    Hi everybody,
    I am facing the problem with the tables VKDFS and VBAK.
    In my program the report has to display the details of the agrement numbers concerning to the sale or billing doucmnets later on it has to create a credit memo for that particular customer.
    In the coding the program in very beging step, it is fetching all sales documents from VKDFS as per selections like following.
      select        * from  vkdfs into table ivkdfs
             where  fktyp  in r_fktyp
             and    vkorg  in s_vkorg
             and    fkdat  in s_fkdat
             and    kunnr  in s_kunnr
             and    fkart  in s_fkart
             and    vbeln  in s_vbeln
             and    faksk  in s_faksk
             and    vtweg  in s_vtweg
             and    spart  in s_spart
             and    netwr  in s_netwr
             and    waerk  in s_waerk.
    After this whatever the sales orders fetched here, for those all again its fetching from VBAK table as following.
    SVBAK[] = IVKDFS[]
    select * from vbak into table ivbak
      for all entries in svbak
      where vbeln = svbak-vbeln
      and   knuma in s_knuma
      and   auart in s_auart
      and   submi in s_submi
      and  (vbak_wtab).
    So, its filtering from VBAK.
    But the exact issue is that, there is one sales order which is available in VBAK but does not available in VKDFS table.
    So, my program fails to display the report regarding to that agreement number.
    As per my analysis I came to know that there are no entries in VKDFS table against to the sales orders in VBAK concerning agreement numbers.
    VKDFS-SD index: billing initiator table.
    I want to know how come this VKDFS table is updating against to VBAK table. If possible how to make this entry in that table against to the values in VBAK. But it should not effect other tables.
    Please let me know the solution if you people have any .
    Its an urgent and sev 1 tickets
    eagerly waiting for solution or some information.
    Thanks&Regards.
    J.

    Hi everybody,
    I am facing the problem with the tables VKDFS and VBAK.
    In my program the report has to display the details of the agrement numbers concerning to the sale or billing doucmnets later on it has to create a credit memo for that particular customer.
    In the coding the program in very beging step, it is fetching all sales documents from VKDFS as per selections like following.
      select        * from  vkdfs into table ivkdfs
             where  fktyp  in r_fktyp
             and    vkorg  in s_vkorg
             and    fkdat  in s_fkdat
             and    kunnr  in s_kunnr
             and    fkart  in s_fkart
             and    vbeln  in s_vbeln
             and    faksk  in s_faksk
             and    vtweg  in s_vtweg
             and    spart  in s_spart
             and    netwr  in s_netwr
             and    waerk  in s_waerk.
    After this whatever the sales orders fetched here, for those all again its fetching from VBAK table as following.
    SVBAK[] = IVKDFS[]
    select * from vbak into table ivbak
      for all entries in svbak
      where vbeln = svbak-vbeln
      and   knuma in s_knuma
      and   auart in s_auart
      and   submi in s_submi
      and  (vbak_wtab).
    So, its filtering from VBAK.
    But the exact issue is that, there is one sales order which is available in VBAK but does not available in VKDFS table.
    So, my program fails to display the report regarding to that agreement number.
    As per my analysis I came to know that there are no entries in VKDFS table against to the sales orders in VBAK concerning agreement numbers.
    VKDFS-SD index: billing initiator table.
    I want to know how come this VKDFS table is updating against to VBAK table. If possible how to make this entry in that table against to the values in VBAK. But it should not effect other tables.
    Please let me know the solution if you people have any .
    Its an urgent and sev 1 tickets
    eagerly waiting for solution or some information.
    Thanks&Regards.
    J.

  • SQL Query : Order By issue with HUGE Table

    Hello friends,
    I have been through a terrible issue with order by. I would appreciate your help. Please let me know, your input for my case:
    => if i run select query it returns result quick in some milliseconds. (sql dev. fetches 50 rows at a time)
    => if i run select query with where condition and column (say A) in where condition is even indexed and i have order by and that order by column (say B) is also indexed.
    Now, here is the issue:
    1. if no. of rows with that where condition can filter yielding small result set then order by works fine .. 1-5 sec which is good.
    2.*if no. of rows with that where condition can filter yielding Large result set, say more than 50,000 then with order by then the wait time is exponential.... i have even waited 10+ mins to get the result back for 120,000 records.*
    Is order by takes that long for 100K records ... i think something else if wrong... your pointer will really be helpful... i am very new to sql and even newer for large table case.
    I am using SQL Developer Version 2.1.1.64
    and Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Thank you so much.
    Edited by: 896719 on Jan 11, 2013 8:38 AM

    Yes you are correct, but my concentration was on order by thing, so it will do full scan of table so i was putting that ... and was also wondering if millions of record in table should not be a issue...???
    Any way for the explain plan , when just a value in the where changes there is the huge difference i want to point out too as below:
    SELECT
    FROM
        EES_EVT EES_EVT  where APLC_EVT_CD= 'ABC' ORDER BY  CRE_DTTM DESC
    execution time : 0.047 sec
    Plan hash value: 290548126
    | Id  | Operation                    | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |             |    27 | 14688 |    25   (4)| 00:00:01 |
    |   1 |  SORT ORDER BY               |             |    27 | 14688 |    25   (4)| 00:00:01 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| EES_EVT     |    27 | 14688 |    24   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | XIE1EES_EVT |    27 |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       3 - access("APLC_EVT_CD"='ABC')
    Note
       - SQL plan baseline "SYS_SQL_PLAN_6d41e6b91925c463" used for this statement
    =============================================================================================
    SELECT
    FROM
        EES_EVT EES_EVT  where APLC_EVT_CD= 'XYZ' ORDER BY  CRE_DTTM DESC
    execution : 898.672 sec.
    Plan hash value: 290548126
    | Id  | Operation                    | Name        | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |             |   121K|    62M|       |   102K  (1)| 00:11:02 |
    |   1 |  SORT ORDER BY               |             |   121K|    62M|    72M|   102K  (1)| 00:11:02 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| EES_EVT     |   121K|    62M|       | 88028   (1)| 00:09:27 |
    |*  3 |    INDEX RANGE SCAN          | XIE1EES_EVT |   121K|       |       |   689   (1)| 00:00:05 |
    Predicate Information (identified by operation id):
       3 - access("APLC_EVT_CD"='XYZ')
    Note
       - SQL plan baseline "SYS_SQL_PLAN_ef5709641925c463" used for this statementAlso Note this table contains 74328 MB data in it.
    Thanks

  • Performance issue with COEP table in ECC 6

    Hi,,
    Any idea how to resonlve performance issue on COEP table in ECC6.0
    We are not using COEP table right now. this table occupies 100gb of 900 gb in PRD system.
    Can i directly archive/delete the table?
    Regards
    Siva

    Hi Siva,
    You cannot archive COEP table alone. It should be archived along with the respective archive object. Just deleting the table is not at all a good idea.
    For finding out the appropriate archive object contributing to the entries in COEP, you need to perform CO table analysis using programs RARCCOA1 and RARCCOA2. For further informaton refer to SAP note 138688.
    Hope this helps,
    Naveen

Maybe you are looking for

  • Black screen when connecting iPod to Mac

    When I connect my iPod to my Mac i have this "Do Not Disconnect" screen appearing but I can barely see it... It's really faded out... Can somebody tell me why?

  • Implication for keeping one Company Code

    Hi All, Can some one give me implications or disadvantage of having one company code. The scenario I am doing rollout for Germany and Germany is having their branches in Spain, France, Sweden and Switzerland. Over here Germany is main office and all

  • OS 8.1 safari very slow offer upgrade.

    After upgrading my iPad Air, Safari seems very slow. While surfing the web, pages are slow loading. Pages with pictures keep trying to play catchup as I'm going down the page. I downloaded another browser and I don't have the same problem with that o

  • Adding form fields breaks tag structure

    I have been teaching workshops at my university on creating accessible PDF forms from MS Word. I am very familiar with PDF accessibility. For the most part, the process of field recognition, marking up tables, writing tooltips, manipulating the tag t

  • Another Sync Question - Desperate!

    I bought a 32 g ipod touch from ebay. My problem is I can't synch ANYTHING. Itunes will recognize the ipod and show me a list of songs and applications that came with the ipod. But it just won't sync anything to it from my PC and itunes. I have tried