Rman backup optimization ideas, rman backup

Source: Internet
Author: User

Rman backup optimization ideas, rman backup

This chapter does not discuss the principles of rman backup, but only provides some ideas.

1. Select the compression algorithm of oracle11g as intermediate;

2. added the rman backup channel.

The above two methods increase CPU utilization and reduce IO

3. Specify the rate parameter

The sum of the rate and channel should not be greater than the hard disk IOPS to avoid IO wait.

 

-- Unfinished (Please stay tuned)

Thank you.


Explain the differences between logical backup, physical backup, and Rman backup in Oracle. The textbooks and the explanations on Baidu are not very understandable. Thank you. Oracle Database logical backup
There are two types of ORACLE Database Backup Methods: physical backup. This method enables full database recovery. The database must be in the recovery mode (in the Business Database non-recovery mode) and a tape library that requires a large number of external storage devices; the second type of backup mode logical backup business database adopts this method. This method requires that the database is easy to back up in the back-to-back mode and requires external storage devices. The logical backup method of the database ORACLE database is divided into three modes: table backup, user backup, and full backup

Table mode

In a user mode, the specified object (table) Business Database is backed up by using the following command to back up local files:

Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File = exp_icdmain_csd_yyyymmdd.dmp
Log = exp_icdmain_csd_yyyymmdd.log
Tables = icdmain. commoninformation, icdmain. serviceinfo, icdmain. dealinfo

To back up a tape device directly, run the following command:
Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File =/dev/rmt0
Log = exp_icdmain_csd_yyyymmdd.log
Tables = icdmain. commoninformation, icdmain. serviceinfo, icdmain. dealinfo

NOTE: If disk space permits, back up the local server and then copy the tape. In terms of speed, try to back up the tape device directly.

User Mode

In a user mode, all object business databases are backed up using the following command to back up local files:

Exp icdmain/icd owner = icdmain rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File = exp_icdmain_yyyymmdd.dmp
Log = exp_icdmain_yyyymmdd.log

To back up a tape device directly, run the following command:

Exp icdmain/icd owner = icdmain rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File =/dev/rmt0
Log = exp_icdmain_yyyymmdd.log

Note: It is recommended that you back up the disk and copy the tape database with a small amount of data.

Full Mode

Backup command used to back up the complete database business database:

Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0 full = y
File = exp_fulldb_yyyymmdd.dmp (for tape devices,/dev/rmt0)
Log = exp_fulldb_yyyymmdd.log

For database backup, we recommend that you use Incremental backup to change the Incremental Backup command only after the previous backup:

Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback = 100000 volsize = 0 full = y inctype = incremental
File = exp_fulldb_yyyymmdd.dmp (for tape devices,/dev/rmt0)
Log = exp_fulldb_yyyymmdd.log

Note: Incremental Backup must meet the following requirements:
1. It is valid only for full database backup and requires the full = y parameter for the first time. The inctype = incremental parameter is required.
2. the user must have the EXP_FULL_DATABASE system role.
3. Database Backup is adopted when the service volume is relatively small
4. We recommend that you back up the disk and back up the tape.

Before using EXP to back up a business database, run the CATEXP. SQL file under the SYS user (the script must be executed before running the file)
No special instructions allow the client to execute the BACKUP command

Backup command reference table mode BACKUP command

Principles of RMAN backup

I have read about the user's management of Backup recovery management and learned the backup principles through the SCN clue throughout the entire process.
There is a big difference between the RMAN backup process and user backup and recovery management. Many of you have no idea about the principle.
I understand the following:
How RMAN backs up data blocks:

Principle: RMAN compiles the list of data files to be backed up based on the backup algorithm rules based on the number of channels and the number of data files to be backed up at the same time. rmanw.el shared memory segment
Create some memory buffers like PGA, sometimes the memory buffer will be pushed into the SGA channel service process to read data files as soon as it starts and RMAN Buffer
When some data block buffers are filled up, the input buffer data will launch the output buffer.
The data block in the memery-to-monery write process complies with the backup standards and the memery-to-monery write operation is not checked.
Data uption, the data block will be saved, the output data buffer, the direct output buffer, and the output buffer will be filled, and the output buffer will be filled.
Push backup location (disk or tape)

