绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
监控用户无法查询v$视图报ora-00204 00202 15205 15081 15062错误的处
2023-05-25 11:04:48


近我们遇到一个系统监控的协助申请,通过以一个操作系统用户itsm执行脚本来监控数据库相关状态,

[itsm@n-pc-250 ~]$sqlplus dbmonitor01/xxxxxxxx

SQL> select count(*) from v$database_block_corruption;
select count(*) from v$database_block_corruption
*
ERROR at line 1:
ORA-00204: error in reading (block 1, # blocks 1) of control file
ORA-00202: control file: '+DATA1/RAC03NF/control01.ctl'
ORA-15205: requested mirror side unavailable
ORA-15081: failed to submit an I/O operation to a disk
ORA-15062: ASM disk is globally closed
ORA-15081: failed to submit an I/O operation to a disk
ORA-15062: ASM disk is globally closed
我们尝试查询其他视图报错一样
SQL> select * from v$database_block_corruption;
select * from v$database_block_corruption
*
ERROR at line 1:
ORA-00204: error in reading (block 1, # blocks 1) of control file
ORA-00202: control file: '+DATA1/RAC03NF/control01.ctl'
ORA-15205: requested mirror side unavailable
ORA-15081: failed to submit an I/O operation to a disk
ORA-15062: ASM disk is globally closed
ORA-15081: failed to submit an I/O operation to a disk
ORA-15062: ASM disk is globally closed


SQL> select * from dba_data_files;

SQL> select * from v$database;

从报错看在读取控制文件时报错,但是配置人员反馈使用oracle用户是正常的,此时我们看这个报错的含义如下所示。

[itsm@n-pc-250 ~]$oerr ora 15062
Can't locate English.pm: /oracle/19/perl/lib/5.28.1/English.pm: (null) at /oracle/19/bin/oerr.pl line 45.
BEGIN failed--compilation aborted at /oracle/19/bin/oerr.pl line 45.

[itsm@n-pc-250 ~]$id itsm
uid=510(itsm) gid=510(itsm) groups=510(itsm)
[itsm@n-pc-250 ~]$id oracle
uid=900(oracle) gid=900(oinstall) groups=900(oinstall),901(dba),902(oper),903(backupdba),904(dgdba),905(kmdba),906(asmdba),909(racdba)

[itsm@n-pc-250 ~]$oerr ora 15062
Can't locate English.pm: /oracle/19/perl/lib/5.28.1/English.pm: (null) at /oracle/19/bin/oerr.pl line 45.
BEGIN failed--compilation aborted at /oracle/19/bin/oerr.pl line 45.
[itsm@n-pc-250 ~]$oerr ora 00204
Can't locate English.pm: /oracle/19/perl/lib/5.28.1/English.pm: (null) at /oracle/19/bin/oerr.pl line 45.
BEGIN failed--compilation aborted at /oracle/19/bin/oerr.pl line 45.
[itsm@n-pc-250 ~]$oerr ora 15205
Can't locate English.pm: /oracle/19/perl/lib/5.28.1/English.pm: (null) at /oracle/19/bin/oerr.pl line 45.
BEGIN failed--compilation aborted at /oracle/19/bin/oerr.pl line 45.
[itsm@n-pc-250 ~]$oerr ora 15081
Can't locate English.pm: /oracle/19/perl/lib/5.28.1/English.pm: (null) at /oracle/19/bin/oerr.pl line 45.
BEGIN failed--compilation aborted at /oracle/19/bin/oerr.pl line 45.
我们看该文件的信息,从输出知道这个文件的用户和属组,至少总这里知道oracle用户可以访问这个文件。
[itsm@n-pc-x3650m5-250 ~]$ls -lrt /oracle/19/perl/lib/5.28.1/English.pm
-rwxr-x--- 1 oracle oinstall 4761 Mar 8 08:16 /oracle/19/perl/lib/5.28.1/English.pm

我们再看看其他正常查询到itsm用户和当前itsm用户的信息
正常的
[grid@N-PC-320 ~]$id itsm
uid=510(itsm) gid=900(oinstall) groups=900(oinstall),906(asmdba),907(asmoper),908(asmadmin),909(racdba)
当前的
[grid@n-pc-x3650m5-250 ~]$id itsm
uid=510(itsm) gid=510(itsm) groups=510(itsm)

我们再看看正常的当前的数据库服务器下,asm磁盘的属性信息
正常
[grid@N-PC-320 ~]$ls -lrt /dev/dm*
brw-rw---- 1 grid asmadmin 253, 44 May 24 05:01 /dev/dm-44
brw-rw---- 1 grid asmadmin 253, 40 May 24 05:01 /dev/dm-40
brw-rw---- 1 grid asmadmin 253, 22 May 24 05:01 /dev/dm-22
[root@N-PC-SR650-320 /etc/udev/rules.d]#cat 99-oracle-asmdevices.rules

KERNEL=="dm-*", ENV{DM_UUID}=="mpath-3600b342cfa8aa85df330d1fa7dbe00d1", SYMLINK+="LUN_200G_tjgm51_ora_s1-0001", OWNER="grid", GROUP="asmadmin", MODE="0660"

当前
[grid@n-pc-x3650m5-250 ~]$ls -lrt /dev/mapper/rac*
lrwxrwxrwx 1 root root 8 Mar 28 20:36 /dev/mapper/rac03nf_vmax400k-2_data_500G-11 -> ../dm-59
lrwxrwxrwx 1 root root 8 Apr 6 14:36 /dev/mapper/rac03nf_vmax400k-2_data_500G-13 -> ../dm-61

[itsm@n-pc-x3650m5-250 /etc/udev/rules.d]$cat 99-oracleasm.rules
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-360000970000297200334533030303533",OWNER="grid",SYMLINK+="rac03nf_vmax400k-1_asm_100G-1",GROUP="oinstall",MODE="0660"

在两个文件的访问上需要itsm用户具有对应权限
文件1/oracle/19/perl/lib/5.28.1/English.pm
文件2:ASM磁盘的访问权限 /dev/mapper/rac03nf_vmax400k-2_data_500G-11
从目前来看正常执行的用户itsm符合我们的安装规范,至于itsm用户之前没有关注过,至少从配置看是正确,具有对应文件的访问权限。
但是问题服务器的itsm用户缺少对应属组权限,至于原因可能是就得问负责监控配置的人员了。

后续问题服务器用户itsm增加数组,问题解决
# usermod -G oinstall,asmoper,asmadmin,asmdba,racdba itsm


分享好友

分享这个小栈给你的朋友们,一起进步吧。

Oracle运维新鲜事-技术与管理各占半边天
创建时间:2020-08-04 11:34:57
本技术栈旨在分享技术心得,运维趣事,故障处理经验,调优案例,故障处理涉及集群,DG,OGG,大家生产中遇到的问题基本都会囊括了,我会发布生产库遇到的故障,希望在交流中互助互益,共同提高,也希望大家讨论,如果您有生产中遇到的集群问题,也可以在这里提出来,一起讨论,现实中也帮助不少同学解决了生产库的故障。
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

栈主、嘉宾

查看更多
  • Abraham林老师
    栈主
  • 小雨滴
    嘉宾
  • hawkliu
    嘉宾
  • u_97a59a25246404
    嘉宾

小栈成员

查看更多
  • 栈栈
  • dapan
  • 小菜鸟___
  • hwayw
戳我,来吐槽~