需求:安装BEPL的时候要求10gR2(10.2.0.3.0)数据库。并要求提供sys用户远程登陆。
数据库版本:10gR2(10.2.0.3.0) linux_x86_64
ORACLE_HOME=/d01/app/oracle/product/10.2.0/db_1
export ORACLE_HOME
ORACLE_SID=orcl
export ORACLE_SID
plsql developer ,以sys用户,sysdba角色连接 报错:ORA-01017
#数据库默认不允许sys用户以sysdba角色远程连接。
更改:
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/orapworcl password=sys entries=16 force=y
chmod 4640 $ORACLE_HOME/dbs/orapworcl
vi initorcl.ora
添加:
REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE
#启动
$ORACLE_HOME/bin/sqlplus ‘/as sysdba’
>startup
#问题依旧。
>grant sysdba to system;
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
#其实文件是存在的,但不知为何还报这样的错。
rm /tmp/stracedba.log
strace -f -o /tmp/stracedba.log $ORACLE_HOME/bin/sqlplus ‘/ as sysdba’
>startup
ptrace: umoven: Input/output error
Database opened.
SQL> ptrace: umoven: Input/output error
>grant sysdba to system;
Grant succeeded.
more /tmp/stracedba.log
/orapw
1636 stat(“/d01/app/oracle/product/10.2.0/db_1/dbs/orapworcl”, {st_mode=S_IFREG|0640, st_size=3072, …}) = 0
1636 stat(“/d01/app/oracle/product/10.2.0/db_1/dbs/orapworcl”, {st_mode=S_IFREG|0640, st_size=3072, …}) = 0
#可以找到。
#现象总结: strace方式启动数据库,能找到orapw文件。说明orapw文件存在且没错。但strace方式启动数据库不能自动注册listen,当然是不能作为正常数据库使用的。但是以正常方式启动数据库就报告password file missing or disabled。
这是什么原因?