Oracle 19c Linux平台启动时出现ORA-00800错误浅析

这里简单介绍一下如何处理解决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
SQLcol Parameter for a30
SQLcol "Session Value" for a16
SQLcol "Instance Value" for a16
SQLcol "Description"  for a30
SQLselect 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]

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


原文始发于微信公众号(DBA闲思杂想录):Oracle 19c Linux平台启动时出现ORA-00800错误浅析

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/227929.html

(0)
小半的头像小半

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!