ORA-01110,ORA-01145誤刪資料檔案處理

shawnloong發表於2017-06-25
今天模擬了ora-01110錯誤處理,非歸檔,注為測試,表空間為非重要資料檔案
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production


SQL> alter system checkpoint;


System altered.


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@ORA12CR2-213-8 ~]$ cd /u01/app/oracle/oradata/netdata/
[oracle@ORA12CR2-213-8 netdata]$ ls
control01.ctl  netdatapdb  redo01.log  redo03.log    system01.dbf       temp01.dbf     users01.dbf
control02.ctl  pdbseed     redo02.log  sysaux01.dbf  tbs_netdata01.dbf  undotbs01.dbf
[oracle@ORA12CR2-213-8 netdata]$ rm -rvf tbs_netdata01.dbf 
removed `tbs_netdata01.dbf'
[oracle@ORA12CR2-213-8 netdata]$ sqlplus / as sysdba


SQL*Plus: Release 12.2.0.1.0 Production on Thu Feb 16 19:12:29 2017


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


Connected to an idle instance.


SQL> startup;
ORACLE instance started.


Total System Global Area  838860800 bytes
Fixed Size    8798312 bytes
Variable Size  423628696 bytes
Database Buffers  398458880 bytes
Redo Buffers    7974912 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
ORA-01110: data file 13: '/u01/app/oracle/oradata/netdata/tbs_netdata01.dbf'
SQL> alter database datafile '/u01/app/oracle/oradata/netdata/tbs_netdata01.dbf' offline;
alter database datafile '/u01/app/oracle/oradata/netdata/tbs_netdata01.dbf' offline
*
ERROR at line 1:
ORA-01145: offline immediate disallowed unless media recovery enabled




SQL>  alter database datafile '/u01/app/oracle/oradata/netdata/tbs_netdata01.dbf' offline drop;


Database altered.


SQL> alter database open;


Database altered.


SQL> 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24486203/viewspace-2141239/,如需轉載,請註明出處,否則將追究法律責任。

相關文章