In this Document
Goal |
Fix |
11g |
10g |
References |
Explain how to find the status of 'GATHER_STATS_JOB' or in fact 'auto optimizer stats collection' in 11g.
In 11g, the automated maintenance task that collects statistics is called 'auto optimizer stats collection'. You can determine its' status by selecting fromDBA_AUTOTASK_CLIENT:
SELECT CLIENT_NAME,
STATUS
FROM DBA_AUTOTASK_CLIENT
WHERE CLIENT_NAME = 'auto optimizer stats collection'
/
CLIENT_NAME STATUS
---------------------------------------------------------------- --------
auto optimizer stats collection ENABLED
The DBA_AUTOTASK_CLIENT view also displays frequency information about current and past automated maintenance tasks in columns MEAN_INCOMING_TASKS_7_DAYS and MEAN_INCOMING_TASKS_30_DAYS so you can see this historical information using a query like:
SELECT CLIENT_NAME ,
STATUS ,
MEAN_INCOMING_TASKS_7_DAYS,
MEAN_INCOMING_TASKS_30_DAYS
FROM DBA_AUTOTASK_CLIENT
WHERE CLIENT_NAME = 'auto optimizer stats collection'
/
For details of the other columns in DBA_AUTOTASK_CLIENT,
see:
The following is the 'old method' for checking the current and past automated maintenance tasks:
SELECT j.job_name ,
j.program_name ,
j.schedule_name,
j.job_class ,
p.enabled
FROM dba_scheduler_programs p,
dba_scheduler_jobs j
WHERE p.program_name=j.program_name;
JOB_NAME
------------------------------
PROGRAM_NAME
--------------------------------------------------------------------------------
SCHEDULE_NAME
--------------------------------------------------------------------------------
JOB_CLASS ENABL
------------------------------ -----
..
GATHER_STATS_JOB
GATHER_STATS_PROG
MAINTENANCE_WINDOW_GROUP
AUTO_TASKS_JOB_CLASS TRUE
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning and Real Application Testing options
SQL> SELECT job_name ,
job_type ,
program_name ,
schedule_name,
job_class
FROM dba_scheduler_jobs
WHERE job_name = 'GATHER_STATS_JOB';
no rows selected
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |