当前位置: 首页 > ORA > 正文

ORA-01031通过truss分析

下面是一位朋友的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/11.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 | 认真就输

该日志由 huangtingzhong 于2015年02月01日发表在 ORA 分类下, 通告目前不可用,你可以至底部留下评论。
原创文章转载请注明: ORA-01031通过truss分析 | 认真就输
关键字: ,