刚刚安装完数据库,启动报错ORA-01102: cannot mount database in EXCLUSIVE mode
SQL> startup
ORACLE instance started.
Total System Global Area 534462464 bytes
Fixed Size 2230072 bytes
Variable Size 163580104 bytes
Database Buffers 364904448 bytes
Redo Buffers 3747840 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
alert文件内容:
ALTER DATABASE MOUNT
sculkget: failed to lock /u01/app/oracle//product/11.2.0/dbhome_1/dbs/lkFOGLIGHT exclusive
sculkget: lock held by PID: 25084 ------------------------发生独占模式的进程号为pid:25084
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 25084
ORA-1102 signalled during: ALTER DATABASE MOUNT...
1.看看pid:25084是什么进程
[oracle@foglight trace]$ ps -ef | grep 25084
oracle 25084 1 0 07:59 ? 00:00:00 ora_dbw0_foglight
oracle 26747 26363 0 08:30 pts/4 00:00:00 grep 25084
原来是dbw写进程
2.关闭数据库
SQL> shu immediate
ORA-01507: database not mounted
ORACLE instance shut down.
3.进入$ORACLE_HOME/dbs/lkFOGLIGHT这个文件
[oracle@foglight trace]$ cd $ORACLE_HOME/dbs
[oracle@foglight dbs]$ ls
hc_foglight.dat init.ora lkFOGLIGHT orapwfoglight spfilefoglight.ora
4.通过fuser -u lkFOGLIGHT 命令查看(root用户)
[root@foglight dbs]# fuser -u lkFOGLIGHT
lkFOGLIGHT: 25050(oracle) 25054(oracle) 25064(oracle) 25072(oracle) 25080(oracle) 25084(oracle) 25088(oracle) 25092(oracle) 25096(oracle) 25100(oracle) 25104(oracle) 25108(oracle)
le) 25092(oracle) 25096(oracle) 25100(oracle) 25104(oracle) 25108(oracle)
[root@foglight dbs]# fuser -k lkFOGLIGHT -----kill掉
lkFOGLIGHT: 25050 25054 25064 25072 25080 25084 25088 25092 25096 25100 25104 25108
[root@foglight dbs]# fuser -u lkFOGLIGHT
[root@foglight dbs]#
5.启动数据库
SQL> startup
ORACLE instance started.
Total System Global Area 534462464 bytes
Fixed Size 2230072 bytes
Variable Size 163580104 bytes
Database Buffers 364904448 bytes
Redo Buffers 3747840 bytes
Database mounted.
Database opened.
数据库启动了!