Overview and configuration of Oracle RMAN

Source: Internet
Author: User

Restore: restore recover recovery
First use the restore database command to restore to the backup point through the backup file, and then use the recover database command to restore to the time point when the media is damaged through the archive log file.

RMAN Architecture
There are two default connections polling and default after RMAN is connected. You can also use rcvcat to connect to the recovery catalog DB that stores the backup information. The backup information can also be stored in the control file of the target database, RMAN can allocate any number of channels (one channel is a connection) for reading data from the target database to a disk or tape.

Control_file_record_keep_time control the number of days required for file Reuse

Rman connects to local database
Rman target/nocatalog

Connect to the remote target database
Rman target sys/sys @ XWX1 nocatalog;

Write RMAN output to a log file
Rman target sys/sys log d:/rman. log append

Start rman to execute the script
Rman target sys/sys log d:/rman. log append
@ 'D:/my_rman_script.rcv'

The simplest script (here document technology: Here Documents is used to automatically provide the following content as command input to the previous command)
Rman target/nocatalog <!
Show all;
Exit;
!

RMAN> show all; view configuration information

Automatic channel allocation:
1. Set the default device type of the channel
RMAN> configure default device type to sbt; specify as tape
RMAN> configure default device type clear; clear settings and restore to default values

2. Set the concurrency
RMAN> configure device type disk parallelism 3;

3. Set the Backup Directory
RMAN> configure channel device type disk format = 'd:/backup/rman/% U'; % U file name automatic ID unique

4. Set the maximum backup part size.
RMAN> configure channel device type disk maxpiecesize 2G;

5. configure backup potimazation on; ---- set backup optimization;
6. configure retention policy
Recovery window of 7 days; ---- set the retained backup policy window for 7 days;
7. configure retention policy
Redundancy 4; ---- set redundancy to 4 and save four backup sets;
8. configure datafile backup copies
Device type disk to 2; ---- if the disk is backed up, two copies will be backed up at the same time;
9. Back up control files at the same time
Configure controlfile autobackup on;

Manual channel allocation
RMAN> run {
Allocate channel c1 type disk
Format = 'd:/backup/rman/user20151127.bak ';
Backup datafile 'd:/Oracle/oradata/users01.dbf ';
SQL 'alter database archive log current ';
}

Connection Type
And target database
And recovery catalog database
And auxiliary database: standby database, duplicate database, TSPITR instance.

To connect different instances of a machine
UNIX: oracle_sid = orcl; export oracle_sid;
Window: set oracle_sid = orcl

Backup is unique to RMAN backup, and copy is copied by common cp commands.
List name
1. List all database file backups
RMAN> list backup of database;

2. List backups of a database file
Report schema; Data File Information, copy the datafile directory
RMAN> list backup of datafile "d:/oracle/oradata/users01.dbf ";
List all copies or backups in a tablespace
RMAN> list copy of tablespace "SYSTEM ";
RMAN> list backup of tablespace "SYSTEM ";

REPORT command
1. report need backup data file to be backed up
Report need backup incremental 3; three or more incremental backup files are required
Report need backup days 3; files not backed up within 3 days
Report need backup redundancy 2; files with redundancy less than 2

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.