How to gather schema stats in 11.5.9

Hi,
I am trying to gather schema stats for 11.5.9. But schemaname does not have the list of schemas. can i enter ALL.
Regards
Taher

Hi Taher,
You can either enter a schema name or even ALL should work.
If you refer the link Helios has referred, Gather schema statistics is run on the schemas or tables on where there is a change in data frequently. So if you enter ALL then it would gather statistics for all the schemas which might not be required. Since it is run on all the schemas it might take time to complete.
It is a good practice to run gather statistics at object level where there are lot of data growth or change.
Regards,
Mithun

Similar Messages

  • Gather Schema Stat running long in R12

    Hi:
    I scheduled Gather Schema Stat (all with 10%) on two PROD instances last night. One completed about 2 hrs (this one normally has more activeties) while the other is still running since 12:00am. Please give me the steps and commands how I should troubleshoot. Is it still running? I have checked there is no block. BTW, I did one Gather Schema Stats for AP with 10% yesterday afternoon. It completed less than 2 min. They both are on 12.1.3 and 11.1.0.7 on Linux. Thank you in advance.

    I guess I have to do one of these. Thank you.
    Another question: Why some tables dont have date under last_analyzed? When I checked the all_tables and sorted on the last_analyzed, saw 1/3 of the tables with date blank. They are from all kinds of schemas, ex, two tables below. But some AR, or AP are analyzed.
    AR_SUBMISSION_CTRL_GT
    AP_PERIOD_CLOSE_EXCPS_GT

  • Gather schema stats not running for custom schema's in EBS 12.1.1

    Hi All,
    We are running Gather schema stats program periodically in our EBS system with Schama name as "ALL", but it is not generating the statistics for the custom schema. We have custom schema registered in our EBS application. Can you please let us know if there is any issue with our setup or this is standard behaviour of Gather schama stats concurrent program.
    Thanks,

    Hi,
    At how much percent ur using with Gather schema stats program like 10%,20%(in Gather schema stats program form)...I think there are no updates on the tables of that custom schema thats why the gather schema progam ignored it..can u check were there updates?
    Regards

  • ORA-12801 ORA-08103 while running gather schema stats in R12

    Hi All,
    We have recently upgraded from 11.5.9 to R12.1.1 on RHEL 4.8
    Database version is 10.2.0.5
    We are running Gather schema stats on R12.1.1 but its Errored out with below messages.
    ORA-12801: error signaled in parallel query server P006
    GL.GL_JE_LINES
    ORA-08103 : object no longer exists
    Please advice if anybdy face this issue.
    Thanks
    RB

    Please see (GATHER SCHEMA STATISTICS COMPLETED WITH ERROR WHEN RUNNING FOR GL SCHEMA. [ID 1068541.1]).
    Thanks,
    Hussein

  • Error  while gather schema stats

    Hi,
    I am getting the error while gather schema stats
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    -Sagar

    Ariz,
    The FND_STATS package provides procedures for gathering statistics for Oracle Applications database objects. It also provides procedures
    for storing the current statistics in a table (FND_STATTAB) and restoring them back. This package also facilitates the gathering of some statistics in parallel. This package calls the DBMS_STATS package.
    The FND_STATS package also has procedures to populate the FNDSTATS_HIST_* table to record the historical information of time taken for gathering the
    statistics for the different types of objects.
    Famy

  • Many Gather Schema Stat CR on R12

    Hi, gurus:
    I saw today that there are many Gather Schema Stats CR completed these days. They all run "as soon as possible". Who/what fired them?
    EBS: 12.1.3
    OS: Linux
    DB: 11.1.0.7
    Thank you.

    Hi,
    Helping without politeness will not actually be termed as Help, isn't it?
    You may find the request set of a particular concurrent request/program using query:
    SELECT DISTINCT user_request_set_name
      FROM FND_REQUEST_SETS_TL
    WHERE request_set_id IN
              (SELECT request_set_id
                 FROM FND_REQUEST_SET_PROGRAMS
                WHERE concurrent_program_id =
                         (SELECT CONCURRENT_PROGRAM_ID
                            FROM fnd_concurrent_programs_tl
                           WHERE upper(USER_CONCURRENT_PROGRAM_NAME) = upper( '&Enter_Prog_name')));
    The above query was extracted from link:
    http://orclapp.blogspot.com/2012/02/script-to-find-concurrent-programs-of.html
    Hope this helps
    Best Regards

  • Needed Script for Gather Schema Stats

    Hi
    Well i need a script that monitors Gather Schema Schema stats is scheduled for coming week
    In EBS this would be a con current request scheduled that i need to get the information ..
    that script will run once in week and tell us that a GSS is scheduled on or else if its not scheduled it will give an alert as it is not schedule
    please let me know
    Cheers

    Hi Hussein,Alex
    well thanks for your reply ....
    but let me be more more clear what i need ...
    below query
    select ACTUAL_START_DATE, ACTUAL_COMPLETION_DATE,ROUND ( (ACTUAL_COMPLETION_DATE - ACTUAL_START_DATE)*1440) DURATION_MINS, REQUEST_ID, CONCURRENT_PROGRAM_ID from fnd_concurrent_requests where actual_start_date between to_date('4-Jun-12 00:00:00','dd-mon-yy hh24:mi:ss') and to_date('6-July-12 11:00:00','dd-mon-yy hh24:mi:ss')
    and CONCURRENT_PROGRAM_ID in (select CONCURRENT_PROGRAM_ID from FND_CONCURRENT_PROGRAMS_TL where USER_CONCURRENT_PROGRAM_NAME LIKE 'Gather Schema Statistics') order by 5,1;
    this give me output that between this date 4-june-12 to 6-July-12 is there any con current request ran for Gather Schema Stats...
    this query will give me request_id,concurrent_program_id and all details...
    like this i want to see that if any con current request is schedule in near future
    let us for eg
    this script will run on monday and it will pickup up the concurrent request telling for this week on this date GSS is schedule...
    likewise i need ...
    hope this give explanation what exact i need ..
    Cheers........

  • How to gather table stats for tables in a different schema

    Hi All,
    I have a table present in one schema and I want to gather stats for the table in a different schema.
    I gave GRANT ALL ON SCHEMA1.T1 TO SCHEMA2;
    And when I tried to execute the command to gather stats using
    DBMS_STATS.GATHER_TABLE_STATS (OWNNAME=>'SCHMEA1',TABNAME=>'T1');
    The function is failing.
    Is there any way we can gather table stats for tables in one schema in an another schema.
    Thanks,
    MK.

    You need to grant analyze any to schema2.
    SY.

  • How to execute "gather schema stats" in parallel?

    Hi,
    I've a 11.2 Standard Edition and I need to gather stats for about 20 schemas.
    It's possible to execute with a plsql (or other) dbms_stats.gather_schema_stats in parallel?
    I want to execute 4 schema stats at time, and when one finish another one starts.
    It's possible?
    Thanks

    Mr.D. wrote:
    Hi,
    I've a 11.2 Standard Edition and I need to gather stats for about 20 schemas.
    It's possible to execute with a plsql (or other) dbms_stats.gather_schema_stats in parallel?
    I want to execute 4 schema stats at time, and one finish another one starts.
    It's possible?
    Thanks
    yes it is possible by opening 4 different   sessions
    which system resource will be saturated first?

  • Gather Schema Stats concurrent program error with lock

    We are running Gather Schema Statistics from Oracle E-Business Suite 11.5.10 against a 10..2 database. When run against individual schema it completes with no error, but when run against ALL schemas it completes with the following error.
    “ERROR: While GATHER_TABLE_STATS: object_name=XDP.XDP_ORDER_PROCESSOR_QTAB***ORA-20005: object statistics are locked (stattype = ALL)***”
    I understand why the tables are locked and I know how to unlock the table (exec dbms_stats.unlock_schema_stats('schema_owner'); exec dbms_stats.unlock_table_stats('table_owner','table_name');
    My query is this: Metalink Note [ID 433240.1] advises If the table is a queue table then the statistics should remain empty and locked so that dynamic sampling is used due to the volatility of queue tables.
    If I follow the advise in the note above, and leave the tables as locked then gather Schema Statistics will continue to complete with an Error (its annoying).
    I found metalink note (375351.1) which seems to say that all tables can be unlocked including queue tables.
    Has anyone encountered this problem, do you recommended that I unlock this tables even though they are queue tables.

    Hi;
    Please follow doc ORA-20005 WHEN GATHERING STATISTICS FOR APPS 11i / R12 IN 10G or 11G [ID 375351.1],i belive you can run command wihtout issue. If its prod than you can also rise SR and confirm wiht oracle support
    Regard
    Helios

  • Exclude MV Table from gather schema stats

    Hey,
    I am running the daily stats gathering procedure below.
    But it is running at the same time with an MV that is refreshing,and it's failing due to that.
    Is it possible to exclude the Materialized view from the below schema stats procedure?
    BEGIN
    dbms_stats.gather_schema_stats(ownname=>'SCOTT',estimate_percent=>dbms_stats.auto_sample_size,degree=>2);
    END;
    This is running on Oracle 10.2.1.0, on Linux env.

    You could lock the statistics onto the tables you don't want to re-gather stats : dbms_stats.lock_table_stats
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1043993
    Then run the mentioned command will not compute stats on those objects.
    Nicolas.

  • Why Gather Schema Stats?

    Hi all,
    I truncated all tables in my dev schema HR.
    Then I ran > exe dbms_stats.gather_schema_stats('HR');
    But the num_nows column in USER_TABLES are all have the old values :(
    I am expecting all to be "zeroes".
    How to take effect the updated stats for the cost base optimizer?
    Thanks a lot,

    KinsaKaUy? wrote:
    Hi all,
    I truncated all tables in my dev schema HR.
    Then I ran > exe dbms_stats.gather_schema_stats('HR');
    But the num_nows column in USER_TABLES are all have the old values :(
    I am expecting all to be "zeroes".
    How to take effect the updated stats for the cost base optimizer?
    Thanks a lot,Whenever you use a valid SQL statement for the first time, Oracle produces an execution plan that describes how to retrieve the necessary data. The optimiser uses this plan to fetch the query from database . As in your case you truncated the table but the you have not updated the stats .whenever you use the same query the optimiser will use the old plan . Hence to update the optimizer , we collect the fresh stats by running "dbms_stats.gather_schema_stats"
    at the schemas level ...
    For more details check the oracle docs
    http://docs.oracle.com/cd/B28359_01/server.111/b28274/stats.htm
    Hope this may help you ....
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Find errors while running gather schema stats

    BEGIN DBMS_STATS.gather_schema_stats (ownname => '####', cascade =>true,estimate_percent => dbms_stats.auto_sample_size); END;
    ERROR at line 1:
    ORA-04063: package body "SYS.DBMS_SQLDIAG" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLDIAG"
    ORA-06512: at "SYS.DBMS_STATS", line 17964
    ORA-06512: at "SYS.DBMS_STATS", line 18450
    ORA-06512: at "SYS.DBMS_STATS", line 18531
    ORA-06512: at "SYS.DBMS_STATS", line 18487
    ORA-06512: at line 1

    Hi Niket,
    The statement works fine for me in my environment
    SQL> BEGIN DBMS_STATS.gather_schema_stats (ownname => 'SHAJI' , cascade =>true,estimate_percent => dbms_stats.auto_sample_size); END;
    2 /
    PL/SQL procedure successfully completed.
    SQL> exec DBMS_STATS.gather_schema_stats (ownname => 'SHAJI' , cascade =>true,estimate_percent => dbms_stats.auto_sample_size);
    PL/SQL procedure successfully completed.
    Could you please verify the below objects are valid in your environment ?
    SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where owner='SYS' and OBJECT_NAME='DBMS_SQLDIAG';
    OWNER OBJECT_NAME OBJECT_TYPE STATUS
    SYS DBMS_SQLDIAG PACKAGE VALID
    SYS DBMS_SQLDIAG PACKAGE BODY VALID
    Otherwise fix the issue by compiling it & try collecting again.
    Hope it helps,

  • How often we need to run gather schema statistics etc.. ??

    HI,
    Am on 11.5.10.2
    RDBMS 9.2.0.6
    How often we need to run the following requests in Production...
    1.Gather schema statistics
    2.Gather Column statistics
    3.Gather Table statistics
    4.Gather All Column statisitics
    Thanks

    Hi;
    We discussed here before about same issue. Please check below thread which could be helpful about your issue:
    How often we need to run gather schema statistics
    Re: Gather schema stats run
    How we can collect custom schema information wiht gather statistics
    gather schema stats for EBS 11.5.10
    gather schema stats conc. program taking too long time
    Re: gather schema stats conc. program taking too long time
    How it runs
    Gather Schema Statistics
    http://oracle-apps-dba.blogspot.com/2007/07/gather-statistics-for-oracle.html
    gather statistict collect which informations
    Gather Schema Statistics...
    Regard
    Helios

  • Gather Schema Statistics - GATHER AUTO option failing to gather stats

    Hi ,
    We recently upgraded to 10g DB and 11.5.10 version of Oracle EBS. I want to employ GATHER AUTO option while running Gather Schema Statistics.
    To test the working, I created a test table with 1 million rows. Then, stats were gathered for this table alone by using Gather Table Stats. Now, I deleted ~12% of rows & issued commit. The table all_tab_statistics shows that the table has stale statistics (stale stats column = YES). After that I ran Gather Schema Stats for that particular schema. But the request did not pick the test table to be gathered.
    What is the criterion on which Oracle chooses which all tables to be gather statistics for under Gather Auto option? I am aware of the 10% change in data, but how is this 10% calculated? Is it only based on (insert + update + delete)?
    Also, what is the difference between Gather Auto and Gather Stale ?
    Any help is appreciated.
    Thanks,
    Jithin

    Randalf,
    FYI.. this is what happens inside the concurrent progarm call.. there are a few additional parameters for output/ error msgs:
    procedure GATHER_SCHEMA_STATS(errbuf out varchar2,
    retcode out varchar2,
    schemaname in varchar2,
    estimate_percent in number,
    degree in number ,
    internal_flag in varchar2,
    request_id in number,
    hmode in varchar2 default 'LASTRUN',
    options in varchar2 default 'GATHER',
    modpercent in number default 10,
    invalidate in varchar2 default 'Y'
    is
    exist_insufficient exception;
    bad_input exception;
    pragma exception_init(exist_insufficient,-20000);
    pragma exception_init(bad_input,-20001);
    l_message varchar2(1000);
    Error_counter number := 0;
    Errors Error_Out;
    -- num_request_id number(15);
    conc_request_id number(15);
    degree_parallel number(2);
    begin
    -- Set the package body variable.
    stathist := hmode;
    -- check first if degree is null
    if degree is null then
    degree_parallel:=def_degree;
    else
    degree_parallel := degree;
    end if;
    l_message := 'In GATHER_SCHEMA_STATS , schema_name= '|| schemaname
    || ' percent= '|| to_char(estimate_percent) || ' degree = '
    || to_char(degree_parallel) || ' internal_flag= '|| internal_flag ;
    FND_FILE.put_line(FND_FILE.log,l_message);
    BEGIN
    FND_STATS.GATHER_SCHEMA_STATS(schemaname, estimate_percent,
    degree_parallel, internal_flag, Errors, request_id,stathist,
    options,modpercent,invalidate);
    exception
    when exist_insufficient then
    errbuf := sqlerrm ;
    retcode := '2';
    l_message := errbuf;
    FND_FILE.put_line(FND_FILE.log,l_message);
    raise;
    when bad_input then
    errbuf := sqlerrm ;
    retcode := '2';
    l_message := errbuf;
    FND_FILE.put_line(FND_FILE.log,l_message);
    raise;
    when others then
    errbuf := sqlerrm ;
    retcode := '2';
    l_message := errbuf;
    FND_FILE.put_line(FND_FILE.log,l_message);
    raise;
    END;
    FOR i in 0..MAX_ERRORS_PRINTED LOOP
    exit when Errors(i) is null;
    Error_counter:=i+1;
    FND_FILE.put_line(FND_FILE.log,'Error #'||Error_counter||
    ': '||Errors(i));
    -- added to send back status to concurrent program manager bug 2625022
    errbuf := sqlerrm ;
    retcode := '2';
    END LOOP;
    end;

Maybe you are looking for

  • Time Machine Disk - A few 'minor issues'

    Hi All, (note not all caps I've had some issues with macs or another over the past week but to cut a long story short, the one that had a 'logic board' issue starting booting up so I took the chance to re-install leopard, but, during the calculating

  • Can Not Open PDF Attachments

    I can not open PDF attachments from outlook 2010. I am running windows 8  and using Adobe version 11.0.2  If I save the file to desktop, then it will allow me to open it and print it. Thanks in advance for yor help. the error says it can not open the

  • ALV Grid- GET_SELECTED_ROWS returns empty table in edit mode

    Hi all, I saw similar threads on this forum, but didn't find the answer. Do you know if that is possible to force grid to return selected rows when is in edit mode? When I switch to display mode everything works just fine. regards, Marcin

  • New to Oracle Report .....run/display 2  queries depending on parameter

    I am developing 2 report where the output is almost same except for 2 rows .Those 2 row should be extracted from Employee table if the parameter specified is E or should be extracted from Salary table if parameter specified is S. In short the report

  • PO release strategy for changes in price ($ and %)

    Hello, I have searched this forum and others to find an answer to my question, but as I was unsuccessful, I decided to post my question here. I have a requirement for a PO release strategy that involves triggering the release strategy only if the tot