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.

Similar Messages

  • Exclude a table from GATHER SCHEMA STATISTICS

    Hello All,
    How do you exclude a table from gather schema statistcs?
    Thanks.
    Gregg

    hi,
    it is explained here:--
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1043993
    LOCK_TABLE_STATS Procedure
    This procedure locks the statistics on the table.
    Syntax
    DBMS_STATS.LOCK_TABLE_STATS (
    ownname VARCHAR2,
    tabname VARCHAR2);
    thanks.
    Edited by: varun4dba on Dec 10, 2010 7:39 PM

  • How to exclude some tables from schema level replicatio????

    Hi,
    I am working on oracle10g stream replication.
    My replication type is "Schema Based".
    So can anyone assist me to undersatnd, how to exclude some tables from schema based replication.
    Thanks,
    Faziarain

    You can use rules and include them in the rule set, lets say you dont want LCR to be queued for table_1 in schema SALES, write two rules one for DDL and another for DML with NOT logical condition.
    DBMS_RULE_ADM.CREATE_RULE(
    rule_name => 'admin.SALES_not_TALBE_1_dml', condition => ' (:dml.get_object_owner() = ''SALES'' AND NOT ' ||
    ' :dml.get_object_name() = ''REGIONS'') AND ' ||
    ' :dml.is_null_tag() = ''Y'' ');
    DBMS_RULE_ADM.CREATE_RULE(
    rule_name => 'admin.hr_not_regions_dlll',
    condition => ' (:dml.get_object_owner() = ''SALES'' AND NOT ' ||
    ' :ddl.get_object_name() = ''table_!'') AND ' ||
    ' :dsl.is_null_tag() = ''Y'' ');
    just go through this document once, http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#i1017376
    Edited by: user8710159 on Sep 16, 2009 5:21 PM

  • 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

  • How to suppress compiler errors without excluding database objects from the "Schema Compare" tool (using VS2013/SSDT)

    Hi,
    In short: How to suppress compiler errors without excluding the object from the "Schema Compare" tool ??
    A bit longer:
    We have a SQL Server 2008 project in Visual Studio 2013 running SQL Server Data Tool.
    An old database, with a lot of history in, has been imported into SSDT and there are many syntax errors preventing the project from compiling/running. An typical error is: "SQL70001: This statement is not recognized in this context".
    Running the "faulty" scripts on the server, executes just fine. I understand that there are syntax errors and they should be rewritten, but it's not gonna happen just like that - it is a slow process over a long period of time.
    I know it is possible to change Build Action to None, but that also exclude the object from appearing in the Schema Compare function/window.
    So - how to ignore some compiler errors and still having the objects to appear when doing "Schema Compare" ??
    Thank you in advance.

    Hi Steven,
    Thanks for your comments.
    Well, it sure does help in the future, but right now i would prefer the other way - to suppress some errors and still allow the scripts to build.
    The thing is that if we "rewrite" the objects into create scripts, then we have a huge test job ahead of us + the database environments (PROD vs DEV and UAT) does not share the same AD or DB users and therefore grants is lost if dropping/creating
    objects, right!
    If you drop a object before creating it, the drop will also drop the roles and grants and since they don't share user table, the create will not be able to add the permissions again. There might be a solution to that, but it is going to be very complicated
    for some newbies like us. We need something we can trust.
    BR
    Peter

  • How do I move a table from one schema to another schema on Oracle XE?

    How do I move a table from one schema to another schema on Oracle XE?

    Hi,
    I tried to use the insert/select statement that you had given, it did not work.
    The error is ORA-00913: too many values.
    But finally what I did was, I went into the system schema where the table was and generated the DDL through the utilities and afterwards I imported them into the schema that I am currently working on. It solved the problem!
    However I am still curious to know why the insert/select statement did not work? Do you know any site/tutorial which gives a real time example?
    Thank you
    Skye

  • How do I move a table from one schema to another schema?

    How do I move a table from one schema to another schema?

    Grant access to the table from the source schema to destination schema.
      GRANT SELECT ON <TABLE_NAME> TO  <DESTINATION SCHEMA>A simple way would be to use CREATE Table with select syntax (in destination schema)
      CREATE TABLE <TABLE_NAME> AS SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME><li>However, you would be in <b><u>trouble when the table has index,constraints and triggers</u></b>.
    So you can better of grab the DDL statement of the table(and any additional components) andd then create the table in the destination schema.You can use SQL developer, Toad or Apex's Object browser for this.
    After the table is created, Insert the records using SELECT.
    INSERT INTO <TABLE_NAME> SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME>This question is discussed in great detail in this <b>AskTom thread</b>

  • 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

  • No Easy Way to Join on Tables from Different Schemas

    Hi,
    The company policy does not allow to join on tables from different schemas or use db links...
    I'm tasked to come up with a Perl script that does exactly that - allows for the SELECT statement to do several joins on 3 different schemas. In addition 1 of the schemas is on the different host altogether.
    Upping the privileges for my user and allowing db links is not an option...Can someone, please help me to understand on a conceptual level how would I use Perl and what logic would it have and what would it (perl) do?
    Thank you,

    Court in the wrong job... ;)
    It's like a librarian who is a hard rock artist maintaining the silence in the premises. ;)
    My dear friend, i don't think this is the right place for your requirement. This is the PL/SQL forum. If you have any problem related PL/SQL or SQL you can place that here.
    Regards.
    Satyaki De.

  • 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

  • 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

  • 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

  • Export dump only 1000 tables from the schema which contains 3000 tables.

    Hi,
    I have an requirement to export the dump only with particular 1000 tables from the schema which contains 3000 tables.
    As I want to take the dump, I need to mention the List of tables in "TABLES" Parameter. But syntax won't allow for 1000 tables.
    Kindly guide me on this to proceed further to take the dump of only particular 1000 tables.
    Thanks in advance.
    Thanks,
    Orahar.

    I have an requirement to export the dump only with particular 1000 tables from the schema which contains 3000 tables.
    As I want to take the dump, I need to mention the List of tables in "TABLES" Parameter. But syntax won't allow for 1000 tables.
    Kindly guide me on this to proceed further to take the dump of only particular 1000 tables.You haven't mentioned the oracle release version.
    if you're using 10g, you could use datapump export/import to achieve this. Not a straight way.
    Check Metalink Export/Import DataPump Parameters INCLUDE and EXCLUDE - How to Load and Unload Specific Objects - 341733.1
    Under section 9. Exporting or Importing a large number of objects.
    HTH
    -Anantha

  • 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........

Maybe you are looking for

  • I'm trying to install Photoshop Elements 11

    I'm trying to install photoshop elements 11 and when I go to enter the serial numbers, the alphabetical letters wont enter...only the numerals...what's up?

  • How do I stop the Welcome to Firefox tab from opening every time I open Firefox?

    I have read two ways to try and stop this in the help but they either did not apply or I could not do what they suggest. Every time I open Firefox of late the Welcome to fire fox tab opens along with my home page. It is only a small annoyance to turn

  • Prevent from being blocked.

    Hello everyone, When invoking a third party function (which I can not modify its behavior), my application will be blocked when something error occurs and the block dues to the thid party function, which will be blocked when something error occurs. I

  • CAN'T DOWNLOAD PREMIERE PRO:  it says there was an error loading the app.  anyone?

    I was downloading the AE update. I had AE open. it told me to close AE. I did. It then said, "finishing downloading".  The new AE version never did download. Instead when I go to my adobe apps it says 'error loading", then offers me the chance to "re

  • Cloning arch desktop installation to a laptop

    hi! my installation of archlinux on my desktop is much like i want it to be. it took some work and time to set it up like that. now i want to have exactly the same installation on my new laptop. same packages, same config for all the programs, the kd