今天模拟了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>
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24486203/viewspace-2141239/