Oracle 11g通过SCN做增量备份修复standby库详细过程(二)

2015-07-16 14:56:46 · 作者: · 浏览: 150
,然后DESTINATION为PD_DG(这里是备库的标识)的dest编号就是往备库传输归档日志的;另外一个有目录/oracle/app/oracle/flash_recovery_area/archivelog的就是主库本身的归档日志dest,这个目录存储的就是主库本身的归档日志


ALTER system SET log_archive_dest_state_2 ='defer';


SQL> ALTER system SETlog_archive_dest_state_2 = 'defer';? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


System altered.


SQL>


4,去备库先停止备库应用


ALTER DATABASE RECOVER MANAGED STANDBYDATABASE CANCEL;


SQL> ALTER DATABASE RECOVER MANAGEDSTANDBY DATABASE CANCEL;? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


ALTER DATABASE RECOVER MANAGED STANDBYDATABASE CANCEL


*


ERROR at line 1:


ORA-16136: Managed Standby Recovery notactive


SQL>?


看到standby已经是not active了,所以不需要执行了。


5,在主库执行备份


基于SCN增量备份:


backup device type disk incremental fromscn 11125946510 database format '/home/oracle/db_incre%U.bbk';?


?


RMAN> backup device type diskincremental from scn 11125946510 database format'/home/oracle/db_incre%U.bbk';? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


?


Starting backup at 13-MAY-15? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


?


using target database control file insteadof recovery catalog? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


allocated channel: ORA_DISK_1? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


channel ORA_DISK_1: SID=212 devicetype=DISK


backup will be obsolete on date20-MAY-15? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


archived logs will not be kept or backed up


channel ORA_DISK_1: starting full datafilebackup set? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


channel ORA_DISK_1: specifying datafile(s) inbackup set


input datafile file number=00005name=/home/oradata/powerdes/powerdesk01.dbf


input datafile file number=00003name=/home/oradata/powerdes/undotbs01.dbf


input datafile file number=00006name=/home/oradata/powerdes/plas01.dbf


input datafile file number=00001name=/home/oradata/powerdes/system01.dbf


input datafile file number=00002name=/home/oradata/powerdes/sysaux01.dbf


input datafile file number=00007name=/home/oradata/powerdes/pl01.dbf


input datafile file number=00011 name=/home/oradata/powerdes/plcrm01.dbf


input datafile file number=00004name=/home/oradata/powerdes/users01.dbf


input datafile file number=00008name=/home/oradata/powerdes/help01.dbf


input datafile file number=00009name=/home/oradata/powerdes/adobelc01.dbf


input datafile file number=00010name=/home/oradata/powerdes/sms01.dbf


channel ORA_DISK_1: starting piece 1 at13-MAY-15


channel ORA_DISK_1: finished piece 1 at13-MAY-15? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


piecehandle=/home/oracle/db_increi3q6s13g_1_1.bbk tag=TAG20150513T202207comment=NONE


channel ORA_DISK_1: backup set complete,elapsed time: 00:09:45


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


using channel ORA_DISK_1? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


backup will be obsolete on date 20-MAY-15


archived logs will not be kept or backed up


channel ORA_DISK_1: starting full datafilebackup set? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?