Restore specified uard while primary's archivelog was deleted by accident without applied

Source: Internet
Author: User

On Standby:
-- Find out the current SCN for Incremental Backup
$ Sqlplus "/As sysdba"
SQL> startup Mount
SQL> select sequence # from V $ log where status = 'current ';

No rows selected

SQL> select name, open_mode, protection_mode, database_role from V $ database; Name open_mode protection_mode database_role
-------------------------------------------------------
Orcl mounted maximum performance physical standby SQL> select sequence #, first_time, next_time from V $ archived_log order by sequence #; Sequence # first_time next_time
----------------------------------
15347 13-feb-10 13-feb-10
15348 13-feb-10 13-feb-10272 rows selected. SQL> select archive_change #, current_scn from V $ database;
8178572277879 on primary:
RMAN> Backup Device Type disk incremental from SCN 8178572277879 database format'/dbbackup/bkup _ % u 'tag' standby'; -- recreate the standby controlfile:
SQL> alter database create standby controlfile as '/dbbackup/ctl_bk1.ctl'; scp all backup file to standby server:
SCP bkustm1_8rl6le4c_1_1 oracle@192.168.1.101:/dbbackup/incrback on standby:
Shutdown Oracle -- replace the old control file [Oracle @ whdbdg incrback] $ CP ctl_bk1.ctl/u01/oradata/orcl/control01.ctl
[Oracle @ whdbdg incrback] $ CP ctl_bk1.ctl/u01/oradata/orcl/control02.ctl
[Oracle @ whdbdg incrback] $ MV ctl_bk1.ctl/u01/oradata/orcl/control03.ctl [Oracle @ whdbdg incrback] $ RMAN target /;
RMAN> startup Mount;
RMAN> catalog start with '/dbbackup/incrback/'; Using target database control file instead of recovery catalog
Searching for all files that match the pattern/dbbackup/incrback/list of files unknown to the database
============================================
File Name:/dbbackup/incrback/bkup_8nl6la3v_1_1do You Really Want To catalog the above files (enter yes or no )? Yes
Cataloging files...
Cataloging donelist of cataloged files
======================================
File Name:/dbbackup/incrback/bkup_8nl6la3v_1_1rman> recover database noredo; RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of recover command at 02/22/2010 12:44:56
RMAN-06094: datafile 34 must be restoredon primary:
-- Check the newly created datafile.
SQL> SELECT FILE #, name from V $ datafile where creation_change #> = 28178572277879; -- or
SQL & gt; Set line 200
SQL> set pagesize 9999
SQL> Col name format A60
SQL> SELECT FILE #, status, name from V $ datafile order by 1; file # status name
-----------------------------------------------------------------------------
1 system/u01/oradata/orcl/system01.dbf
...
33 online/u01/oradata/orcl/whdb_data1_dbf
34 online/u01/oradata/orcl/whdb_index05.dbf
35 online/u01/oradata/orcl/whdb_data21.dbf
36 online/u01/oradata/orcl/whdb_data22.dbfrman> Backup Device Type disk datafile 34,35, 36 format'/dbbackup/bkupdf1 _ % U ';
SCP all backup file to standby server on standby:
RMAN> catalog start with '/dbbackup/incrback /';
RMAN> restore datafile 34, 35, 36;
RMAN> recover database noredo; -- startup DG to apply logsql> alter database recover managed standby database disconnect from session; on primary:
SQL> alter system archive log current; on standby: Check alertlog to identify whether the DG runs right:
Completed: Alter database recover managed standby database disconnect from session
Mon Feb 22 13:05:25 2010
Redo shipping Client Connected as public
-- Connected user is valid
RFS [2]: assigned to RFS process 11763
RFS [2]: identified database type as 'physical standby'
Primary database is in maximum performance mode
Primary database is in maximum performance mode
RFS [2]: successfully opened standby log 7: '/u01/oradata/orcl/redo07.log'
Mon Feb 22 13:06:07 2010
RFS [1]: successfully opened standby log 8: '/u01/oradata/orcl/redo08.log'
Mon Feb 22 13:06:08 2010
Media recovery log/u01/ARCH/arch_201715363_643904690.arc
Media recovery waiting for thread 1 sequence 15364 (in transit) -- clear old log and backup
RMAN> Delete noprompt archivelog until time 'sysdate-7 ';
Find/u01/arch-type F-name "arch_1_1 *. Arc"-mtime + 5-exec RM {}/; on primary: -- clear RMAN backup
RMAN> Delete backup tag 'standby'; -- check the last applied logsql> select max (sequence #) from V $ archived_log where applied = 'yes'; max (sequence #)
--------------
15363 refer:
Http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#BGBCEBJG
Http://space.itpub.net/15415488/viewspace-615573
Http://cs.felk.cvut.cz/10gr2/backup.102/b14191/rcmdupdb008.htm
Http://hi.baidu.com/wa0362/blog/item/37e3fd22a00370af4723e82f.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.