丢失undo表空间
1.利用RMAN恢复
1.利用RMAN恢复
2.重建新的undo表空间(可以不关闭数据库)
--实验
--1.利用RMAN关库恢复
SYS@PROD2> select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/PROD2/system01.dbf
/u01/app/oracle/oradata/PROD2/sysaux01.dbf
/u01/app/oracle/oradata/PROD2/undotbs01.dbf
/u01/app/oracle/oradata/PROD2/users01.dbf
/u01/app/oracle/oradata/PROD2/example01.dbf
SYS@PROD2> ho rm /u01/app/oracle/oradata/PROD2/undotbs01.dbf
SYS@PROD2> alter system flush shared_pool;
System altered.
SYS@PROD2> alter system flush buffer_cache;
System altered.
SYS@PROD2> alter system flush global context;
System altered.
SYS@PROD2> conn scott/tiger; --此时显示undo表空间丢失
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 3
ORA-01110: data file 3: '/u01/app/oracle/oradata/PROD2/undotbs01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
Warning: You are no longer connected to ORACLE.
[oracle@ocm1 ~]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Dec 16 20:31:16 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to ta