标签:air lock ast spfile dba file set over recovery
1) Loss of system DATAFILE
2) Loss of non-system DATAFILE
3) Loss of a DATAFILE without Backup
4) Loss of a CONTROLFILE
5) Loss of all the CONTROLFILE
6) Loss of REDOLOGs
7) Loss of CONTROLFILE, SPFILE, DATAFILEs and REDOLOGs
8) Loss of Tempfile
9) Block corruption of datafiles
1) Loss of system DATAFILE
rm -rf /u01/app/oracle/oradata/PROD1/system01.dbf
$rman target /
rman>validate database;
rman>shutdown abort
rman>startup mount
rman>restore datafile 1;
rman>recover datailfe 1;
rman>alter database open;
rman>validate database;
2) Loss of non-system DATAFILE
$rman target /
rman>validate database;
rman>list failure;
rman>advise failure;
rman>repair failure preview;
rman>repair failure;
rman>validate database;
3) Loss of a DATAFILE without Backup
$rman target /
rman>validate database;
rman>list failure;
rman>advise failure;
rman>repair failure preview;
rman>repair failure;
rman>validate database;
4) Loss of a CONTROLFILE
rm -rf /u01/app/oracle/oradata/PROD1/control01.ctl
sql>shutdown immediate
cp -r /u01/app/oracle/fast_recovery_area/PROD1/control02.ctl /u01/app/oracle/oradata/PROD1/control01.ctl
sql>startup nomount
sql>alter system set control_files=‘/u01/app/oracle/oradata/PROD1/control01.ctl‘,‘/u01/app/oracle/fast_recovery_area/PROD1/control02.ctl‘ scope=spfile;
sql>startup force
sql>select name from v$instance;
5) Loss of all the CONTROLFILE
rm /u01/app/oracle/oradata/PROD1/control01.ctl
rm /u01/app/oracle/fast_recovery_area/PROD1/control02.ctl
sql>select dbid from v$database;
sql>shutdown abort
$rman target /
rman>set dbid=*******
rman>restore controlfile from autobackup;
sql>alter database mount;
rman>restore database;
rman>recover database;
sql>alter database open resetlogs;
6) Loss of REDOLOGs
shutdown immediate;
startup
sqlplus / as sysdba
startup mount;
-- Clear all the redo logfiles
alter database clear unarchived logfile group 1;
alter database clear unarchived logfile group 2;
alter database clear unarchived logfile gorup 3;
alter database open;
7) Loss of CONTROLFILE, SPFILE, DATAFILEs and REDOLOGs
8) Loss of Tempfile
sql>shutdown immediate
sql>startup
oracle 11g丢失临时表空间文件,重启后会自动创建临时表空间文件
9) Block corruption of datafiles
$rman target / catalog rman/rman@emrep
RMAN> list failure;
RMAN> advise failure;
RMAN> repair failure;
-- Check the result
RMAN> list failure all;
rman恢复
标签:air lock ast spfile dba file set over recovery
原文地址:https://www.cnblogs.com/orcl-2018/p/10278017.html