昨天在linux命令行直接刪除了/data/oradbs/cqna_rdm.dbf文件,今天發現Oracle連接報錯
用plsql連接報錯提示oracle initialization or shutdown in progress
於是進入Oracle服務器查看原因,調整步驟如下:
第一步:sqlplus /NOLOG
第二步:SQL> connect sys/change_on_install as sysdba;
Connected.
第三步:SQL> shutdown normal
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
第四步:SQL> startup mount
ORACLE instance started.
Total System Global Area 2505338880 bytes
Fixed Size 2230952 bytes
Variable Size 1728054616 bytes
Database Buffers 754974720 bytes
Redo Buffers 20078592 bytes
Database mounted.
第五步:SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 45 - see DBWR trace file
ORA-01110: data file 45: '/data/oradbs/cqna_rdm.dbf'
第六步:
SQL> alter database datafile '/data/oradbs/cqna_rdm.dbf' offline drop;
Database altered.
第七步:
SQL> shutdown normal
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
第八步:
SQL> startup mount
ORACLE instance started.
Total System Global Area 2505338880 bytes
Fixed Size 2230952 bytes
Variable Size 1728054616 bytes
Database Buffers 754974720 bytes
Redo Buffers 20078592 bytes
Database mounted.
第九步:
SQL> alter database open;
Database altered.