How to recover part of a table space using an RMAN heterogeneous machine

Source: Internet
Author: User

It is unavoidable to encounter mis-deleted data during routine maintenance and use of Oracle database (Drop,delete, truncate) When we cannot recover data using conventional means (flashback query, Flashback drop) We can use the most recent logical backup to restore the corresponding table using DMP on the machine, but without these logical backups, but with a recent rman full, then we can use this backup to recover the table space that was mistakenly deleted, so as to achieve the recovery of the data, here I Nbu The backup environment For example briefly describes how to reply to some of the table space;


-------in Nomount State, restore control file
Run {
Allocate channel T1 type ' Sbt_tape ';
Send ' Nb_ora_serv=netbackup,nb_ora_client=http://blog.csdn.net/lixora ';
Restore Controlfile to '/oracle11/oradata1/control011.ctl ' from '/c-2151157071-20141111-00 ';
Release channel T1;
}


-------after restoring the control file, launch the instance into Mount state and start restoring some of the tablespace data files:


Rman Target/nocatalog Msglog=/home/oracledb/rman.log <<eof
Run {
Allocate channel T1 type ' Sbt_tape ';
Allocate channel T2 type ' Sbt_tape ';
Send ' Nb_ora_serv=netbackup,nb_ora_client=http://blog.csdn.net/lixora ';



Set newname for datafile 1 to '/oracle11/oradata/datafile/system.262.762381347 ';
Set newname for DataFile 3 to '/oracle11/oradata/datafile/undotbs1.264.762381401 ';
Set newname for datafile 4 to '/oracle11/oradata/datafile/undotbs2.266.762381455 ';
Set newname for datafile 227 to '/oracle11/oradata/datafile/system02.dbf ';
Set newname for DataFile 344 to '/oracle11/oradata/datafile/lixora.375.820259689 ';
Set newname for datafile 345 to '/oracle11/oradata/datafile/lixora.414.820949317 ';


Restore Tablespace System,undotbs1,undotbs2,lixora;
Switch datafile all;

Release channel T1;
Release channel T2;
}
Eof




---------"If you have more empty tables, you can start the recovery database by offline the drop command for bulk-generated tablespace."

Rman Target/msglog=recover.log << EOF
run{
ALLOCATE CHANNEL ch0 TYPE ' Sbt_tape ';
ALLOCATE CHANNEL ch1 TYPE ' Sbt_tape ';
Send ' Nb_ora_serv=netbackup,nb_ora_client=http://blog.csdn.net/lixora ';
Set until Time "to_date (' 2014/11/11 14:00:00 ', ' yyyy/mm/dd hh24:mi:ss ')";


Recover database Skip Forever tablespace sysaux,temp,users,index_data;


Release channel Ch0;
Release channel CH1;
}
Eof



---Open the Oracle database in Resetlogs mode
ALTER DATABASE open resetlogs;


How to recover part of a table space using an RMAN heterogeneous machine

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.