- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
4#
发表于 2012-7-31 13:24:52
10g中使用scheduler job接口管理 自动收集统计信息作业, 在11g中更进一步使用专门的 auto task 接口专门管理 自动统计信息作业 及 新加入的SQL TUNING作业
In Oracle10g they were created as separate jobs and visible in DBA_SCHEDULER_JOBS.JOB_NAME.
This has changed in Oracle 11g. The related view is DBA_AUTOTASK_WINDOW_CLIENTS.
The jobs are now only visible in DBA_SCHEDULER_JOBS with their system generated name once they are really executed.
GATHER_STATS_JOB
By default, GATHER_STATS_JOB is created during database creation, executes the
DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC procedure, and uses the Scheduler
(as shown in the diagram). Two windows are also defined by default:
• WEEKNIGHT_WINDOW defined between 10 PM and 6 AM daily from Monday through
Friday
• WEEKEND_WINDOW defined between 12 AM on Saturday and 12 AM on Monday
The default MAINTENANCE_WINDOW_GROUP is also defined to contain these windows.
GATHER_STATS_JOB uses a specific Scheduler class called AUTO_TASKS_JOB_CLASS.
This class is automatically created and is associated with a specific resource consumer group,
called AUTO_TASKS_CONSUMER_GROUP. This ensures that the task uses the
AUTO_TASKS_CONSUMER_GROUP. If you want to control resources used by
GATHER_STATS_JOB, define a resource manager plan for the
MAINTENANCE_WINDOW_GROUP that allocates resources for
AUTO_TASKS_CONSUMER_GROUP.
For GATHER_STATS_JOB to work properly, you must be sure that the STATISTICS_LEVEL
initialization parameter is set to at least TYPICAL.
Note: If GATHER_STATS_JOB exceeds the allocated time window defined by
MAINTENANCE_WINDOW_GROUP, the job continues until it is finished.
Changing the GATHER_STATS_JOB Schedule
You can customize the open times of the defined management windows by changing the time
interval and repeat frequency. You can also add resource plans to these windows to control the
resources used by GATHER_STATS_JOB.
You can perform this customization from Database Control > Server > Oracle Scheduler, and
then click the Windows link. The Scheduler Windows page is displayed, where you can select a
window and click the Edit button to change its characteristics.
Note: Although it is not recommended, you can disable automatic statistics gathering from
Database Control by going to the Jobs page from the Server tab and then disabling the
GATHER_STATS_JOB |
|