求助:ORA-01031: insufficient privileges
起因:某开发在测试库上,将数据文件不小心删除了(具有较大权限的人),之后尝试自己恢复,以下是他的操作
CREATE CONTROLFILE REUSE DATABASE "KOBRA" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 '/home/oracle/app/oracle/oradata/kobra/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/home/oracle/app/oracle/oradata/kobra/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/home/oracle/app/oracle/oradata/kobra/redo03.log' SIZE 50M BLOCKSIZE 512
DATAFILE
'/home/oracle/app/oracle/oradata/kobra/system01.dbf',
'/home/oracle/app/oracle/oradata/kobra/sysaux01.dbf',
'/home/oracle/app/oracle/oradata/kobra/undotbs01.dbf',
'/home/oracle/app/oracle/oradata/kobra/users01.dbf'
CHARACTER SET ZHS16GBK
;
以上他操作完成之后,reboot了系统
重新登录系统后
问题:
SQL> conn /as sysdba
ERROR:
ORA-01031: insufficient privileges
我尝试了几次,没有成功,以下是我收集的信息
1.
more listener.ora
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.xxx.xxx)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /home/oracle/app/orac
2.
more sqlnet.ora
# sqlnet.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = /home/oracle/app/oracle
3.
uid=501(oracle) gid=501(oinstall) 组=501(oinstall),506(ora_dba) »·¾³=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
more /etc/group | grep oracle
ora_dba:x:506:oracle
more /etc/group | grep 501
oinstall:x:501:
4.strace -o /tmp/strace_sysdba.output -cfT sqlplus / as sysdba生成的文件
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
47.23 0.003505 3 1185 191 open
17.11 0.001270 0 5381 4 read
14.07 0.001044 65 16 socket
13.48 0.001000 14 72 63 shmget
5.96 0.000442 147 3 clone
1.27 0.000094 0 1040 mmap
0.49 0.000036 0 409 munmap
0.40 0.000030 0 165 shmat
0.00 0.000000 0 125 write
0.00 0.000000 0 1035 close
0.00 0.000000 0 193 63 stat
0.00 0.000000 0 170 fstat
0.00 0.000000 0 29 4 lstat
0.00 0.000000 0 67 lseek
0.00 0.000000 0 108 mprotect
0.00 0.000000 0 31 brk
0.00 0.000000 0 178 rt_sigaction
0.00 0.000000 0 38 rt_sigprocmask
0.00 0.000000 0 3 1 ioctl
0.00 0.000000 0 30 21 access
0.00 0.000000 0 6 pipe
0.00 0.000000 0 3 dup
0.00 0.000000 0 12 12 connect
0.00 0.000000 0 4 bind
0.00 0.000000 0 4 execve
0.00 0.000000 0 37 uname
0.00 0.000000 0 165 shmdt
0.00 0.000000 0 55 fcntl
0.00 0.000000 0 2 getdents
0.00 0.000000 0 18 getcwd
0.00 0.000000 0 3 chdir
0.00 0.000000 0 80 80 mkdir
0.00 0.000000 0 2 readlink
0.00 0.000000 0 5 chmod
0.00 0.000000 0 36 getrlimit
0.00 0.000000 0 7 getrusage
0.00 0.000000 0 28 times
0.00 0.000000 0 28 getuid
0.00 0.000000 0 2 getgid
0.00 0.000000 0 10 geteuid
0.00 0.000000 0 1 getegid
0.00 0.000000 0 3 getppid
0.00 0.000000 0 6 3 setsid
0.00 0.000000 0 3 sigaltstack
0.00 0.000000 0 4 arch_prctl
0.00 0.000000 0 9 setrlimit
0.00 0.000000 0 3 gettid
0.00 0.000000 0 13 4 futex
0.00 0.000000 0 1 io_setup
0.00 0.000000 0 4 set_tid_address
0.00 0.000000 0 4 set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00 0.007421 10836 446 total
5.密码文件名称
orapwkobra
刘大有空帮忙看下,谢谢! 不是应该dba组么 就只是删除了控制文件吗?我觉得你得要把系统环境、版本信息、删除的动作,日志等放出来才行 问题找到了
cat $ORACLE_HOME/rdbms/lib/config.c
将该文件里面的dba修改为ora_dba,重新relink all
接下来可以正常登陆了 谢谢,各位热心答复
页:
[1]