error on auto execute of job "SYS"."PURGE_LOG"錯誤分析
資料庫版本11.2.0.3 for Linux x86-64bit,告警日誌有如下報錯:
Tue Feb 05 17:00:01 2013
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_j000_1416.trc:
ORA-12012: error on auto execute of job "SYS"."PURGE_LOG"
ORA-04063: package body "SYS.DBMS_AQADM_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_AQADM_SYS"
ORA-06512: at "SYS.DBMS_ISCHED", line 678
ORA-06512: at "SYS.DBMS_SCHEDULER", line 3425
......
Tue Feb 05 17:23:26 2013
Archived Log entry 2543 added for thread 1 sequence 2543 ID 0x4f636503 dest 1:
Tue Feb 05 18:00:00 2013
Closing scheduler window
Closing Resource Manager plan via scheduler window
Clearing Resource Manager plan via parameter
執行下面的SQL查詢PURGE_LOG JOB資訊:
SQL> select owner, program_name, program_type, program_action
2 from dba_scheduler_programs
3 where (owner, program_name) in
4 (select owner, program_name
5 from dba_scheduler_jobs
6 where job_name = 'PURGE_LOG');
OWNER PROGRAM_NAME PROGRAM_TYPE PROGRAM_ACTION
----- ------------------------------ ---------------- ------------------------------
SYS PURGE_LOG_PROG STORED_PROCEDURE dbms_scheduler.auto_purge
參考文章:http://www.dba-oracle.com/job_scheduling/job_run_details.htm,dbms_scheduler.auto_purge是根據LOG_HISTORY屬性清除過期的scheduler日誌資訊,視窗期是每天下午的5~6點,預設scheduler日誌保留的天數為30天。執行下面的SQL語句查詢LOG_HISTORY的屬性值:
SQL> select attribute_name, value
2 from dba_scheduler_global_attribute
3 where attribute_name = 'LOG_HISTORY';
ATTRIBUTE_NAME VALUE
------------------------------ ----------
LOG_HISTORY 30
該儲存過程也可以手動執行:
SQL> exec dbms_scheduler.auto_purge;
PL/SQL 過程已成功完成。
相關METALINK文章:
Resource Manager and Sql Tunning Advisory DEFAULT_MAINTENANCE_PLAN [ID 786346.1]
修改時間:2012-4-24型別:PROBLEM狀態:MODERATED優先順序:3
In this Document
Symptoms |
Cause |
Solution |
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. |
Applies to:
Oracle Server - Enterprise Edition - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]Oracle Server - Enterprise Edition - Version 11.1.0.6 to 11.1.0.7 [Release 11.1]
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7 and 11.2.0.1 to 11.2.0.3
Symptoms
After upgrade to 11g getting the following messages in the alert.log.
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Thu Feb 05 22:00:03 2009
Begin automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Thu Feb 05 22:00:39 2009
End automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Is database resource manager and sql tuning advisor being turned on by default in 11g.
Cause
Summary of changes between 10g and 11g.
Resource Manager:
Subject | 10g | 11g |
---|---|---|
Maintenance Window | 2 windows, WEEK and WEEKEND | Each day has its own window |
Resource manager | Not enabled per default | Default resource plan specified |
Sql Tunning Advisory:
So this is a default behavior. in Oracle 11g.
Solution
1]. To disable the resource manager you can use the below steps.
alter system set resource_manager_plan='' scope=both
++ change the active windows to use the null resource manager plan (or other nonrestrictive plan) using:
execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN',''); and
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
++ Then, for each window_name (WINDOW_NAME from DBA_SCHEDULER_WINDOWS), run:
SQL> execute dbms_scheduler.set_attribute('
2]. To disable SQL tunning you can use the below procedure.
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
END;
/
相關bug一例:
High "Resmgr:Cpu Quantum" Wait Events In 11g Even When Resource Manager Is Disabled [ID 949033.1]
修改時間:2013-1-25型別:PROBLEM狀態:PUBLISHED優先順序:3
In this Document
Symptoms |
Cause |
Solution |
References |
Applies to:
Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.
***Checked for relevance on 18-NOV-2011***
Symptoms
Issuing a sqlplus / as sysdba might be hanging and/or high waits on event 'resmgr:cpu quantum' might be noticed even when resource manager is disabled.
You already have confirmed parameter RESOURCE_MANAGER_PLAN is set to null but still noticing the above wait events.
Top 5 Timed Foreground Events:
Event Waits Time(s) Avg wait(ms) % DB time Wait Class ------------------------ ------- -------- ------------ -------------- ---------- ----------- resmgr:cpu quantum 1,596 346,281 216968 89.19 Scheduler db file scattered read 171,071 14,778 86 3.81 User I/O log file sync 28,575 10,810 378 2.78 Commit db file sequential read 943,457 6,569 7 1.69 User I/O DB CPU 2,133 0.55
Cause
This could be due to DEFAULT_MAINTENANCE_PLAN. From 11g onwards every weekday window has a pre-defined Resource Plan called DEFAULT_MAINTENANCE_PLAN, which will become active once the related window opens.
Following entries can also be noted in alert log at the time of issue.
Clearing Resource Manager plan via parameter
:
Wed Sep 16 22:00:00 2009
Setting Resource Manager plan SCHEDULER[0x2C55]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Wed Sep 16 22:00:05 2009
Begin automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Solution
Please review the following document first to address any known bugs:
Note 392037.1 - Database 'Hangs'. Sessions Wait for 'resmgr:cpu quantum'
It may be better to move the maintenance windows to a time of day when CPU resources might be more available for such tasks to run and complete.
The following solution should only be used as a last resort because it may lead to other issues in the long run if Oracle has inadequate maintenance windows to collect new optimizer stats, find better execution plans for expensive SQL, purge AWR, etc.
To disable the DEFAULT_MAINTENANCE_PLAN you can use the below steps as suggested in Note 786346.1
1. Set the current resource manager plan to null (or another plan that is not restrictive):
2. Change the active windows to use the null resource manager plan (or other nonrestrictive plan) using:
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
3. Then, for each window_name (WINDOW_NAME from DBA_SCHEDULER_WINDOWS), run:
References
NOTE:392037.1 - Database 'Hangs'. Sessions Wait for 'resmgr:cpu quantum'
參考文章:《11g:排程程式維護任務或 Autotasks [ID 1526120.1]》:https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1526120.1
--end--
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-754299/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12.2 報錯:ORA-12012: error on auto execute of job “SYS”.”ORA$AT_OS_OPT_SY_7458″OracleError
- Disable the Evolve Job SYS_AUTO_SPM_EVOLVE_TASK in Oracle 12cOracle
- mongodb錯誤解決辦法-bash: ./mongod: cannot execute binary file: Exec format errorMongoDBORMError
- Job for mysqld.service failed because the control process exited with error code錯誤解決MySqlAIError
- 【ERROR】ORA-8103錯誤分析處理Error
- Http failure response 0 Unknown error 錯誤分析HTTPAIError
- Laravel NO_AUTO_CREATE_USER 錯誤Laravel
- MySQL error 錯 誤 碼MySqlError
- PostgreSQL error 錯誤碼SQLError
- Error page: / Error infos: DedeCms錯誤警告Error
- Error Curves——錯誤曲線Error
- Angular 錯誤訊息:ERROR Error NullInjectorError No provider for XXAngularErrorNullIDE
- MySQL AttributeError: ‘Engine’物件沒有’execute’屬性的錯誤MySqlError物件
- Js錯誤Error物件詳解JSError物件
- Fatal NI connect error 12170 錯誤Error
- 15-錯誤處理(Error)Error
- dedecms 搬家 / dedecms error warning!錯誤Error
- HTTP 錯誤 500.19- Internal Server Error 錯誤解決方法HTTPServerError
- 執行SQL發生錯誤!錯誤:disk I/O errorSQLError
- NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load xxxx錯誤解決方法ErrorAIXMLHTTP
- android 打包出現錯誤Error: ResourceNameAndroidError
- PHP curl error 60 錯誤解決PHPError
- Python錯誤:PyCharm 安裝出錯 Internal error,please。。。PythonPyCharmError
- 錯誤處理:如何通過 error、deferred、panic 等處理錯誤?Error
- 【Jenkins】data stream error|Error cloning remote repo ‘origin‘ 錯誤解決JenkinsErrorREM
- Angular 依賴注入錯誤訊息:ERROR Error NullInjectorError No provider for XXAngular依賴注入ErrorNullIDE
- mysql 索引長度 767 錯誤 ERROR 1071MySql索引Error
- 【ERROR】Oracle列印錯誤程式碼解釋ErrorOracle
- SAP Java Connector 錯誤 - JCO_ERROR_COMMUNICATIONJavaError
- 【ERROR】JOB執行DDL語句報錯ORA-06550 & PLS-00103Error
- SAP HANA 錯誤訊息 SYS_XSA authentication failed SQLSTATE - 28000AISQL
- Mysql連線錯誤ERROR 2003 (HY000)MySqlError
- QT中error: xxx does not name a type xxx錯誤QTError
- HTTP 錯誤 500.21 - Internal Server Error 解決方案HTTPServerError
- 2、MySQL錯誤日誌(Error Log)詳解MySqlError
- 解決 eslint 的 Parsing error: Unexpected token 錯誤EsLintError
- Golang 學習——error 錯誤處理淺談GolangError
- HTTP 錯誤 500.19 - Internal Server Error v4.0.30319HTTPServerError
- 使用Boost庫報error C4996錯誤Error996