Resolving an Oracle 11g installation causes the database to not collect statistics automatically

Source: Internet
Author: User

Recently found that individual 11G databases do not automatically collect statistics, and some view query results are as follows:

Sql> Select Client_name,status from dba_autotask_client where client_name = ' Auto Optimizer stats collection ';

Client_name STATUS
---------------------------------------------------------------- --------
Auto Optimizer Stats Collection ENABLED

Sql>

Sql> select Client_name,status from Dba_autotask_task;

Client_name STATUS
---------------------------------------------------------------- --------

Sql>
Sql> select Window_name,autotask_status from dba_autotask_window_clients;

Window_name Autotask_status
------------------------------ ---------------
Wednesday_window DISABLED
Friday_window DISABLED
Saturday_window DISABLED
Thursday_window DISABLED
Tuesday_window DISABLED
Sunday_window DISABLED
Monday_window DISABLED

7 Rows selected

The discovery job is all disabled, the test discovery and the database installation did not check the "Enable Automatic maintenance task" of the same phenomenon (the default tick), may be before the DBA installation of the uncheck, such as:


Because the Enable automatic maintenance task is unchecked, the data installation executes the following command, causing the job to disable:

Execute dbms_auto_task_admin.disable ();

In the future, if you need to start the automatic maintenance task, just execute the following command:

Sql> execute dbms_auto_task_admin.enable ();

PL/SQL procedure successfully completed

Sql> select Window_name,autotask_status from dba_autotask_window_clients;

Window_name Autotask_status
------------------------------ ---------------
Wednesday_window ENABLED
Friday_window ENABLED
Saturday_window ENABLED
Thursday_window ENABLED
Tuesday_window ENABLED
Sunday_window ENABLED
Monday_window ENABLED

7 Rows selected

Resolving an Oracle 11g installation causes the database to not collect statistics automatically

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.