SQL> select name from v$datafile;
NAME
---------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/example01.dbf
SQL> !rm -rf /u01/app/oracle/oradata/orcl/undotbs01.dbf
SQL> conn scott/tiger
Connected.
SQL> update e set object_id=object_id+1;
update e set object_id=object_id+1
*
ERROR at line 1:
ORA-01116: error in opening database file 3
ORA-01110: data file 3: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
使用rman恢复
[oracle@oel ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Thu May 26 13:54:35 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1437288826)
RMAN> run{
2> startup force mount;
3> restore datafile 3;
4> recover datafile 3;
5> sql 'alter database open';
6> }
Oracle instance started
database mounted
Total System Global Area 451964928 bytes
Fixed Size 1337156 bytes
Variable Size 201328828 bytes
Database Buffers 243269632 bytes
Redo Buffers 6029312 bytes
Starting restore at 26-MAY-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=355 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /u02/ORCL/backupset/2016_05_26/o1_mf_nnndf_TAG20160526T134623_cnf3fhs0_.bkp
channel ORA_DISK_1: piece handle=/u02/ORCL/backupset/2016_05_26/o1_mf_nnndf_TAG20160526T134623_cnf3fhs0_.bkp tag=TAG20160526T134623
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 26-MAY-16
Starting recover at 26-MAY-16
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 26-MAY-16
sql statement: alter database open
SQL> conn scott/tiger
Connected.
SQL> update e set object_id=object_id+1 where rownum<1000;
999 rows updated.
SQL> rollback;
Rollback complete.
oracle丢失关键表空间的恢复
最新推荐文章于 2021-04-09 20:33:11 发布