Solve the problem that the database cannot automatically collect statistics due to oracle11g installation.

Source: Internet
Author: User

Solve the problem that the database cannot automatically collect statistics due to oracle11g installation.

Recently, it was found that some 11 GB databases could not automatically collect statistics. 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 ENABLEDSQL>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 DISABLEDFRIDAY_WINDOW DISABLEDSATURDAY_WINDOW DISABLEDTHURSDAY_WINDOW DISABLEDTUESDAY_WINDOW DISABLEDSUNDAY_WINDOW DISABLEDMONDAY_WINDOW DISABLED7 rows selected

All jobs are found to be DISABLED. The test shows that the "Enable Automatic maintenance task" option is the same as the "Enable Automatic maintenance task" option during database installation (selected by default). This option may be deselected during DBA installation, for example:

Because "Enable Automatic maintenance task" is not checked, the data installation will execute the following command, causing the job to disable:

Execute DBMS_AUTO_TASK_ADMIN.disable ();

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

SQL> execute DBMS_AUTO_TASK_ADMIN.enable();PL/SQL procedure successfully completedSQL> select window_name,autotask_status from DBA_AUTOTASK_WINDOW_CLIENTS;WINDOW_NAME AUTOTASK_STATUS------------------------------ ---------------WEDNESDAY_WINDOW ENABLEDFRIDAY_WINDOW ENABLEDSATURDAY_WINDOW ENABLEDTHURSDAY_WINDOW ENABLEDTUESDAY_WINDOW ENABLEDSUNDAY_WINDOW ENABLEDMONDAY_WINDOW ENABLED7 rows selected

 

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.