oerr錯誤查詢工作的使用與ora-56729錯誤的處理
oerr是oracle資料庫中非常重要的錯誤查詢工具,在實際工作和問題處理中,熟練使用oerr錯誤查詢工具對oracle問題的定位和解決,有非常重要的幫助作用。
我前段時間遇到一個非常少見的錯誤 ora-56729 ,當時採用其他方法處理了,事後模擬錯誤問題,並嘗試使用oerr工具進行問題定位,對問題的幫助和處理有更加快捷的作用。
oerr預設在$ORACLE_HOME/bin 目錄下,如果不熟悉可以使用下面的步驟找到oerr工具並進行錯誤定位,
oerr工具的定位:
$ whereis oerroerr:
$ find /u01 -name oerr
/u01/app/oracle/product/11.2.0/dbhome_1/bin/oerr
/u01/app/agent11g/bin/oerr
find: /u01/lost+found: Permission denied
/u01/app/oracle/product/11.2.0/dbhome_1/bin/oerr
/u01/app/agent11g/bin/oerr
find: /u01/lost+found: Permission denied
oerr工具的使用示例:
$ cd /u01/app/oracle/product/11.2.0/dbhome_1/
$ cd bin
$ oerr -h
Usage: oerr facility error
Facility is identified by the prefix string in the error message.
For example, if you get ORA-7300, "ora" is the facility and "7300"
is the error. So you should type "oerr ora 7300".
If you get LCD-111, type "oerr lcd 111", and so on.
$
$ cd /u01/app/oracle/product/11.2.0/dbhome_1/
$ cd bin
$ oerr -h
Usage: oerr facility error
Facility is identified by the prefix string in the error message.
For example, if you get ORA-7300, "ora" is the facility and "7300"
is the error. So you should type "oerr ora 7300".
If you get LCD-111, type "oerr lcd 111", and so on.
$
$ oerr ora 56729
56729, 00000, "Failed to bind the database instance to processor group %s"
// *Cause: Binding the database instance to the processor group specified by
// the PROCESSOR_GROUP_NAME parameter failed.
// *Action: Set the PROCESSOR_GROUP_NAME to a valid, configured processor
// group and restart the database instance.
// *Cause: Binding the database instance to the processor group specified by
// the PROCESSOR_GROUP_NAME parameter failed.
// *Action: Set the PROCESSOR_GROUP_NAME to a valid, configured processor
// group and restart the database instance.
ora-56729錯誤問題再現:
$ p1
$ s
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 2 20:42:49 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SYS @PROD1>startup
ORACLE instance started.
Total System Global Area 941600768 bytes
Fixed Size 1348860 bytes
Variable Size 549456644 bytes
Database Buffers 385875968 bytes
Redo Buffers 4919296 bytes
Database mounted.
Database opened.
SYS @PROD1>
SYS @PROD1>
SYS @PROD1>show parameter process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
cell_offload_processing boolean TRUE
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 1000
log_archive_max_processes integer 4
processes integer 150
processor_group_name string
SYS @PROD1>
SYS @PROD1>alter system set processor_group_name=18;
alter system set processor_group_name=18
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SYS @PROD1>alter system set processor_group_name=18 scope=spfile;
System altered.
SYS @PROD1>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS @PROD1>
SYS @PROD1>startup
ORA-56729: Failed to bind the database instance to processor group 18;
Additional Information: cpuset not found in /proc/mounts at skgsnmvpgs:3
SYS @PROD1>
$ s
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 2 20:42:49 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SYS @PROD1>startup
ORACLE instance started.
Total System Global Area 941600768 bytes
Fixed Size 1348860 bytes
Variable Size 549456644 bytes
Database Buffers 385875968 bytes
Redo Buffers 4919296 bytes
Database mounted.
Database opened.
SYS @PROD1>
SYS @PROD1>
SYS @PROD1>show parameter process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
cell_offload_processing boolean TRUE
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 1000
log_archive_max_processes integer 4
processes integer 150
processor_group_name string
SYS @PROD1>
SYS @PROD1>alter system set processor_group_name=18;
alter system set processor_group_name=18
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SYS @PROD1>alter system set processor_group_name=18 scope=spfile;
System altered.
SYS @PROD1>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS @PROD1>
SYS @PROD1>startup
ORA-56729: Failed to bind the database instance to processor group 18;
Additional Information: cpuset not found in /proc/mounts at skgsnmvpgs:3
SYS @PROD1>
到這個地方會發現執行startup的時候,直接報錯,不能正常啟動例項;觀察alert日誌,會發現沒有任何新的資訊,連oracle啟動nomount階段會啟動程式分配記憶體的記錄都沒有。
ora 56729問題解決方法:
使用oerr工具確認錯誤產生原因和解決方法:
$ oerr ora 56729
56729, 00000, "Failed to bind the database instance to processor group %s"
// *Cause: Binding the database instance to the processor group specified by
// the PROCESSOR_GROUP_NAME parameter failed.
// *Action: Set the PROCESSOR_GROUP_NAME to a valid, configured processor
// group and restart the database instance.
// *Cause: Binding the database instance to the processor group specified by
// the PROCESSOR_GROUP_NAME parameter failed.
// *Action: Set the PROCESSOR_GROUP_NAME to a valid, configured processor
// group and restart the database instance.
透過oerr可知,ora-56729錯誤是由於一個程式組相關引數設定不當,造成資料庫無法正常啟動的,於是採用下面的步驟進行問題確認和解決。
SYS @PROD1>
SYS @PROD1>create pfile from spfile;
File created.
SYS @PROD1>host cat /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initPROD1.ora |grep process
*.log_archive_max_processes=4
*.processes=150
*.processor_group_name='18'
在pfile中註釋掉 processor_group_name一行的引數配置;
SYS @PROD1>
SYS @PROD1>host cat /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initPROD1.ora |grep process
*.log_archive_max_processes=4
*.processes=150
SYS @PROD1>
SYS @PROD1>create spfile from pfile;
File created.
SYS @PROD1>startup
ORACLE instance started.
Total System Global Area 941600768 bytes
Fixed Size 1348860 bytes
Variable Size 549456644 bytes
Database Buffers 385875968 bytes
Redo Buffers 4919296 bytes
Database mounted.
Database opened.
SYS @PROD1>
SYS @PROD1>show parameter process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
cell_offload_processing boolean TRUE
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 1000
log_archive_max_processes integer 4
processes integer 150
processor_group_name string
SYS @PROD1>
總結:
透過上面的錯誤問題的定位和處理,可以看到oerr工具對oracle錯誤產生原因和解決方法的重要啟發作用,在實際工作中用好這個工具,將對dba的工作有非常大的幫助。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29067253/viewspace-2113821/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- go的錯誤處理Go
- 錯誤處理
- 使用 clearError 清除已處理的錯誤Error
- 使用PHP錯誤處理 (轉)PHP
- axios 的錯誤處理iOS
- COM的錯誤處理 (轉)
- PHP 錯誤處理PHP
- php錯誤處理PHP
- Go 錯誤處理Go
- Swift錯誤處理Swift
- Zabbix錯誤處理
- mysqldump錯誤處理MySql
- node錯誤處理與日誌
- [轉] Scala Try 與錯誤處理
- oracle 自帶錯誤提示工具oerrOracle
- [譯] 使用 Catcher 處理 Flutter 錯誤Flutter
- 日誌查詢錯誤
- 請教 Element 的錯誤處理
- Restful API 中的錯誤處理RESTAPI
- 【譯】RxJava 中的錯誤處理RxJava
- grpc中的錯誤處理RPC
- JavaScript的錯誤簡易處理JavaScript
- 錯誤處理:如何通過 error、deferred、panic 等處理錯誤?Error
- 前端的水平線,錯誤處理和除錯前端除錯
- php錯誤與異常處理方法PHP
- Laravel Exceptions——異常與錯誤處理LaravelException
- Python錯誤處理Python
- delphi 查詢av錯誤地址
- API的設計(1) - 錯誤處理API
- Go 的錯誤處理策略 筆記Go筆記
- 基於 React Redux 的錯誤處理ReactRedux
- Bash 指令碼中的錯誤處理指令碼
- JavaScript 錯誤處理的最佳實踐JavaScript
- javascript中的錯誤處理機制JavaScript
- ORA-04031錯誤的處理
- 一次scheduler錯誤的處理
- 錯誤處理的一點思考 (轉)
- 應用中的錯誤處理概述