Open table/index node yields duplicates for partitioned objects

The generated query for this operation (extracted from the log) is:
select distinct t.table_name, t.num_rows, ao.status,
+(select count(*) from sys.Dba_tab_columns c where t.table_name = c.table_name and t.owner = c.owner) columns,+
+(select comments from sys.Dba_tab_comments c where t.table_name = c.table_name and t.owner = c.owner) comments,+
+(select count(*) from sys.Dba_indexes i where t.table_name = i.table_name and t.owner = i.table_owner) indexed_columns,+
t.avg_row_len,
t.tablespace_name,
t.avg_row_len * t.num_rows estimated_size,
ao.last_ddl_time,
ao.created,
+(select count(*) from sys.Dba_dependencies where REFERENCED_OWNER = t.owner and REFERENCED_NAME = t.table_name) referenced_objects,+
+(select count(*) from sys.Dba_triggers r where r.table_owner = t.owner and r.table_name = t.table_name) trigs+
from sys.Dba_tables t,sys.Dba_objects ao
where ao.owner = :OBJECT_OWNER
and ao.owner = t.owner and ao.object_name = t.table_name
and aO.GENERATED = 'N'
AND aO.OBJECT_NAME NOT IN (SELECT OBJECT_NAME FROM RECYCLEBIN)
AND aO.OBJECT_NAME NOT IN (SELECT MVIEW_NAME FROM SYS.Dba_MVIEWS WHERE :OBJECT_OWNER = OWNER)
AND aO.OBJECT_NAME NOT IN (SELECT QUEUE_TABLE from Dba_queue_tables WHERE :OBJECT_OWNER = OWNER)
AND not (   ao.object_name like 'AQ$_%_G'
or   ao.object_name like 'AQ$_%_H'
or   ao.object_name like 'AQ$_%_I'
or   ao.object_name like 'AQ$_%_S'
or   ao.object_name like 'AQ$_%_T' )
AND ( user = :OBJECT_OWNER or not ao.object_name like 'BIN$%' ) -- user != :SCHEMA --> object_name not like 'BIN$%'
-- RECYCLEBIN is USER_RECYCLEBIN!
order by 1
Trouble is that joining dba_tables to dba_objects produces duplicates for partitioned tables.
The same is true for the index node.
Should I file a bug, or is it already picked up ?
Cheers,
Olivier.

No answer after 8 days -> Reactivation.
Tx.
Olivier.

