How stop the automatic statistics collection job after the maintenance wind

Hi,
we are for a solution to stop the automatic statistics collection job after the maintenance window finished.
we disable all jobs except the automatic statistics collection, because this is the only one we want to run. Then we define specific values for the interval and duration parameters of the maintenance window to customize this task.
But for their systems it is very important that this job/task will immediately stop when the window is closed!!!
So, how could we ensure this behavior.
For Oracle 10g it is easy because the statistic job always exists and it is possible to set its duration and create an addtional event based job which kills all jobs that are running over duration.
In Oracle 11g the statistic job is created by the system during the maintenance window is open.
We are not able to modify parameters of this system job. After the maintenance window closed the job is already running - only with another resource priority - but it is running.
Please help me in this scenario
Thanks&Regards
Prem

?So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run, but i see tables are updated still the job is not running. I did >query dba_scheduler_jobs and the state of the job is true and scheduled. Please see my previous post on the output
Am i missing anything here, do i look for some parameters settings
So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run,GATHER_STATS_JOB will run and if there are any table in which there's a 10 percent change in data, it will gather statistics on that table. If no table data have changes less than 10 percent, it will not gather statistics.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
Hope this helps.
-Anantha

Similar Messages

  • How to disable automatic statistics collections on tables

    Hi
    I am using Oracle 10g and we have few tables which are frequently truncated and news rows added to it. Oracle automatically analyzes the table by some means which collects statistics of the table but at the wrong time(when the table is empty). This makes my query to do a full table scan rather using indexes since the statistics was collected when the table was empty.Could any one please let me know how to disable the automatic statistics collection feature of Oracle?
    Cheers
    Anantha PV

    Hi
    I am using Oracle 10g and we have few tables which
    are frequently truncated and news rows added to it.
    Oracle automatically analyzes the table by some means
    which collects statistics of the table but at the
    wrong time(when the table is empty). This makes my
    query to do a full table scan rather using indexes
    since the statistics was collected when the table was
    empty.Could any one please let me know how to disable
    the automatic statistics collection feature of
    Oracle?
    First of all I think it's important that you understand why Oracle collects statistics on these tables: Because it considers the statistics of the object to be missing or stale. So if you just disable the statistics gathering on these tables then you won't have statistics at all or outdated statistics.
    So as said by the previous posts you should gather the statistics manually yourself anyway. If you do so right after loading the data into the truncated table, you don't need to disable the automatic statistics gathering as it only processes objects that are stale or don't have statistics at all.
    If you still think that you need to disable it there are several ways to accomplish it:
    As already mentioned, for particular objects you can lock the statistics using DBMS_STATS.LOCK_TABLE_STATS, or for a complete schema using DBMS_STATS.LOCK_SCHEMA_STATS. Then these statistics won't be touched by the automatic gathering job. You still can gather statistics using the FORCE=>true option of the GATHER__STATS procedures.
    If you want to change the automatic gathering job that it only gathers statistics on objects owned by Oracle (data dictionary, AWR etc.), then you can do so by calling DBMS_STATS.SET_PARAM('AUTOSTATS_TARGET', 'ORACLE'). This is the recommended method.
    If you disable the schedule job as mentioned in the documentation by calling DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB') then no statistics at all will be gathered automatically, causing your data dictionary statistics to be become stale over time, which could lead to suboptimal performance of queries on the data dictionary.
    All this applies to Oracle 10.2, some of the features mentioned might not be available in Oracle 10.1 (as you haven't mentioned your version of 10g).
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Oracle automatic statistics optimizer job is not running after full import

    Hi All,
    I did a full import in our QA database, import was successful, however GATHER_STATS_JOB is not running after sep 18 2010 though its enable and scheduled, i did query last_analyzed table to check and its confirmed that it didnt ran after sep18,2010.
    Please refer below for the output
    OWNER JOB_NAME ENABL STATE START_DATE END_DATE LAST_START_DATE NEXT_RUN_D
    SYS GATHER_STATS_JOB TRUE SCHEDULED 18-09-2010 06:00:02
    Oracle defined automatic optimizer statistics collection job
    =======
    SQL> select OWNER,JOB_NAME,STATUS,REQ_START_DATE,
    to_char(ACTUAL_START_DATE, 'dd-mm-yyyy HH24:MI:SS') ACTUAL_START_DATE,RUN_DURATION
    from dba_scheduler_job_run_details where
    job_name='GATHER_STATS_JOB' order by ACTUAL_START_DATE asc; 2 3 4
    OWNER JOB_NAME STATUS REQ_START_DATE ACTUAL_START_DATE
    RUN_DURATION
    SYS GATHER_STATS_JOB SUCCEEDED 16-09-2010 22:00:00
    +000 00:00:22
    SYS GATHER_STATS_JOB SUCCEEDED 17-09-2010 22:00:02
    +000 00:00:18
    SYS GATHER_STATS_JOB SUCCEEDED 18-09-2010 06:00:02
    +000 00:00:26
    What could be the reason for GATHER_STATS_JOB job not running although its set to auto
    SQL> select dbms_stats.get_param('AUTOSTATS_TARGET') from dual;
    DBMS_STATS.GET_PARAM('AUTOSTATS_TARGET')
    AUTO
    Does anybody has this kind of experience, please share
    Apprecitate your responses
    Regards
    srh

    ?So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run, but i see tables are updated still the job is not running. I did >query dba_scheduler_jobs and the state of the job is true and scheduled. Please see my previous post on the output
    Am i missing anything here, do i look for some parameters settings
    So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run,GATHER_STATS_JOB will run and if there are any table in which there's a 10 percent change in data, it will gather statistics on that table. If no table data have changes less than 10 percent, it will not gather statistics.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
    Hope this helps.
    -Anantha

  • How do I edite my collection description after it's already exported (in HTML)?

    Hello,
    I've been using Photoshop and Lightroom for a while not. Both are amazing, and I'm even now using Dreamweaver. Anyway...now, I'll get to my question:
    How do I edited my collection description after already having exported my Lightroom Gallery? For one, I noticed a spelling error in the title, and I also want to edit the description a little bit more without having to re-export it from LR again and having to Re-publish all again. (I manage to use the file codes to change a few other things using DW, but for the life in me I cannot figure out how to change the Description).
    I guess this is actually a coding question, not a question about LR itself, but I'm hoping some people who've used and tweaked LR galleries will understand my plight and help me. I would appreciate it very much.
    Oh, and if it makes any difference, I'm using The Turning Gate free gallery because it's HTML5. I wasn't sure if any of the other LR5 CC ones were HTML5, that's why.

    Two options.
    Export the gallery again but to your desktop. Find the Index page with the description on it and edit to the way you want. Dreamweaver will work fine but a text editor will suffice. Save the page and upload that page only- replacing the one online.
    Discard the exported gallery.
    Second option, download the offending page via FTP, edit it and replace on your site.

  • How stop the timeline via code for some seconds?

    Hi NG,
    how can i stop the timeline for some seconds? Is there any code exaple for me?
    Thanks...
    TELLO

    What about using some javascript timing events maybe something like this should work:
    function resumePlay() {
         sym.play();
    function stopPlay(secs) {
         sym.stop();
         setTimeout(function(){resumePlay()},secs * 1000);
    // stop the default timeline for 3 seconds
    stopPlay(3);
    NOTE: this example ONLY stops the default timeline where the code is inserted. If there are other symbols playing independently, they won't stop. Also, notice it's an asynchronous call, so if an event occurs during the time lapse and triggers a "play" action, the animation will resume immediately.

  • How stop the process of a job program and no sent data to XI?

    People,
    I have a program that stop by a error message that I put after a select like this:
      IF sy-subrc <> 0.
        v_error2 = 'E'.
        MOVE 'No data found. REGUH'(e01) TO emsg.
        PERFORM call_error_function USING emsg.
        PERFORM call_log_function.
        MESSAGE: 'No data found. REGUH'(e01) TYPE 'E'.
      ENDIF.
    For example if not exist data on REGUH display a error message and the program stop but the problem is that some of this programs are executed by a job and when present the error the status of the program are presented like CANCELED and I need to change the status to FINISHED but in the log present the tables with the message that no have data or something like that.
    Other thing that I need is not sent the message to XI if no have data. I made that with the error message but now I don't know how!
    Help me with this please!
    Thanks!

    Hi,
    To send data from SAP to XI, you can use:
    IDoc
    RFC and Proxy.
    For IDoc if you have no data then the IDoc is not created and hence no error needs to be processed.
    For RFC and Proxy that you must be calling in your report:
    1. First option is to check for the data before making a call to RFC or Proxy. If there is no data don't make the call
    or if you don't get the data and you want to send a message that there is not data then you have to make another message and update this message and send it to SAP XI
    Regards
    Vijaya

  • Doubt regarding automatic statistics collection in Oracle 10g

    I am using Oracle 10g in Linux
    Does statistic collection for tables throughout the database happen automatically or should we manually analyze the tables using
    Analyze command or DBMS_STATS package ?
    AWR collects statistics(snapshots) every 1 hr but does it mean it collects only session and database related statistics and not the table related statistics?

    I am using Oracle 10g in Linux Version and os name and version?
    AWR collects statistics(snapshots) every 1 hr butIt's performance related statistics. Read about data gathering and AWR.
    Note that AWR is an extra licensable feature thru Management packs.

  • HT2500 how do i automatically save all emails after i have read them

    How do I set up Mail to automatically save all emails that I have read?

    Unless Mail has changed in Mountain Lion, which I don't use, you shouldn't have to do anything. They should just remain where they were. Are they disappearing after being read?
    Maybe there's some Preference in 10.8 Mail I don't know about. In my 10.6 Mail, I would Open>Mail>Preferences>Accounts>Mailbox Behaviors. Should be at that location in ML Mail>Preferences or somewhere in Preferences.
    Btw, you're in the Snow Leopard (10.6) forum.

  • Help! (Mail) By mistake twice drag-dropped old POP emails to Gmail over IMAP. How stop the duplication?

    Sorry for the clumsy title.
    I have activated IMAP on my mum's Gmail and am uploading her old emails. The messages are from her pre-gmail times and were, thus, POP3'd to her computer using other email accounts.
    The problem is I accidentally twice dragged the emails in one, rather large, folder to the corresponding IMAP folder. As a result I am getting duplicates in Gmail.
    This duplication is currently ongoing and wouldn't be so bad were it not for the fact that her internet connection is a 3G broadband connection with a 1GB monthly limit.
    Is there any way to "force quit" the copying/duplication from within Mail? I can disconnect the Gmail IMAP account but when I reconnect the duplication resumes.
    TIA
    Philip

    Sorry for the clumsy title.
    I have activated IMAP on my mum's Gmail and am uploading her old emails. The messages are from her pre-gmail times and were, thus, POP3'd to her computer using other email accounts.
    The problem is I accidentally twice dragged the emails in one, rather large, folder to the corresponding IMAP folder. As a result I am getting duplicates in Gmail.
    This duplication is currently ongoing and wouldn't be so bad were it not for the fact that her internet connection is a 3G broadband connection with a 1GB monthly limit.
    Is there any way to "force quit" the copying/duplication from within Mail? I can disconnect the Gmail IMAP account but when I reconnect the duplication resumes.
    TIA
    Philip

  • Automatic statistics generation in 11.2

    Dear experts!
    I've initialized the automatic statistics collector in my 11.2 db as follows:
    BEGIN
    DBMS_AUTO_TASK_ADMIN.ENABLE(
    client_name => 'auto optimizer stats collection',
    operation => NULL,
    window_name => NULL);
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.MONDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=MON;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.WEDNESDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=WED;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.FRIDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=FRI;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.THURSDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=THU;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.TUESDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=TUE;byhour=11;byminute=0;bysecond=0');
    DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'DBUSER',
    options => 'GATHER AUTO',
    estimate_percent => dbms_stats.auto_sample_size
    END;
    After this initial procedure the automatic maintenance task checks from monday to friday at 11 am if the statistics of the database objects are still ok. For objects with old statistics they are newly generated.
    The first question is with which parameters the automatic maintenance task executes the dbms_stats.gather_... for the objects with old statistics. In my opinion it'll take the same options as specified in the initial procedure (options=GATHER AUTO and estimate_percent=dbms_stats.auto_sample_size). Am I right?
    The second question belongs also to the parameter of the dmbs_stats procedure - but in another context:
    Some used tools generate statistics too after intensive workload, they execute the following:
    execute DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'DBUSER',
    options => 'GATHER EMPTY',
    estimate_percent => 70
    execute DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'DBUSER',
    options => 'GATHER STALE',
    estimate_percent => 70
    So what happens to my automatic maintenance task after these two procedure calls? Do these two procedures overwrite the inital provided option (GATHER AUTO) which is required for automatic statistics collection? If yes does it mean that the automatic statistics collector doesn't maintain the database objects any more?
    Thanks for your help!
    Best regards!
    Markus

    1. There is a database and table option called MONITORING. By default this is turned on from 10g. So database is watching for changes and will collect statistics on tables/objects where needed in GATHER AUTO option.
    2. No GATHER AUTO options wont be touched but you recollect stats on objects you specified in function/procedure call. And if those objects wont change in the future AUTO GATHER may wont touch these stats anymore....
    This is a doc reference list I created when I was working on similar issue. :)
    Best Practices for automatic statistics collection on Oracle 10g [ID 377152.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=BULLETIN&id=377152.1
    How to check what automatic statistics collection is scheduled on 10g [ID 377143.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=377143.1
    How To Extend Maintenance Windows For GATHER_STATS_JOB for More Than 8 Hours? [ID 368475.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=368475.1
    Oracle 10g PL/SQL Packages and Types Reference - DBMS_SCHEDULER documentation
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHHBGGI
    Oracle 10g PL/SQL Packages and Types Reference - DBMS_STATS documentation
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#CIHBIEII
    Oracle® Database Performance Tuning Guide 10g Release 2 (10.2) 14 Managing Optimizer Statistics 14.2 Automatic Statistics Gathering
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
    Statistics Best Practices: How to Backup and Restore Statistics [ID 464939.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=464939.1
    Managing CBO Stats during an upgrade to 10g or 11g [ID 465787.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=465787.1

  • How to stop the auto-start of log reader agent (replication) right after my database is restored?

    I have the scenario where the SQL server is restored (after migration).
    This database has transactional replication set-up on one of the databases. When I do a manual delete and restore of the database, I see that the replication starts right after the publisher and subscriber are restored.
    Replication agents should not start and run before the integrity checks are completed. How to stop the replication from auto starting right after the migration?
    Thanks in advance - Jebah

    Thanks Pradyothana, I have disabled the logreader, distribution agents through sp_update_job in Tsql script. I have also verified that there are no pending transactions to be replicated to the subscriber, I see that the job is still being executed. Is there
    any other way to disable the jobs?
    Steps I followed
    Started with a Working publication and subscription
    Disabled the jobs (log reader and distribution agents)
    Backed up publisher, subscriber, distribution and msdb
    Deleted the publication, subscription, publisher and subscriber
    Restored the publisher, subscriber, distribution and msdb
    Enabled the jobs and executed sp_replrestart
    Observations/Issues
    Replication does not work
    Replication monitor does not show any error
    Jobs are shows as enabled but not started in job monitor
    Not able to start/stop the log reader and synchronization manually.
    I am not sure if I have missed something while restoring the db.
    Thanks in advance

  • How do I set Lightroom not to automatically jump to a collection set after I creat one?

    How do I set Lightroom not to automatically jump to a collection set after I create one? Its so annoying. Also, why does lightroom close my folder hierarchy every time I move a folder? Thats annoying too.

    No way that I know of Josef but you can place a comment here about the issue. This is the new way to have your issues raised and heard.

  • HT2907 How do you stop inadvertent contact with the touch screen? Why no Lock Button?  Doesn't anyone work out at Apple??  MY Gen 7 also doesn't link to workout equipment automatically like my Gen 6 and I can't stop the bloody voiceover.  Any thoughts?

    How do you stop inadvertent contact with the touch screen? Why no Lock Button?  Doesn't anyone work out at Apple??  MY Gen 7 also doesn't link to workout equipment automatically like my Gen 6 and I can't stop the bloody voiceover.  Any thoughts?

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              

  • HT5295 How can I stop the auto play feature automatically playing/streaming the next podcast?

    How can I stop the auto play feature automatically playing/streaming the next podcast?

    Hi there.
    I listened to podcast there were two things I found that helped me out. Both we're in the podcast app itself.
    Firstly change the default sorting order. When looking at the list off episodes a available on your ios device tap on the description part at the top, this will bring up the settings for that podcast (subscribe mark as played etc) scroll to the Bottom and select oldest first. This will mean that if you are listening to the latest download it will stop at the end as there will be no more to play.
    Secondly, and useful if listening to older podcasts in the list, you can use the timer to stop once the current episode has ended. To do this when you are in the podcast playback screen slide the "album artwork" up, revealing the playback options and nifty tape playing animation this is where you adjust playback speed and set a timer. The timer has a number of options to set playback to stop after set amount of time. However one of these options is to stop once the current episode you are listening to ends. This can also be current chapter if the podcast you are listening to supports chapters.
    Hope this helps, if not clear let me know

  • How can I automatically close a dialog box using Javascript after I click the OK button to submit it?

    How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
    Thanks
    Linda

    JS can not interact with open dialogs in any way, unless it's a dialog
    created in JS using the Dialog object.
    On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]>

Maybe you are looking for