溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

記一次ORA-01102導(dǎo)致數(shù)據(jù)庫(kù)實(shí)例無法啟動(dòng)案例

發(fā)布時(shí)間:2020-08-11 08:41:39 來源:ITPUB博客 閱讀:139 作者:巡完南山巡南山 欄目:關(guān)系型數(shù)據(jù)庫(kù)

1.現(xiàn)象

由于之前啟動(dòng)過一次報(bào)錯(cuò),首先關(guān)閉數(shù)據(jù)庫(kù),然后重啟

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on 星期二 5月 26 15:36:50 2015

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

連接到: 

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate

ORA-01507: database not mounted

ORACLE 例程已經(jīng)關(guān)閉。

SQL> 

SQL> startup

ORACLE 例程已經(jīng)啟動(dòng)。

Total System Global Area 5.3447E+10 bytes

Fixed Size                  2232248 bytes

Variable Size            3.2481E+10 bytes

Database Buffers         2.0938E+10 bytes

Redo Buffers               26517504 bytes

ORA-01102: cannot mount database in EXCLUSIVE mode

SQL> 

SQL> exit

從 Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷開

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on 星期二 5月 26 15:43:32 2015

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

連接到: 

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 

SQL> shutdown immediate

ORA-01507: database not mounted

ORACLE 例程已經(jīng)關(guān)閉。

SQL> 

SQL> exit

從 Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷開

2.分析原因

到$ORACLE_HOME/dbs下找到lk開頭文件,這個(gè)錯(cuò)誤主要是lk<SID>文件造成的

它的主要作用是說明DATABASE MOUNT上了,不用在MOUNT了;DATABASE UNMOUNT 后會(huì)自動(dòng)刪除,但異常情況時(shí)文件存在的話,即使數(shù)據(jù)庫(kù)已經(jīng)停掉,系統(tǒng)也會(huì)認(rèn)為數(shù)據(jù)庫(kù)已經(jīng)mount了

$ cd $ORACLE_HOME/dbs

$ ls -l

total 96

-rw-rw----    1 oracle   oinstall       1544 Nov 17 2014  hc_DBUA0.dat

-rw-rw----    1 oracle   oinstall       1544 Nov 17 2014  hc_itdb1.dat

-rw-rw----    1 oracle   oinstall       1544 May 26 15:43 hc_itsys.dat

-rw-rw----    1 oracle   oinstall       1544 May 26 15:43 hc_itsys1.dat

-rw-rw----    1 oracle   oinstall       1544 May 13 16:16 hc_orcl.dat

-rw-r--r--    1 oracle   oinstall       2851 May 15 2009  init.ora

-rw-r-----    1 oracle   oinstall         24 Nov 17 2014  lkITSYS1

-rw-r-----    1 oracle   oinstall         24 Aug 04 2014  lkORCL

-rw-r-----    1 oracle   oinstall       1536 Nov 17 2014  orapwitsys1

-rw-r-----    1 oracle   oinstall       1536 Aug 04 2014  orapworcl

-rw-r-----    1 oracle   oinstall       2560 May 05 10:15 spfileitsys1.ora

-rw-r-----    1 oracle   oinstall       2560 Feb 10 22:00 spfileorcl.ora

3.解決方法

用fuser命令kill掉占用lkITSYS1文件的進(jìn)程

$ fuser -k lkITSYS1

lkITSYS1:  5701814 5767372 5832954 6946854 7209198 7667712 7930062 8323164 8388624 8847426 9306156 9633968 9699564 9895986 16187422

$ fuser -u lkITSYS1

lkITSYS1: 

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on 星期二 5月 26 15:46:35 2015

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

已連接到空閑例程。

SQL> 

SQL> startup

ORACLE 例程已經(jīng)啟動(dòng)。

Total System Global Area 5.3447E+10 bytes

Fixed Size                  2232248 bytes

Variable Size            3.2481E+10 bytes

Database Buffers         2.0938E+10 bytes

Redo Buffers               26517504 bytes

數(shù)據(jù)庫(kù)裝載完畢。

數(shù)據(jù)庫(kù)已經(jīng)打開。

SQL> 

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI