[Single instance of RMAN backup and recovery] [Topic: simple use of RMAN] I. rman backup operations: 1. oracle user login ,..
[Single instance of RMAN backup and recovery] [Topic: simple use of RMAN] I. rman backup operations: 1. oracle user login ,..
[Single Instance for RMAN backup and recovery]
[Topic: simple use of RMAN]
I. rman backup operations:
1. Log On As an oracle user. First, check whether the/u02/rman directory exists.
2. log on to rman using the sys user and the password oracle
Rman target sys/oracle
Run {
Crosscheck archivelog all;
Allocate channel specified device type disk format'/u02/rman/test _ % U ';
Allocate channel CH2 device type disk format'/u02/rman/test _ % U ';
BACKUP incremental level 0 DATABASE plus archivelog delete input;
Release channel identifier;
Release channel CH2;
}
RMAN> list backupset;
// After the backup is complete, make sure to record the scn.
(The SCN number after the backup is completed, which is a U.S. server. This SCN number is used as the time point for database recovery. The Hong Kong server is rented and must be recorded)
# The SCN number is similar to the following:
--------------------------------------------------------------------------
Ii. Restore rman for the first time
1. ORACLE user logon
2. Restore for the first time
Use the sys user to log on to rman
Rman target sys/oracle
Shutdown immediate;
Startup mount;
Run {
Set until scn 277970;
Allocate channel specified device type disk format'/u02/rman/test _ % U ';
Allocate channel CH2 device type disk format'/u02/rman/test _ % U ';
Restore database;
Recover database;
SQL 'alter database open resetlogs ';
Release channel identifier;
Release channel CH2;
}
Iii. Multiple rman recovery operations
After you use the backup file to restore the database and open resetlogs to open the data,
To recover the database again, you must specify the database's incarnation.
1. ORACLE user logon
2. Restore
Use the sys user to log on to rman
Rman target sys/oracle
Shutdown immediate;
Startup mount;
List incarnation;
Reset database to incarnation 1;
Run {
Set until scn 1;
Allocate channel specified device type disk format'/u02/rman/test _ % U ';
Allocate channel CH2 device type disk format'/u02/rman/test _ % U ';
Restore database;
Recover database;
SQL 'alter database open resetlogs ';
Release channel identifier;
Release channel CH2;
}
---------------------------------------------------------
[One of RMAN backup and recovery] Oracle 11gR2 Single Instance + asm for RMAN
[RMAN backup and recovery II] Oracle 11gR2 RAC + asm for RMAN
[RMAN backup and recovery 3] Oracle 11gR2 + asm for RMAN command Application
-----------------------------------------------------------
This article is from the "Han Feng" blog, Hong Kong virtual host, please be sure to keep this source