今天一同事找我,說(shuō)他本地的數(shù)據(jù)庫(kù)被他誤刪除了文件,導(dǎo)致不能打開(kāi),然給看看。
SQL> conn jjw/jjw
ERROR:
ORA-01033: Oracle initialization or shutdown in progress
Warning: You are no longer connected to Oracle.
SQL>-
數(shù)據(jù)庫(kù)已經(jīng)啟動(dòng),但連接報(bào)錯(cuò)。如是,我重啟一下,看報(bào)什么錯(cuò)誤。
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
Oracle instance shut down.
SQL> startup
Oracle instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 218106848 bytes
Database Buffers 989855744 bytes
Redo Buffers 14753792 bytes
Database mounted.
ORA-01122: database file 10 failed verification check
ORA-01110: data file 10: '/Oracle/database/tabjj_tab.dbf'
ORA-01251: Unknown File Header Version read for file number 10
SQL>
首先,得從數(shù)據(jù)庫(kù)中刪除這個(gè)有問(wèn)題的文件。
SQL> startup mount
Oracle instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 218106848 bytes
Database Buffers 989855744 bytes
Redo Buffers 14753792 bytes
Database mounted.
SQL> alter database datafile '/Oracle/database/tabjj_tab.dbf' offline drop;
Database altered.
SQL> alter database open;
Database altered.
SQL>
數(shù)據(jù)庫(kù)恢復(fù)正常。
以上只是測(cè)試環(huán)境下的操作,正式系統(tǒng)上,千萬(wàn)不能這樣隨意刪除文件了。
本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|