sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

【案例】Oracle报错ORA-01031产生原因和MOS官方解决方法笔记

时间:2016-11-04 19:14   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心案例分析:运维DBA反映Oracle数据库出现报错,通过truss分析报错ORA-01031产生原因并结合MOS官方文档做出解决办法。
关于ORA-01031分析报错,通过truss可以得到如下结果:
truss sqlplus “/as sysdba”
$ more /tmp/truss_sysdba.output
2762: execve(“/oracle/product/11.2/dbhome_1/bin/sqlplus”, 0xFFFFFFFF7FFFFC68, 0xFFFFFFFF7FFFFC90) argc = 4
2762: argv: sqlplus / as sysdba
2762: envp: HOME=/oracle/11.2/oracle LOGNAME=oracle
2762: MAIL=/var/mail//oracle ORACLE_BASE=/oracle/product/11.2
2762: ORACLE_HOME=/oracle/product/11.2/dbhome_1 ORACLE_SID=jyfxdb2
2762: PATH=/oracle/product/11.2/dbhome_1/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/oracle/11.2/oracle/bin:/usr/bin/X11:/sbin:.
2762: SHELL=/bin/sh SSH_CLIENT=135.225.35.76 41300 22
2762: SSH_CONNECTION=135.225.35.76 41300 135.225.35.78 22
2762: SSH_TTY=/dev/pts/4 TERM=vt100 TZ=PRC USER=oracle
2762: sysinfo(SI_MACHINE, “sun4v”, 257) = 6
2762: mmap(0x00000000, 56, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFFFFFFFF7F700000
2762: mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFFFFFFFF7F500000
2762: mmap(0x00000000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFFFFFFFF7F400000
2762: mmap(0x00000000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFFFFFFFF7F300000
2762: memcntl(0xFFFFFFFF7F600000, 27880, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
2762: memcntl(0x100000000, 2496, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
2762: resolvepath(“/usr/lib/sparcv9/ld.so.1”, “/lib/sparcv9/ld.so.1”, 1023) = 20
2762: resolvepath(“/oracle/product/11.2/dbhome_1/bin/sqlplus”, “/oracle/product/11.2/dbhome_1/bin/sqlplus”, 1023) = 41
2762: stat(“/oracle/product/11.2/dbhome_1/bin/sqlplus”, 0xFFFFFFFF7FFFF758) = 0
2762: open(“/var/ld/64/ld.config”, O_RDONLY) Err#2 ENOENT
2762: stat(“/opt/SUNWcluster/lib/sparcv9/libsqlplus.so”, 0xFFFFFFFF7FFFEC80) Err#2 ENOENT
2762: stat(“/oracle/product/11.2/dbhome_1/lib/libsqlplus.so”, 0xFFFFFFFF7FFFEC80) = 0
2762: resolvepath(“/oracle/product/11.2/dbhome_1/lib/libsqlplus.so”, “/oracle/product/11.2/dbhome_1/lib/libsqlplus.so”, 1023) = 47
2762: open(“/oracle/product/11http://www.oracleplus.net.2/dbhome_1/lib/libsqlplus.so”, O_RDONLY) = 3
2762: mmap(0x00100000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFFFFFFFF7F200000
2762: mmap(0x00100000, 1843200, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFFFFFFFF7F000000
………………………
2763: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
2762: fcntl(11, F_SETFD, 0x00000001) = 0
2762: fcntl(10, F_SETFD, 0x00000001) = 0
2763: close(10) = 0
2763: close(11) = 0
2763: getuid() = 101 [101]
2763: setsid() = 2763
2763: execve(“/oracle/product/11.2/dbhome_1/bin/oracle”, 0x10010F110, 0x10022B450)
2763: *** cannot trace across exec() of /oracle/product/11.2/dbhome_1/bin/oracle ***

2762: read(11, ” N T P 0 2 7 6 3\n”, 64) = 10
2762: getpid() = 2762 [2761]
2762: fcntl(11, F_SETFD, 0x00000001) = 0
2762: brk(0x1002310F0) = 0
2762: brk(0x1002350F0) = 0
2762: brk(0x1002350F0) = 0
2762: brk(0x1002390F0) = 0
2762: write(10, “\0 :\0\001\0\0\001 :01 ,”.., 58) = 58
2762: write(10, “0105\0\006\0\0\0\0\0 ( D”.., 261) = 261
2762: read(11, “\0 \0\002\0\0\001 :\f01″.., 8208) = 32
2762: getpid() = 2762 [2761]
2762: write(10, “\0A8\0\006\0\0\0\0\0DEAD”.., 168) = 168
2762: read(11, “\08B\0\006\0\0\0\0\0DEAD”.., 8208) = 139
……………………………………
这里可以看到绿色阴影部分的报错,觉见原因。
1,权限,通过ls -l $ORACLE_HOME/bin/oracle来确认权限
2,属主,确认执行用户属于osdba主,osdba主记录在$ORACLE_HOME/rdbms/lib/config.c文件中
另多详细信息见:
Troubleshooting ORA-1031: Insufficient Privileges While Connecting As SYSDBA [ID 730067.1]
本文固定链接: http://www.htz.pw/2015/02/01/ora-04031%e9%80%9a%e8%bf%87truss%e5%88%86%e6%9e%90.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【案例】Oracle报错ORA-01031产生原因和MOS官方解决方法笔记

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1166.html

Oracle研究中心

关键词:

Oracle报错ORA-01031解决笔记

ORA-01031通过truss分析产生原因