RMAN database backup process:
RMAN issues the full-Database Backup command RMAN to generate the bequeath connection of the target database. It also says that it will check the Instance name of the parameter la_sid variable and
In this example, the server process generated for sysdba login will generate a backup channel (PGA or SGA distributed storage) called with RMAN
SYS. DBMS_RCVMAN: request database structure information including control file information (current serial number creation time ......) Because RMAN requests are specified to back up the entire database
Database data file information and determine whether to store offline data files (including the location and working method)
RMAN starts to back up data to ensure data consistency. RMAN must create a snapshot of the control file. Then RMAN calls DBMS _ BACKUP_RESTORE data packets.
Create backup file RMAN file list all data file read Operations allocate memory buffer allocation buffer RMAN initialize backup film once the backup film is initialized
RMAN will determine whether the server parameter file is used or not. Then, it will back up the data file and push it to the memory before backing up the control file.
Function tunnel process disk to perform pre-read operations and read multiple data files into memory RMAN will judge whether the data block header information is still zero data blocks
If it is not used, write operations in the output buffer will occur, and data blocks will be discarded (RMAN will only back up the data used for reasons also advantage)
RMAN also checks whether the data block has an uption operation. When the check passes the write output buffer, once the output buffer is filled, It is pushed to the backup file location.
When backing up data blocks, the RMAN shadow process will obtain the backup status information and send it to the V $ session_longops view for query.
When all data blocks in the data file are read into the input buffer and the status is determined, RMAN will write the data file to the backup disk to end all backup operations on the file.
RMAN generation for writing data files to the BACKUP file calls the sys dbms backup restore package to control the file write BACKUP information (including
Backup title: indicates the checkpoint SCN and backup completion time when the backup operation is started)
Now the backup is complete

I hope you will continue to discuss the principles of RMAN backup recovery (The RMAN function is too powerful)
Does rman control the file backup recovery process? ==================================== Backup control file ============== ========

Backup current controlfile

Backup database include current controlfile
===================================== RMAN recovery ====================== =

Backup information storage in non-catalog mode: The controlfile file can be recovered if it is damaged.
When using backup, controlfile must also be automatically backed up.

RMAN> show all;
Using target database control file instead of recovery catalog
RMAN configuration parameters are:
Configure retention policy to redundancy 1; # default
Configure backup optimization off; # default
Configure default device type to disk; # default
Configure controlfile autobackup off; # default
Configure controlfile autobackup format for device type disk to '% F'; # default
Configure device type disk parallelism 1 backup type to backupset; # default
Configure datafile backup copies for device type disk to 1; # default
Configure archivelog backup copies for device type disk to 1; # default
Configure maxsetsize to unlimited; # default
Configure encryption for database off; # default
Configure encryption algorithm 'aes128 '; # default
Configure archivelog deletion policy to none; # default
Configure snapshot controlfile name to '/home/oracle/product/10.20/dbs/snapcf_ora10g.f'; # default

Its configure controlfile autobackup off; its controlfile is not autobackup. To use it, we need to run the following command to automatically back up controlfile:
RMAN> configure controlfile autobackup on;

RMAN> show all;

Manual backup control file:
Backup current controlfile

Dbid indicates databaseID used to restore spfile and controlfile.
RMAN> connect target/
Connected to target database: ORA10G (DBID = 3988862108)
Dbid = 3988862108

RMAN> list backup; view the previous backup information
RMAN> delete backupset 24; // 24 indicates the backupset number.
RMAN> backup format'/u01/rmanbak/full _ % T _ % U. bak 'database plus archivelog; (perform full backup)

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.