Oracle 11g RMAN recovery from different machines (Linux to Windows)

Source: Internet
Author: User

Determine the data file, log file, and tempfile information of the original database.
 
Select group #, status, type, member from v $ logfile;
Col name format a65
Select file #, name, bytes/1024/1024 MB from v $ datafile;
Select name from v $ controlfile;

Recommended reading:

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

1. Create an instance
Oradim)
Oradim-new-sid maxld
When running an existing database, pay attention to setting environment variables.
C: \ set oracle_sid = demo
C: \ sqlplus/as sysdba
 
2. Create or modify the initialization parameter file
If you have other databases on hand
SQL> create pfile from spfile
This file is in the database under dbhome_1
Modify the pfile as needed
Replace SID, etc.
For example
Orcl. _ db_cache_size = 205520896 Replace with demo. _ db_cache_size = 205520896
 
3. Create a directory structure
*. Audit_file_dest = 'C: \ app \ Administrator \ admin \ demo \ adump'
*. Control_files = 'C: \ app \ Administrator \ oradata \ demo \ control01.ctl ',
'C: \ app \ Administrator \ flash_recovery_area \ demo \ control02.ctl'
 
4. Start the instance
SQL> startup nomount

5. Copy and modify the pfile to prepare the control file.
Cp/oracle10/oradata/ora10/control01.ctl.
SQL> startup mount pfile = '/tmp/pfile10.ora ';
ORACLE instance started.
 
6. Restore the database.
 
Run {
Allocate channel ch0 TYPE disk;
Set newname for datafile 1 to 'C: \ app \ Administrator \ oradata \ system01.dbf ';
Set newname for datafile 2 to 'C: \ app \ Administrator \ oradata \ sysaux01.dbf ';
Set newname for datafile 3 to 'C: \ app \ Administrator \ oradata \ undotbs01.dbf ';
Set newname for datafile 4 to 'C: \ app \ Administrator \ oradata \ users01.dbf ';
Set newname for datafile 5 to 'C: \ app \ Administrator \ oradata \ MAXIMO_DATA.dbf ';
Set newname for datafile 6 to 'C: \ app \ Administrator \ oradata \ MAXIMO_index.dbf ';
Set newname for datafile 7 to 'C: \ app \ Administrator \ oradata \ MAXIMO_DATA02.dbf ';
Set newname for datafile 8 to 'C: \ app \ Administrator \ oradata \ MAXIMO_index02.dbf ';
 
Set newname for tempfile 1 to 'C: \ app \ Administrator \ oradata \ temp01.dbf ';
Set newname for tempfile 2 to 'C: \ app \ Administrator \ oradata \ MAXIMO_temp.dbf ';
Restore database;
Switch datafile all;
Switch tempfile all;
Release channel ch0;
 
}


Recover database;
 
Redolog Processing
 
Processing tempfile

Related Article

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.