Similar Messages

  • Table creation Error "Ref Count for this object is higher than 0"

    Hi All
    I have a problem in creation of table using SDK on a button event.  I have a procedure to create tables and fields. If I call this procedure on a menu Event than it works fine but If I call this procedure on a button event than It gives error "Ref count for this object is higher than 0" . I know this error occur When an object does not release after creating a table. but this error occur at when first table is created. My code it given below. plz see and give me your valuable suggestions.
      Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
                Try
                    oUserTablesMD = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                    oUserTablesMD.TableName = "AM_OBIN"
                    oUserTablesMD.TableDescription = "PutAway Table"
                    oUserTablesMD.TableType = BoUTBTableType.bott_Document
                    lRetCode = oUserTablesMD.Add
                    '// check for errors in the process
                    If lRetCode <> 0 Then
                        B1Connections.diCompany.GetLastError(lRetCode, sErrMsg)
                        MsgBox(sErrMsg)
                    Else
                        B1Connections.theAppl.StatusBar.SetText("Table: " & oUserTablesMD.TableName & " was added successfully", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
                    End If
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
                    oUserTablesMD = Nothing
                    GC.Collect()
                    oUserTablesMD = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                    oUserTablesMD.TableName = "AM_BIN1"
                    oUserTablesMD.TableDescription = "PutAway Upper Grid"
                    oUserTablesMD.TableType = BoUTBTableType.bott_DocumentLines
                    lRetCode = oUserTablesMD.Add
                    '// check for errors in the process
                    If lRetCode <> 0 Then
                        If lRetCode = -1 Then
                        Else
                            B1Connections.diCompany.GetLastError(lRetCode, sErrMsg)
                            MsgBox(sErrMsg)
                        End If
                    Else
                        B1Connections.theAppl.StatusBar.SetText("Table: " & oUserTablesMD.TableName & " was added successfully", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
                    End If
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
                    oUserTablesMD = Nothing
                    GC.Collect()
                Catch ex As Exception
                    MsgBox(ex.Message)
                End Try
    Thanks
    Regards
    Gorge

    Hi Gorge,
    The "Ref count error..." usually occurs in case of Meta Data objects not being properly cleared.  And yes, you have got the error in the right place, generally while creating tables / fields / UDOs.  For this, you just need to clear the Meta Data object (At times even DI objects like Record Set) once they are used.
    Eg: Release these objects in the below way in a Finally Block.
    System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecordSet);
    Hope this helps.
    Regards,
    Satish

  • How to detect duplicate for custom object 1

    Hi expert,
    are there any fields in custom object can detect duplicates If These Fields Match?
    we thought it should be "Name" but it's not.
    Thanks, sab.

    Sab, field validation is not going to check for uniqueness of the custom object name. However, you could use field validation to add a value to the custom object name which could make it unique (such as name + rowID or name + created timestamp).

  • Remove duplicates for list object

    Hi,
    I have retrieved all the xml node values in List<object>. Now, I want to remove all the duplicates objects from that list.
    Example:
    If the object has n properties, I should remove only duplicate objects that have same values in all the n properties not just one property as ID or name. Please let me know how to achieve this. Preferably using LINQ. 
    Thank you.
    Regards,
    Kiran

    You can use a GroupBy.  I took the code from last posting
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml;
    using System.Xml.Linq;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string file1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "<Method>" +
    "<ID>1234</ID>" +
    "<Name>manager</Name>" +
    "<Path>path1</Path>" +
    "</Method>" +
    "<Method>" +
    "<ID>5678</ID>" +
    "<Name>manager</Name>" +
    "<Path>path2</Path>" +
    "</Method>" +
    "<Method>" +
    "<ID>5678</ID>" +
    "<Name>manager</Name>" +
    "<Path>path2</Path>" +
    "</Method>" +
    "</Methods>";
    string file2 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "<Method>" +
    "<Path>path1</Path>" +
    "<Description>text</Description>" +
    "</Method>" +
    "<Method>" +
    "<Path>path2</Path>" +
    "<Description>text</Description>" +
    "</Method>" +
    "</Methods>";
    string file3 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "</Methods>";
    StringReader reader = new StringReader(file1);
    XDocument doc1 = XDocument.Load(reader);
    reader = new StringReader(file2);
    XDocument doc2 = XDocument.Load(reader);
    reader = new StringReader(file3);
    XDocument newXDoc = XDocument.Load(reader);
    var results = from e1 in doc1.Descendants().Elements("Method")
    join e2 in doc2.Descendants().Elements("Method")
    on e1.Element("Path").Value equals e2.Element("Path").Value
    select new XElement("Method", new object[] { e1.Element("ID"), e1.Element("Name"), e2.Element("Description") });
    var results2 = results.AsEnumerable()
    .GroupBy(x => x.Element("ID").Value);
    var results3 = results2.AsEnumerable()
    .Select(x => x.Take(1));
    newXDoc.Descendants("Methods").Last().Add(results3);
    jdweng

  • Search script generator for all objects and data (!) from a user/schema ?

    Is there a way to create a script which (when run) creates all the existing
    TABLES; INDEXES, KEYS and DATA for a specified user/schema ?
    This (PL-)SQL script should contain all INSERTS for the currently existing rows of
    all the TABLEs.
    When I use e.g. export to Dumpfile I have at first find all TABLEs and components
    which I want to dump. This is rather uncomfortable.
    I just want to specify the user name similar to
    createscript user=karl@XE outfile=D:\mydata\myscript.sql
    Is this somehow possible ?

    So that I understand your requirements exactly, are you asking for your script to ...
    1/ export from database A the entire schema of a specified user
    2/ drop all objects owned by that user in database B
    3/ import the objects from database A into database B
    If so, it sounds to me that a shell script that does a schema level export as Nicholas suggested, and then drops the user from database B using the cascade keyword (e.g. drop user username cascade), recreates the user and then imports the export file into B should do the trick.
    I don't think searching for individual tables and creating the statements to recreate them is the best idea.
    Hope that helps
    Graham

  • Extract DDL for Partitioned tables in Oracle 8i

    Hi
    I am currently working on an Oracle 8i database. I have a need to extract the DDL of the existing tables & indexes. Dont need a schema level DDL extract, i just need it for a couple of tables and the corresponding indexes. I am currently using PL/SQL Developer a third party tool which is okay for extracting DDL for Non Partitioned tables, but when it comes to getting the DDL for PARTITIONED tables, it doesnt give me the partition information nor the tablespace information. We dont have a license for Toad or any other tools to get the DDL's. I also dont have the export/import privs on the DB. I need a free ware that can give me the DDL for the existing partitioned tables or atleast a query that I can run against the regular DBA views, which can give me the DDL along with Storage clause, the tablespace, indexes, grants & constraints.
    Thanks in Advance
    Chandra

    I also dont have the export/import privs on the DB. I need a
    free ware that can give me the DDL for the existing
    partitioned tables or atleast a query that I can run
    against the regular DBA views, which can give me the
    DDL along with Storage clause, the tablespace,
    indexes, grants & constraints.But you (or the owner or the tables you connect with) should have export/import privs on its on tables (i.e the two tables). So use the User Views instead of DBA Views.
    USER_TABLES, USER_TAB_PARTITIONS etc

  • What kind if tables are suitable for partitioning?

    What kind of tables are suitable for partitioning?
    I have several tables in same schema. Each of them is bigger than 200MB. DML commands are executed continuously against these tables. After diagnosis, I know than the sequential read wait is the root cause. Should I partition each of them?
    Edited by: jetq on Jul 16, 2009 8:04 PM

    jetq wrote:
    What kind of tables are suitable for partitioning?The question to answer your question is: What will be gained by partitioning and why? When you understand this, then you can decide if it is suitable for partitioning.
    BTW sequential read wait has to do with index scans, not table scans. Table scan waits are reported as scattered reads, not sequential.
    Regards,
    Greg Rahn
    http://structureddata.org

  • SYNC(EVERY interval ) deployment for Partitioned Tables

    I am wondering if anyone has deployed the SYNC(EVERY "SYSDATE + interval") style in a Partition table environment where there is a large number of partitions but only a few the most recent 7days (lets say 30 days) have any inserts/updates. As I understand it, the SYNC(EVERY interval) creates a DBMS_SCHEDULER job for each partition and the job will submit as per the interval. We have about 5000 partitions on any given day; partitions get dropped and we add a new one for the fututre (we keep 30 days ahead).
    1. Is it possible to modify the interval in these auto created Jobs? For Partitions older thasn X days i would want to run the job every Z hours
    2. Disable the future jobs until the day required (enable 10 minutes before the partition becomes "active" -- gets data
    Regards

    Hi,
    you can read about this in the manual (http://docs.oracle.com/cd/E11882_01/text.112/e24436/csql.htm#i997677). The manual says: "Each partition of a locally partitioned index can have its own type of sync (ON COMMIT, EVERY, or MANUAL). The type of sync specified in master parameter strings applies to all index partitions unless a partition specifies its own type." So it is possible to set for each partition its own sync type. This is possible with an ALTER statement:
    ALTER INDEX index_name MODIFY PARTITION partition_name PARAMETER (paramstring)1. With the above alter you can change it
    2. You can put a partition to MANUAL and then synchronize when necessary.
    So if you know when the partition needs to change, you can change it possible with another job or procedure.
    Herald ten Dam
    http://htendam.wordpress.com

  • Keeping stats up to date for partitioned tables

    Hi,
    Oracle version 10.2.0.4
    I have a partioned table. I would like to keep stats up-to-date.
    Can I just run a single command to update table stats, indexes and partitions please?
    exec dbms_stats.gather_table_stats(user, 'TABLE', cascade=>true)or I also need to run exec dbms_stats.gather_table_stats(user, 'TABLE', granularity=>partition)
    thanks,
    Ashok
    Edited by: 902986 on 27-Oct-2012 11:06
    Edited by: 902986 on 27-Oct-2012 11:07

    thanks
    yes there were many indexes on the original non-partitioned table and I have created another table partitioned and now populating it with the data from the original table. the new table is partitioned on a date range column for all years before 2012, then for 2012, 2013 and so forth.
    the indexes are all created locally bar a unique index (as per original table), created globally to enforce uniqueness across the table itself. the search will always look to year to date say 1st jan 2012 tilll today for risk analysis. the partition is on that date column and there is also a local index on that date column as well, to avoid table scan (tested with disabling that index, predictably did table scan and was less efficient).
    in a DW environment, I don't see much value in having global index bar for primary key/unique constraint. I do realise that if the query crosses more than one partition, say 2 partitions, there will be two b-tree local index scans rather than one, but that would be rare (from the way they query the table).
    therefore my plan is to perform a full table stats with cascade=>true and measure the time it takes and plan to do the same if the maintenance window allows it.
    thanks again for your help
    Edited by: 902986 on 28-Oct-2012 13:24

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • Table for open Purchase order and pending invoices for vendors

    Hi,
    Are there any table to know open Purchase orders and pending invoices for vendors.
    Quick response will be appreciated.
    Thanks & Regards

    hi,
    Purchase Order:
    S011:(PURCH: Purch. Group Statistics)
    Statistics (SSOUR)
    Version (VRSIO)
    Month (SPMON)
    Day (SPTAG)
    Week (SPWOC)
    Posting Period (SPBUP)
    Purchasing Org (EKORG)
    Purchasing Group (EKGRP)
    Vendor No (LIFNR)
    S012: (PURCHIS: Purchasing Statistics)
    Statistics (SSOUR)
    Version (VRSIO)
    Month (SPMON)
    Day (SPTAG)
    Week (SPWOC)
    Posting Period (SPBUP)
    Purchasing Org (EKORG)
    Purchasing Group (EKGRP)
    Material No (MATNR)
    Plant (WERKS)
    Info Record Category (ESOKZ)
    Material Group (MATKL)
    Info Record (INFNR)
    Country (LAND1)
    EINE: (Purchasing Info Record: Purchasing
    Organization Data)
    Info Record (INFNR)
    Purchasing Org (EKORG)
    Info Record Type (ESOKZ)
    Plant (WEKS)
    EKET: (Delivery Schedules)
    Purchasing Doc (EBELN)
    Item (EBELP)
    Delivery Schedule (ETENR)
    EKPO: (Purchasing Document Item)
    Purchasing Doc (EBELN)
    Item (EBELP)
    EKKN: (Account Assignment in Purchasing
    Document)
    Purchasing Doc (EBELN)
    Item (EBELP)
    Account Assignment (ZEKKN)
    EKKO: (Purchasing Document Header)
    Purchasing Doc (EBELN)
    EORD: (Purchasing Source List)
    Material No (MATNR)
    Plant (WERKS)
    Source List No (ZEORD)
    thx,
    Ganpat

  • Auto stats gathering for partitioned table

    Hi,
    We are in 10gR2 in sun solaris. We are using auto stats gathering for our DB. Here is my question,
    i know oracle gather statistics of the table, if the table changes more than 10%. How this work out for partitioned table? If the partition table changes more than 10% will last partition analyzed or the full table. We have partitioned based on insertion date.
    Appreciate your responds.
    Regards,
    Satheesh Shanmugam
    http://borndba.com

    I hope it will be only current partition which has teh stale statistics will be gathered the stastics instead of full table.
    Anil Malkai

  • Replication For Partitioned Table

    Well , I have a partitioned Table having partition on Date Field. Table Contains composite primary Key Date Field + Connection Id . Table Contains approx 30 Million Records.
    Now when i m goin for replication setup , created materialized view on the basis of primary key , the fast refresh process takin time approx 3 hrs for refreshing 80,000 records on LAN environment.
    Before partitioning this table the same refresh was taking only 20 Minutes.
    can any body help me out to fasten up the refresh ?

    What version of oracle are you using? What type of partitioning you are using on the table? Is the materialized view partitioned? What type of refresh mechanism are you using?(REFRESH FAST or REFRESH FORCE or REFRESH COMPLETE)? Is it ON DEMAND or ON COMMIT?

  • Set table level degree for partitioned table

    Hi all,
    Usually, we set degree 2 or 4 to big tables. In this case, CBO will choose parallel select for these tables if possible.
    Let assume one case that is table1 joins table2. non-partitioned Table1 has 20m rows and has degree 2. partitioned table2 has 50m rows and has no parallel degree.
    When I checked the execution plan, CBO uses parallel execution and uses PX BLOCK ITERATOR on table1 as expected. But I don't know whether table2 is selected in parallel, too.
    I mean I am not sure whether CBO launches slave processes against table2 or just select table2 as a whole.
    And with your tuning or architecture experiences, do you think whehther we should set degree for a partitioned table as the partitioned table can be parallelized based on partitions?
    best regards,
    Leon

    user12064076 wrote:
    And with your tuning or architecture experiences, do you think whether we should set degree for a partitioned table as the partitioned table can be parallelized based on partitions?What version of Oracle?
    A site I worked at recently preferred not to hard-code the degree but to let Oracle choose it at runtime; they felt it offered better allocation of system load than hard-coding the values. They were on 10g release 2.

  • Partitioning Tables/Indexes

    Hi,
    Oracle Version 10.2.0
    O/S Version: SUSE Linux
    Currently all the tables and indexes are stored in the NFS mount ponit. I would like to know whether can I partition the tables/indexes onto local storage temporarily.
    Thanks

    Hi
    Yes you can do this. But if you have some partitions on NAS and some on local disk then depending on the nature of the queries/DML you will see some performance issues.
    MSK

Maybe you are looking for

  • How can I use OpenGl for iPhone games??

    Hi! As you know I really want to be an iOS developer. I know how Xcode works. But I don't know for the graphics and animation. I've heard that OpenGl can be used in games. But how? I mean like connecting the animations in OpenGl to the program writte

  • Problem in OIM Installation in Linux-64 bit environment

    Hi, Components used 1. Oracle Database11gR1 2. Weblogic Application server 10.3.0(installed in non clustered mode) 3. OIM 9.1.0.1 Also ensured the above three are compatible. I'm facing problem at the end of OIM installation in RedHat Linux-64 bit en

  • PDF's do not open in Firefox windows

    Hi, I am running FF v.28 and have not been able to open up PDF's in a very long time. In fact I don't remember the last time this worked properly. When clicking on a PDF link, the page either opens up blank or nothing happens. I can view PDF's in tha

  • I am runing ox10.4.11  and i will like to install ox 10.5.11 where can i find it.

    i am runing ox10.4.11 and i will to upgrade to ox 10.5.11 anyone know where can i find the program!

  • Line Graph - set useful baseline value automatically

    Hi all, for a line graph in reports I've set the axisMinAutoScaled-property of the Y1Axis-element to "false" and expect that reports find out a useful value for the baseline at its own. Unfortunately the value of the baseline is always set to 0 wheth