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