1. 程式人生 > >Oracle 統計資訊視窗的相關知識

Oracle 統計資訊視窗的相關知識

 

生產環境有一套庫從10月份開始,統計資訊收集的動作就變的不正常,後來通過手動drop視窗,重新建立統計資訊視窗解決。

****************
查詢視窗狀態
****************
select * from dba_autotask_window_clients; WINDOW_NAME WINDOW_NEXT_TIME WINDO AUTOTASK OPTIMIZE SEGMENT_ SQL_TUNE HEALTH_M ------------------------------ ---------------------------------------- ----- -------- -------- -------- -------- -------- MONDAY_WINDOW 03-DEC-18 10.00.00.000000 PM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED TUESDAY_WINDOW 27-NOV-18 10.00.00.000000 PM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED WEDNESDAY_WINDOW 28-NOV-18 10.00.00.000000 PM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED THURSDAY_WINDOW 29-NOV-18 10.00.00.000000 PM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED FRIDAY_WINDOW 30-NOV-18 10.00.00.000000 PM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED SATURDAY_WINDOW 01-DEC-18 06.00.00.000000 AM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED SUNDAY_WINDOW 02-DEC-18 06.00.00.000000 AM +08:00 FALSE ENABLED ENABLED DISABLED DISABLED DISABLED

 

********************
查詢視窗的持續時間、重複頻次
********************
select window_name,repeat_interval,duration,enabled from dba_scheduler_windows; WINDOW_NAME REPEAT_INTERVAL DURATION ENABL ------------------------------ ---------------------------------------- ---------------------------------------- ----- WEEKNIGHT_WINDOW freq=daily;byday=MON,TUE,WED,THU,FRI;byh +000 08:00:00 FALSE our=22;byminute=0; bysecond=0 WEEKEND_WINDOW freq=daily;byday=SAT;byhour=0;byminute=0 +002 00:00:00 FALSE ;bysecond=0 MONDAY_WINDOW freq=daily;byday=MON;byhour=22;byminute= +000 04:00:00 TRUE 0; bysecond=0 TUESDAY_WINDOW freq=daily;byday=TUE;byhour=22;byminute= +000 04:00:00 TRUE 0; bysecond=0 WINDOW_NAME REPEAT_INTERVAL DURATION ENABL ------------------------------ ---------------------------------------- ---------------------------------------- ----- WEDNESDAY_WINDOW freq=daily;byday=WED;byhour=22;byminute= +000 04:00:00 TRUE 0; bysecond=0 THURSDAY_WINDOW freq=daily;byday=THU;byhour=22;byminute= +000 04:00:00 TRUE 0; bysecond=0 FRIDAY_WINDOW freq=daily;byday=FRI;byhour=22;byminute= +000 04:00:00 TRUE 0; bysecond=0 SATURDAY_WINDOW freq=daily;byday=SAT;byhour=6;byminute=0 +000 20:00:00 TRUE WINDOW_NAME REPEAT_INTERVAL DURATION ENABL ------------------------------ ---------------------------------------- ---------------------------------------- ----- ; bysecond=0 SUNDAY_WINDOW freq=daily;byday=SUN;byhour=6;byminute=0 +000 20:00:00 TRUE ; bysecond=0

 

********************
查詢視窗的持續時間
********************
DBA_AUTOTASK_WINDOW_HISTORY

CLIENT_NAME          WINDOW_NAME                    WINDOW_START_TIME                        WINDOW_DURATION                          JOBS_CREATED JOBS_STARTED JOBS_COMPLETED WINDOW_END_TIME
-------------------- ------------------------------ ---------------------------------------- ---------------------------------------- ------------ ------------ -------------- ---------------------------------------------------------------------------
auto optimizer stats MONDAY_WINDOW                  26-NOV-18 10.00.00.531345 PM +08:00      +000000000 13:27:27.402436                          1            1           0 27-NOV-18 11.27.27.933781 AM +08:00
 collection

 

********************
查詢視窗的持續時間
********************