首页 > 数据库 > Oracle > RMAN 恢复之控制文件篇(3/5)
[oracle@restoretest ~]$ sqlplus / as sysdba
SQL> shutdown abort;
$ cd /oradata/gcwz_web/
[oracle@restoretest gcwz_web]$ rm *
[@more@]
RMAN> restore controlfile from '/rman/full_72_709900586_1';
output
filename=/oradata/gcwz_web/control01.ctl
output
filename=/oradata/gcwz_web/control02.ctl
output
filename=/oradata/gcwz_web/control03.ctl
Finished restore at
02-FEB-10
RMAN> sql 'alter database mount';
RMAN> catalog start with '/rman/';
List of Cataloged Files
=======================
File Name:
/oracle/flash_recovery_area/GCWZ_WEB/autobackup/2010_02_01/o1_mf_s_709838623_5pf7dzy9_.bkp
searching for all files
that match the pattern /rman/
List of Files Unknown to
the Database
=====================================
File Name:
/rman/cntrl_69_1_709899322
File Name:
/rman/full_72_709900586_1
File Name:
/rman/control_73
Do you really want to
catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name:
/rman/cntrl_69_1_709899322
File Name:
/rman/full_72_709900586_1
File Name:
/rman/control_73
RMAN> catalog start with '/archivelog/';
searching for all files
that match the pattern /archivelog/
List of Files Unknown to
the Database
=====================================
File Name:
/archivelog/1_60_690800133.dbf
Do you really want to
catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name:
/archivelog/1_60_690800133.dbf
RMAN> restore database;
Starting restore at
02-FEB-10
using channel ORA_DISK_1
channel ORA_DISK_1:
starting datafile backupset restore
channel ORA_DISK_1:
specifying datafile(s) to restore from backup set
restoring datafile 00001
to /oradata/gcwz_web/system01.dbf
restoring datafile 00002
to /oradata/gcwz_web/undotbs01.dbf
restoring datafile 00003
to /oradata/gcwz_web/sysaux01.dbf
restoring datafile 00004
to /oradata/gcwz_web/users01.dbf
restoring datafile 00005
to /oradata/gcwz_web/test01.dbf
channel ORA_DISK_1:
reading from backup piece /rman/full_71_709900579_1
channel ORA_DISK_1:
restored backup piece 1
piece
handle=/rman/full_71_709900579_1 tag=TAG20100202T103618
channel ORA_DISK_1:
restore complete, elapsed time: 00:00:16
Finished restore at
02-FEB-10
[oracle@restoretest gcwz_web]$ sqlplus / as sysdba
SQL> recover database using backup controlfile ;
ORA-00279: change
1129995 generated at 02/02/2010 10:36:19 needed for thread 1
ORA-00289: suggestion :
/archivelog/1_60_690800133.dbf
ORA-00280: change
1129995 for thread 1 is in sequence #60
Specify log:
{
ORA-00279: change
1130034 generated at 02/02/2010 10:37:21 needed for thread 1
ORA-00289: suggestion :
/archivelog/1_61_690800133.dbf
ORA-00280: change
1130034 for thread 1 is in sequence #61
ORA-00278: log file
'/archivelog/1_60_690800133.dbf' no longer needed for this
recovery
Specify log:
{
cancel
Media recovery
cancelled.
SQL> alter database open resetlogs;
Database altered.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/32980/viewspace-1050880/ ,如需转载,请注明出处,否则将追究法律责任。