Connected to an idle instance.
SQL> startup
ORACLE instance started.
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
ORA-01507: database not mounted
lkNDMSQA: 6666(oracle) 6668(oracle) 6670(oracle) 6672(oracle) 6674(oracle) 6676(oracle) 6678(oracle) 6680(oracle) 6690(oracle) 6692(oracle) 6694(oracle) 6696(oracle) 6737(oracle) 6830(oracle)
lkNDMSQA: 6666 6668 6670 6672 6674 6676 6678 6680 6690 6692 6694 6696 6737 6830
[root@qa-oracle dbs]# fuser -u lkNDMSQA
ORACLE instance started.
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL>
出现1102错误可能有以下几种可能:
$ ls sgadef*
sgadef* not found
$ ls lk*
lkORA92
果然,lk<sid>文件没有被删除。将它删除掉
再启动数据库,成功。
IPC status from /dev/kmem as of Thu Jul 6 14:41:43 2006
T ID KEY MODE OWNER GROUP NATTCH CPID LPID
Shared Memory:
m 0 0×411c29d6 –rw-rw-rw- root root 0 899 899
m 1 0×4e0c0002 –rw-rw-rw- root root 2 899 901
m 2 0×4120007a –rw-rw-rw- root root 2 899 901
m 458755 0×0c6629c9 –rw-r—– root sys 2 9113 17065
m 4 0×06347849 –rw-rw-rw- root root 1 1661 9150
m 65541 0xffffffff –rw-r–r– root root 0 1659 1659
m 524294 0×5e100011 –rw——- root root 1 1811 1811
m 851975 0×5fe48aa4 –rw-r—– oracle oinstall 66 2017 25076
然后它ID号清除共享内存段:
对于信号量,可以用以下命令查看:
IPC status from /dev/kmem as of Thu Jul 6 14:44:16 2006
T ID KEY MODE OWNER GROUP
Semaphores:
s 0 0×4f1c0139 –ra——- root root
… …
s 14 0×6c200ad8 –ra-ra-ra- root root
s 15 0×6d200ad8 –ra-ra-ra- root root
s 16 0×6f200ad8 –ra-ra-ra- root root
s 17 0xffffffff –ra-r–r– root root
s 18 0×410c05c7 –ra-ra-ra- root root
s 19 0×00446f6e –ra-r–r– root root
s 20 0×00446f6d –ra-r–r– root root
s 21 0×00000001 –ra-ra-ra- root root
s 45078 0×67e72b58 –ra-r—– oracle oinstall
根据信号量ID,用以下命令清除信号量:
如果是Oracle进程没有关闭,用以下命令查出存在的oracle进程:
oracle 29976 1 0 Jun 22 ? 0:52 ora_dbw0_ora92
oracle 29978 1 0 Jun 22 ? 0:51 ora_dbw1_ora92
oracle 5128 1 0 Jul 5 ? 0:00 oracleora92 (LOCAL=NO)
… …
然后用kill -9命令杀掉进程
总结:
2.检查Oracle进程是否存在,如果存在则杀掉进程;
3.检查信号量是否存在,如果存在,则清除信号量;
4.检查共享内存段是否存在,如果存在,则清除共享内存段;
5.检查锁内存文件lk<sid>和sgadef<sid>.dbf是否存在,如果存在,则删除。