這裡簡單介紹一下如何處理解決Linux平臺下Oracle 19c啟動時,告警日誌出現ORA-00800錯誤的問題,詳情介紹請見下麵內容: 環境描述: 操作系統:Red Hat Enterprise Linux release 8.8 (Ootpa) 資料庫 :19.16.0.0.0 企業版 問題描述 ...
這裡簡單介紹一下如何處理解決Linux平臺下Oracle 19c啟動時,告警日誌出現ORA-00800錯誤的問題,詳情介紹請見下麵內容:
環境描述:
操作系統:Red Hat Enterprise Linux release 8.8 (Ootpa)
資料庫 :19.16.0.0.0 企業版
問題描述:
在Oracle 19c啟動時,在Oracle的告警日誌中會出現下麵這樣一條告警信息:
Errors in file /opt/oracle19c/diag/rdbms/gsp/gsp/trace/gsp_vktm_1900.trc (incident=51251) (PDBNAME=CDB$ROOT):
ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration], [Check Oracle documen
t and MOS notes], []
Incident details in: /opt/oracle19c/diag/rdbms/gsp/gsp/incident/incdir_51251/gsp_vktm_1900_i51251.trc
分析解決:
分析ORA-00800錯誤的信息,我們可以知道這個錯誤是由於不正確的系統配置或資料庫設置導致的。這個失敗目前對實例不是致命的,但是,這可能會導致在查詢執行期間發生意外行為。所以最好還是解決掉這個問題
$ oerr ora 00800
00800, 00000, "soft external error, arguments: [%s], [%s], [%s], [%s], [%s]"
// *Cause: An improper system configuration or setting resulted in failure.
// This failure is not fatal to the instance at the moment, however, this might result
// in an unexpected behavior during query execution.
// *Action: Check the database trace files and rectify system settings or the configuration.
// For additional information, refer to Oracle database documentation or refer to
// My Oracle Support (MOS) notes.
首先,我們檢查oradism文件的許可權
$ cd $ORACLE_HOME/bin
$ ls -lrt oradism
-rwsr-x--- 1 root oinstall 147848 Apr 17 2019 oradism
如上所示,檢查發現oradism文件的許可權正常,如果它的許可權不正常,那麼就必須修改其許可權(使用root用戶授權)
chown root $ORACLE_HOME/bin/oradism
chmod 4750 $ORACLE_HOME/bin/oradism
然後我們檢查資料庫的優先順序別:VKTM還是LMS*
SQL> set linesize 680
SQL> col Parameter for a30
SQL> col "Session Value" for a16
SQL> col "Instance Value" for a16
SQL> col "Description" for a30
SQL> select a.ksppinm "Parameter", b.ksppstvl "Session Value", c.ksppstvl "Instance Value", a.KSPPDESC "Description"
2 from x$ksppi a, x$ksppcv b, x$ksppsv c
3 where a.indx = b.indx and a.indx = c.indx and a.ksppinm like '_%' and a.ksppinm like '_highest_priority_process%';
Parameter Session Value Instance Value Description
------------------------------ ---------------- ---------------- ------------------------------
_highest_priority_processes VKTM VKTM Highest Priority Process Name
Mask
SQL>
如上所示,此參數值設置正確,如果不正確的話,那麼必須優先順序為VKTM
alter system set "_high_priority_processes"='VKTM' scope=spfile;
然後我們檢查Cgroup配置
$ ps -eaf|grep -i vktm |grep -v grep
oracle 1900 1 0 13:53 ? 00:00:00 ora_vktm_gsp
$ cat /proc/1900/cgroup | grep cpu
7:cpu,cpuacct:/user.slice
2:cpuset:/
$ ps -eaf|grep -i pmon|grep -v grep
oracle 1888 1 0 13:53 ? 00:00:00 ora_pmon_gsp
$ cat /proc/1888/cgroup | grep cpu
7:cpu,cpuacct:/user.slice
2:cpuset:/
檢查發現設置顯示其他路徑,檢查cpu.rt_runtime_us的值,如下所示
# cat /sys/fs/cgroup/cpu,cpuacct/system.slice/cpu.rt_runtime_us
0
# cat /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us
0
根據官方文檔其值應該為0和950000,可以使用下麵命令修改,但是系統重啟後,此參數設置會失效
echo 0 > /sys/fs/cgroup/cpu,cpuacct/system.slice/cpu.rt_runtime_us
echo 950000 > /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us
如果要使其永久生效,我們必須在cgconfig.conf文件中設置,具體操作也很簡單,官方文檔[1]中有詳細步驟,具體如下所示:
Install libcgroup-tools* on the system. (You can find this package on OL7 latest repository)
# yum install libcgroup-tools
/etc/cgconfig.conf will be created automatically when you start cgconfig service
# systemctl start cgconfig
Edit /etc/cgconfig.conf with user.slice parameter below.
group user.slice {
cpu {
cpu.rt_period_us = 1000000;
cpu.rt_runtime_us = 950000;
}
}
Restart cgfconfig service so the value will take effect.
# systemctl restart cgconfig
Enable cgconfig so it will take effect during reboot.
#systemctl enable cgconfig
Reboot the server and check the value if it is now persistent.
處理過後,驗證測試,這個錯誤解決了。重啟Oracle實例,告警日誌中不會出現ORA-00800錯誤了。問題解決了,更多詳細分析,建議參考ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM] (Doc ID 2931494.1)[2]
參考資料
1: https://support.oracle.com/epmos/faces/DocumentDisplay?id=2718971.1&displayIndex=1#FIX
[2]2: https://support.oracle.com/epmos/faces/DocumentDisplay?id=2718971.1