Rman recovery -- current redo corruption

Source: Internet
Author: User

Restore with rman, current redo log corruption
1. Full database backup
RMAN> run {
Allocate channel c1 type disk maxpiecesize = 500 m;
Backup current controlfile format '+ dgasm/backup/haozg/ctl _ % d _ % s ';
Backup full database format' + dgasm/backup/haozg/db _ % d _ % s _ % p _ % T ';
Release channel c1;
} 2> 3> 4> 5> 6>
Released channel: ORA_DISK_1
Allocated channel: c1
Channel c1: SID = 19 device type = DISK
Starting backup at 02-JUL-12
Channel c1: starting full datafile backup set
Channel c1: specifying datafile (s) in backup set
Including current control file in backup set
Channel c1: starting piece 1 at 02-JUL-12
Channel c1: finished piece 1 at 02-JUL-12
Piece handle = + DGASM/backup/haozg/ctl_ora11_57 tag = TAG20120702T110101 comment = NONE
Channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 02-JUL-12
Starting backup at 02-JUL-12
Channel c1: starting full datafile backup set
Channel c1: specifying datafile (s) in backup set
Input datafile file number = 00001 name = + DGASM/ora11/datafile/system.257.785186755
Input datafile file number = 00002 name = + DGASM/ora11/datafile/sysaux.258.785186845
Input datafile file number = 00003 name = + DGASM/ora11/datafile/undotbs1.259.785186901
Input datafile file number = 00004 name = + DGASM/ora11/datafile/users.272.787425359
Channel c1: starting piece 1 at 02-JUL-12
Channel c1: finished piece 1 at 02-JUL-12
Piece handle = + DGASM/backup/haozg/db_ora11_58_410787575668 tag = TAG20120702T110107 comment = NONE
Channel c1: starting piece 2 at 02-JUL-12
Channel c1: finished piece 2 at 02-JUL-12
Piece handle = + DGASM/backup/haozg/db_ora11_58_2_787575668 tag = TAG20120702T110107 comment = NONE
Channel c1: backup set complete, elapsed time: 00:01:10
Channel c1: starting full datafile backup set
Channel c1: specifying datafile (s) in backup set
Including current control file in backup set
Including current SPFILE in backup set
Channel c1: starting piece 1 at 02-JUL-12
Channel c1: finished piece 1 at 02-JUL-12
Piece handle = + DGASM/backup/haozg/db_ora11_59_2017787575738 tag = TAG20120702T110107 comment = NONE
Channel c1: backup set complete, elapsed time: 00:00:02
Finished backup at 02-JUL-12
Released channel: c1
RMAN>
2. perform operations to distribute different operations in different archive log files, and check the log status and checkpoint status.
SQL> select first_change #, next_change #, group #, sequence #, status from v $ log;
FIRST_CHANGE # NEXT_CHANGE # GROUP # SEQUENCE # STATUS
-------------------------------------------------------------
999200 999353 1 7 INACTIVE
999353 999426 2 8 INACTIVE
999426 2.8147E + 14 3 9 CURRENT
SQL> create table test22 (aab001 varchar (15), aab003 varchar (20 ));
Table created.
SQL> insert into test22 values ('soft', '123 ');
1 row created.
SQL>/
1 row created.
SQL>/
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test22;
AAB001 AAB003
-----------------------------------
Soft 1, 0001
Soft 1, 0001
Soft 1, 0001
SQL> alter system switch logfile;
System altered.
SQL> select first_change #, next_change #, group #, sequence #, status from v $ log;
FIRST_CHANGE # NEXT_CHANGE # GROUP # SEQUENCE # STATUS
-------------------------------------------------------------
1000076 2.8147E + 14 1 10 CURRENT
999353 999426 2 8 INACTIVE
999426 1000076 3 9 ACTIVE
SQL> create table test33 (aab001 number, aab004 varchar2 (19 ));
Table created.
SQL> insert into test33 values (1, 'zhang ');
1 row created.
SQL> /.
1 row created.
SQL>/
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test33;
AAB001 AAB004
-----------------------------
1 zhang
1 zhang
1 zhang
SQL> alter system switch logfile;
System altered.
SQL> select first_change #, next_change #, group #, sequence #, status from v $ log;
FIRST_CHANGE # NEXT_CHANGE # GROUP # SEQUENCE # STATUS
-------------------------------------------------------------
1000076 1000117 1 10 ACTIVE
1000117 2.8147E + 14 2 11 CURRENT
999426 1000076 3 9 ACTIVE
SQL> create table c_test (aac001 varchar2 (10), name varchar2 (13 ));
Table created.
SQL> insert into c_test values ('20140901', 'haozg ');
1 row created.
SQL>/
1 row created.
SQL> /.
1 row created.
SQL>/
1 row created.
SQL> commit;
Commit complete.
SQL> select * from c_test;
AAC001 NAME
-----------------------
1392027 haozg
1392027 haozg
1392027 haozg
1392027 haozg
SQL> select first_change #, next_change #, group #, sequence #, status from v $ log;
FIRST_CHANGE # NEXT_CHANGE # GROUP # SEQUENCE # STATUS
-------------------------------------------------------------
1000076 1000117 1 10 ACTIVE
1000117 2.8147E + 14 2 11 CURRENT
999426 1000076 3 9 ACTIVE

3. shutdown abort
SQL> shutdown abort;
Oracle instance shut down.

  • 1
  • 2
  • 3
  • Next Page

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.