Regarding Table statistics.

Hi All,
I have checked last_analyzed for tables which are not current.Cud u plz guide me how to gather stats with detailed options? for both 9i and 10g database tables as follows.
1.)For 9i database tables,
OWNER OBJECT_NAME
DCSDBA INVENTORY_TRANSACTION
select last_analyzed,OWNER from dba_tables where table_name='INVENTORY_TRANSACTION';
LAST_ANAL OWNER
29-AUG-10 DCSDBA
2.)For 10g database tables,
SQL> select owner,object_name from dba_objects where object_name like 'ORDER%';
OWNER OBJECT_NAME
DCSDBA ORDER_HEADER
SQL> select last_analyzed,OWNER from dba_tables where table_name='ORDER_HEADER';
LAST_ANAL OWNER
09-AUG-09 DCSDBA
Thanks a lot

Hi,
Use
exec dbms_stats.gather_table_stats(ownname =>'OWNER',tabname =>'TABLE_NAME',cascade =>true,degree =>3);refer to [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1036461]
NOTE :- In 9i the default value for METHOD_OPT is 'FOR ALL COLUMNS SIZE 1' whereas in 10g its 'FOR ALL COLUMNS SIZE AUTO'
HTH
Anand

Similar Messages

  • Error while executing the table statistics using Brtools

    Dear Team,
    We are getting ORA-01031: insufficient privileges error whenever we have tried to execute the update or table statistics using brtools on our SAP development server. I have checked the permissions of sapcheck directory and changed it to 775 still error remains the same. I have observed, it is failing to create the sta or chk files in sapcheck directory after executing update statistics using Brtools.
    BR0291I BRCONNECT will be started with options '-p initDEV.sap -l E -f stats -t  "USTUD" -p 1'
    BR0280I BRTOOLS time stamp: 2010-07-20 12.02.33
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    c
    BR0280I BRTOOLS time stamp: 2010-07-20 12.02.34
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...
    BR0801I BRCONNECT 6.40 (50)
    BR0280I BRCONNECT time stamp: 2010-07-20 12.02.42
    BR0301E SQL error -1031 at location BrLicCheck-12
    ORA-01031: insufficient privileges
    BR0806I End of BRCONNECT processing: cedsegpe.log 2010-07-20 12.02.42
    BR0280I BRCONNECT time stamp: 2010-07-20 12.02.42
    BR0804I BRCONNECT terminated with errors
    I have checked the owner for SAPUSER table and it is showing as OPS$DEVADM
    Please, advise me on the same.
    Thanks and Regards,
    Kedar

    Dear All,
    Thanks for your responses.
    Permissions are set as below for br* files.
    sap-dev:devadm 23> ls -ltr br*
    -rwxrwxr-x   1 oradev     sapsys     3437688 Oct 31  2008 brarchive
    -rwxrwxr-x   1 oradev     sapsys     3547760 Oct 31  2008 brbackup
    -rwxrwxr-x   1 oradev     sapsys     4632408 Oct 31  2008 brconnect
    -rwxrwxr-x   1 devadm     sapsys     3850224 Oct 31  2008 brrecover
    -rwxrwxr-x   1 devadm     sapsys     1480656 Oct 31  2008 brrestore
    -rwxrwxr-x   1 devadm     sapsys     4837672 Oct 31  2008 brspace
    -rwxrwxr-x   1 oradev     sapsys     2175208 Oct 31  2008 brtools
    I guess it is fine because with these set of permissions, it is working absolutely fine in my quality system.
    QAS Permissions are as belows for your information
    sap-qas:qa1adm 22> ls -ltr br*
    -rwsrwxr-x   1 oraqa1     sapsys     3437688 Oct 31  2008 brarchive
    -rwsrwxr-x   1 oraqa1     sapsys     3547760 Oct 31  2008 brbackup
    -rwsrwxr-x   1 oraqa1     sapsys     4632408 Oct 31  2008 brconnect
    -rwxrwxr-x   1 qa1adm     sapsys     3850224 Oct 31  2008 brrecover
    -rwxrwxr-x   1 qa1adm     sapsys     1480656 Oct 31  2008 brrestore
    -rwxrwxr-x   1 qa1adm     sapsys     4837672 Oct 31  2008 brspace
    -rwsrwxr-x   1 oraqa1     sapsys     2175208 Oct 31  2008 brtools
    So do you feel still it has something to do with permissions?
    Thanks and Regards,
    Kedar

  • Table statistics delete

    Hi
    Is there any command to delete gathered statistics of a table
    suppose : I have gather table statistics as under
    exec dbms_stats.gather_table_stats('TEST1','EMP');
    now I want to delete the statistics from the above table EMP
    Regards
    Jewel

    The package dbms_stats is fully documented in the Oracle supplied package and type reference manual for your unknown version of Oracle.
    It has a call to delete statistics.
    As per forums etiquette, please do the obvious first and consult documentation.
    Sybrand Bakker
    Senior Oracle DBA

  • Import Table Statistics to another table

    Hi,
    Just like to know if I can use dbms_stats.import_table_stats to import table statistics to another table?
    Scenario:
    I exported the table statistics of the table (T1) using the command below.
    exec dbms_stats.export_table_stats('<user>','T1',NULL,'<stat table>');
    PL/SQL procedure successfully completed.
    And then, I have another table named T2, T1 and T2 are identical tables. T2 does not have statistics (I intentionally did not run gather statistics). I am wondering
    if I can import table statistics from T1 to T2 using dbms_stats package?.
    For what I understand, statistics can be imported back at the same table which is T1 but not for another table using dbms_stat package. If I am wrong, anyone can correct me.
    Thanks

    hi
    just try ;-) you lose nothing probably,
    check afterwards last_analyzed value for that table in user_tables
    if something is wrong, run regular stats

  • Table Statistics Gathering Query

    Hey there,
    I'm currently getting trained in Oracle and one of the questions posed to me were create a table, insert a million rows into it and try to find the number of rows in it. I've tried the following steps to solve this,
    First table creation
    SQL> create table t1(id number);
    Table created.Data insertion
    SQL> insert into t1 select level from dual connect by level < 50000000;
    49999999 rows created.Gathering statistics
    SQL> exec dbms_stats.gather_table_stats('HR','T1');
    PL/SQL procedure successfully completed.Finally counting the number of rows
    SQL> select num_rows from user_tables where table_name='T1';
      NUM_ROWS
      49960410
    SQL> select count(*) from t1;
      COUNT(*)
      49999999My database version is,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionI would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
    Thank You,
    Vishal

    vishm8 wrote:
    Gathering statistics
    SQL> exec dbms_stats.gather_table_stats('HR','T1');
    PL/SQL procedure successfully completed.I would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
    Thank You,
    VishalBecause you aren't specifying a value for estimate_percent in the procedure call (to gather_table_stats) Oracle will pick an estimate value for you. If you want to sample the entire table you would need to explicitly specify that in your procedure call.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_stats.htm#ARPLS68582

  • IMPDP take too much time at TABLE STATISTICS

    Hi experts.
    on of my database is taking taking to much time during IMPDP at TABLE STATISTICS. it take alomost 20 mints to import TABLE STATISTICS while on the other hand all other objects are imported within 5 to 7 minits.
    my database version is 10.2.0.1 and O/S Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
    please guide how i can fix this issue
    thanx in Advance.
    regards

    please guide how i can fix this issueSeems to be a bug. Upgrade to 10.2.0.4.0 or 10.2.0.5.0 and check again.
    Ronny Egner
    My Blog: http://blog.ronnyegner-consulting.de

  • Table Statistics failed during Import

    Hi All,
    I am trying to import an existing schema in Oracle 10g.
    I am using the impdp utility.
    The export dump consists of the complete schema (metadata and data).
    But it failed with the following logs.
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    ORA-39125: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS while calling DBMS_METADATA.CONVERT []
    ORA-06502: PL/SQL: numeric or value error
    LPX-00007: unexpected end-of-file encountered
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPW$WORKER", line 6235
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    1945A21C 14916 package body SYS.KUPW$WORKER
    1945A21C 6300 package body SYS.KUPW$WORKER
    1945A21C 12279 package body SYS.KUPW$WORKER
    1945A21C 3279 package body SYS.KUPW$WORKER
    1945A21C 6889 package body SYS.KUPW$WORKER
    1945A21C 1262 package body SYS.KUPW$WORKER
    1CD814AC 2 anonymous block
    Job "THHIS"."SYS_IMPORT_FULL_02" stopped due to fatal error at 11:47:38
    I had then used the parameter EXCLUDE=STATISTICS and then the import was successful.
    I would like to the significance of this STATISTICS.
    I mean would EXCLUDE=STATISTICS always be ok?
    I have exported and imported the scheme as a user and not as sysdba. Does this make any difference?
    any suggestion would be highly appreciated.
    Thanks,
    Tanuja

    Hi,
    See related threads here:
    ORA-39125 & DBMS_METADATA
    Error ORA-39125 and ORA-04063 during export for transportable tablespace
    ORA-39125: Worker unexpected fatal error in string while calling string [string]
    Cause: An unhandled exception was detected internally within the worker process for the Data Pump job while calling the specified external routine. This is an internal error. Additional information may be supplied.
    Action: If problem persists, contact Oracle Customer Support.
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference"
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • Regarding Table Maintainance

    Helo All. I have a query regarding table maintainance.
    I have created a transaction for a table, and allowed only SHOW and VIEWNAME in default values.
    Still it is allowing to update the table.
    Can you tell me why?
    Thanks in advance !!!

    Your transaction is just calling SM30, even though you specify these defaults all of functionality of SM30 is available.
    To limit access to the table to display only you would need to either apply the authorisation concept (set an authorisation group in the table maintenance settings and restrict user access) or write a simple list report that displays the table contents and link that to a transaction.
    Regards,
    Nick

  • Regarding table VBEPDG- Dangerous goods

    Hi Friends.
    I need help regarding table VBEPDG.
    Can anybody tell me how entries are made in table VBEPDG? Whether its configuration table or master data table?
    In my purchase order an item has been wrongly marked as dangerous material,
    and this is leading to table VBEPDG.
    Thanks in advance.

    Dear Saketpanse,
    the table VBEPDG contains the schedule line data for the dangerous goods. If the material is not dangerous then the entry should not be created. Probably the material initially was classified as a dengerous one and is currently changed to the non-dangerous. Am I correct ?
    In this case the entry in VBEPDG will remain because during creation of the order the material was dangerous. Quite generally, SAP does not recommend to change Customizing or Master Data in the Life-system. It can cause many inconsistencies. The correct way to do such a change would be to reject all sales documents which could be affected by such a change, then do the change and then create the sales documents again. It is for the future.
    Concerning the current inconsistency. The correct way would be: to indicate the material temporary as a dangerous one again, then delete the sales order item, and then to indicate the material as a non-dangerous one and create the item again. If you have already subsequent documents, then you can only reject the item. Then the VBEPDG entry will remain, but will not disturb you anymore. Alternatively, you can write a simple ABAP report, which deletes the VBEPDG entry.
    I hope, that this information will help you a little bit further.
    Kind regards,
    Akmal Vakhidov
    Development Support SD, SAP, Walldorf/Germany

  • Regarding table names in sd

    hi developer's
    its regarding table names in sd.
    for sd_co1 and sd_co4 connected with 2lis_01_s001
    and 2lis_01_s012 i think.
    from which tables these 2 ds getting the data.
    plz let me know.
    Thanks in advance.
    Regards,
    Vijay.

    Hi Vijaya kumar,
    I hereby sending you some of the important links which will be very usefull to you, please go thru:
    2LIS_01_S260/2LIS_11_VAITM:
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/36f338472b420de10000000a114084/content.htm
    2LIS_12_VASCL:
    http://help.sap.com/saphelp_nw04/helpdata/en/42/06f3381fff3358e10000000a11402f/content.htm
    2LIS_12_VCITM:
    http://help.sap.com/saphelp_nw04/helpdata/en/32/26f438151bc321e10000000a11402f/content.htm
    and 2LIS_01_S264
    http://help.sap.com/saphelp_nw04/helpdata/en/59/efe8375ae64014e10000009b38f8cf/content.htm
    NOTE: Quotations is not included in the LO Cockpit.
    and go through this link, this will gave some idea to you
    about the Sales Business content model.
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/63073c52619459e10000000a114084/frameset.htm
    you can use best practice documention for sales and distribution scenario.
    http://help.sap.com/bp_hightechv1600/HighTech_US/html/BI/H44_EN_DE.htm
    Regards
    Pcrao.

  • Re: Unable to see Table statistics on when I click on the Table

    I have lost the ability to see table statistics when I click on the table. I use to be able to click on the table name under the connection window and would get a display of The columns, data, constraints, index,dependencies etc..... Now It does not seem to work any more I tried preferences but I don't seem to be able to change the behavior back to the way it was any suggestions.

    I upgraded to 1.2 and it solved the problem. I would however love to know the settings that control this display.

  • Oracle table statistics

    Dear All Members,
    Is there any way where we can check whether current statistics in table are outdated in oracle? In OTN i found using view "DBA_TAB_MODIFICATIONS" we can gather timestamps of statistics
    But can we use this to compare the quality of statistics in DB tables?
    Regards,
    Shanaka.

    Hi Shanaka,
    As far as I know that the DBA_TAB_MODIFICATIONS table used to collect quality of statistics value by SAP, also. There's only one exception that at the first step, without paying an attention to the DBA_TAB_MODIFICATIONS records, the system creates new statistics by using "-f stats -t all" parameters. At the second and further steps, new stats will be created for the tables that are need to be collected.
    In short, because of the DB20 transaction reflects DBA_TAB_MODIFICATIONS table to store quality of the table stats, both values should be same.
    In addition to the information above, you can read the notes, below;
    Note 588668 - FAQ: Database statistics
    Note 408527 - Checking the statistics using DBA_TAB_MODIFICATIONS,
    Best regards,
    Orkun Gedik

  • Table statistics / index statistics generation

    Hi,
    How often do you run/should system run table & index statistics through DBA calendar/BRtool?  What impact on system load does it have?  Do you run it for all tables & indecies above certain size?
    Thank you,
    Mike

    hi Dear,
    How often do you run/should system run table & index statistics through DBA calendar/BRtool*S*?
    basically we can run with DB13 and if you want to run through BRTOOLS then following steps:
    Run --> brtools
    select   7
    select   1
    press   C three time
    process will be executing the table.
    press    c              // now i m applying
    What impact on system load does it have?
    it maintain the update and good for health of database...// like.. you don't stable yourseft with out exercise mean it is exercise of datebase
    Do you run it for all tables & indecies above certain size?
    yea
    don't forget the point
    regards,
    majamil

  • Transportable Tablespace and Table Statistics

    We are loading a large datawarehouse of about 2Tb, with tables up to 100Gb full of raster images. The database is 9.2.0.7 on Solaris, and we are using Transportable Tablespaces to move datafiles and tablespaces from data integration server to production server.
    During the data integration, we calculate statistics on large tables, and it takes forever. We are wondering if these statistics are moved along with the metadata from data integration server to production server. In other words, should we calculate statistics before the tablespace export or after the tablespaces have been set online on the production server.
    Thanks,

    Hi,
    Upto my knowledge you dont need to calculate statistics.
    Even with export & import command there is a option for statistics.
    So when ever you export oracle by default export the statistics of that table.
    Hope this helps.
    Regards
    MMU

  • Regarding Table View In visual Composer

    Hi All,
    I am using Visual Compsoer 7.0. I have a table in my iview. When i go to the layout tab and right click the table. I cant see the options like "CUSTOMIZE TOOLBAR", where i can insert a row in my table. How can i have this option in VC 7.0?
    Regards,
    Divya.

    Hi Divya,
    Refer this pdf. It ll be useful to u
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c617533c-0a01-0010-b88e-a6e8e2e419c9">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c617533c-0a01-0010-b88e-a6e8e2e419c9</a>
    Regards,
    Hemalatha

Maybe you are looking for