刚刚装好的库,简单测试没有问题后,放下,不到半个钟头,再次连接上去,发现数据库已经不可用了……

Quotation
oracle@staging:~$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 18 16:13:29 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn  / as sysdba
Connected to an idle instance.

SQL> select * from scott.emp;
select * from scott.emp
*
ERROR at line 1:
ORA-01034: ORACLE not available


机器并没有重启,oracle莫名其妙的到了不可用状态!我开始以为是谁关闭了,下开启指令
Quotation
SQL> startup
ORACLE instance started.

Total System Global Area 1224736768 bytes
Fixed Size                  2020384 bytes
Variable Size             318770144 bytes
Database Buffers          889192448 bytes
Redo Buffers               14753792 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode


这下遭遇ORA-01102: cannot mount database in EXCLUSIVE mode 错误了
Search On Google,then get the problem's anwser
大意是 “Oracle被异常关闭时,有资源没有被释放……”

马上查$ORACLE_HOME/dbs,发现一lk【SID】 文件,果然呆在这里
Quotation
staging:dbs# fuser -u lkCAPITALV
lkCAPITALV:            368(oracle)   370(oracle)   372(oracle)   374(oracle)   376(oracle)   378(oracle)   380(oracle)   382(oracle)   384(oracle)   386(oracle)   388(oracle)   397(oracle)  1472(oracle)  1557(oracle)  8852(oracle)


杀掉先:
Quotation
staging:dbs# fuser -k lkCAPITALV


再查,发现已经没有资源占用
Quotation
staging:dbs# fuser -u lkCAPITALV  

ok!
再次启动Oracle
Quotation
oracle@staging:~$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 18 16:24:05 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 1224736768 bytes
Fixed Size                  2020384 bytes
Variable Size             318770144 bytes
Database Buffers          889192448 bytes
Redo Buffers               14753792 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

----------------------END----------------------------

作者:askwan@『AskWan』
地址:http://www.askwan.com/post/172/
可以转载,转载时请以链接形式注明作者和原始出处及本声明!

Tags: ,
DataBase | Comments(0) | Trackbacks(0) | Reads(1240)
收藏到网摘:百度搜藏 Google书签 Yahoo收藏 新浪ViVi收藏夹 365天天网摘 天极网摘 我摘·网摘·网络书签 POCO网摘 和讯网摘 Bolaa博拉博客收录中心 天下图摘
Add a comment
Emots
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
Enable HTML
Enable UBB
Enable Emots
Hidden
Remember
Nickname   Password   Optional
Site URI   Email   [Register]