Oracle 故障处理
1:故障发现
Oracle 启动后发现其他帐户都无法登陆,报告错误如下:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
解决:
Sqlplus /nolog
Connect / as sysdba
Startup
出现故障如下:
SQL> startup
ORACLE instance started.
 
Total System Global Area 1224736768 bytes
Fixed Size                   778876 bytes
Variable Size             652483972 bytes
Database Buffers          570425344 bytes
Redo Buffers                1048576 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
大意是 “Oracle被异常关闭时,有资源没有被释放 ……”

检查警告日志,也证实了这一点,系统异常
解决:
察看报警日至文件:错误如下:
LTER DATABASE   MOUNT
Mon Apr 12 13:57:29 2010
scumnt: failed to lock /data/oracle/product/ 10.1.0 /db_1/dbs/lkMUSICDB1 exclusive
Mon Apr 12 13:57:29 2010
ORA-09968: scumnt: unable to lock file
Linux Error: 11: Resource temporarily unavailable
Additional information: 1728
Mon Apr 12 13:57:29 2010
ORA-1102 signalled during: ALTER DATABASE   MOUNT...
解决:
察看此目录
Cd $ORACLE_HOME/dbs
发现此目录下有 lk(SID) 文件存在
/sbin/fuser -u lkMUSICDB1
lkMUSICDB1:           1724(oracle)  1726(oracle)  1728(oracle)  1730(oracle)  1732(oracle)  1736(oracle)  1738(oracle)  1741(oracle)  1840(oracle)  1968(oracle)  1970(oracle)  1995(oracle)  1997(oracle)  2910(oracle)  2912(oracle)  2914(oracle)  2916(oracle)  2918(oracle)  3198(oracle)  3263(oracle)
杀掉先
/sbin/fuser -k lkMUSICDB1
再查,发现已经没有资源占用
/sbin/fuser -u lkMUSICDB1
ok
再次启动Oracle
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
 
Total System Global Area 1224736768 bytes
Fixed Size                   778876 bytes
Variable Size             652483972 bytes
Database Buffers          570425344 bytes
Redo Buffers                1048576 bytes
Database mounted.
Database opened.