Backup of RMAN comprehensive learning

Source: Internet
Author: User

Rman is the most cost-effective oracle backup tool. Here we will make an overall learning of rman.

Most of the scripts in this article are the syntax of rman commands. It is better to do experiments to be impressed. Because most databases are backed up by running scripts on time, and recovery is not common, and will be unfamiliar after a long time, review more.

[Terry note] backup http://www.cnblogs.com/kkterry/p/3308405.html for RMAN integrated learning

[Terry notes] recovery http://www.cnblogs.com/kkterry/p/3308407.html for RMAN integrated learning

[Terry note] configuration http://www.cnblogs.com/kkterry/p/3308409.html for RMAN integrated learning

 

I. How to connect rman:

Local connection: rman target/remote connection: rman target sys/[email protected] Tips:In rman, you can also disable/enable the database: shutdown immediate/startuprman supports the host command to temporarily exit to the system layer, exit at the system layer, and then enter rman to execute the SQL statement in rman: SQL 'alter system Archive log all '; II. Backup mode1. Backup methods: Image and backup set. Image backup is about to be copied and pasted at the system layer, which will not be discussed here. 2. Command execution method:
1) RMAN> backup database; 2) RMAN> run {...}; 3) rman target/@ backup. sql4) rman target/destination file = backup. sql5) RMAN> @ backup. SQL
  III. Backup command:1. Back up the database:
1) backup database;/* back up the entire database. */2) backup database format'/backup/back _ % u';/* Add the format parameter to customize the path and naming method. */3) list backup of database;/* view the backup information. */4) delete backupset x;/* if you delete a backup set, a confirmation message is displayed. If you do not want any prompt, add noprompt. */
2. Backup control file:
1) backup current controlfile; 2) backup database include current controlfile; 3) configure controlfile autobackup on; 4) list backup of controlfile;
3. Back up the archive file:
1) backup archivelog all; 2) backup current controlfile plus archivelog; 3) backup archivelog all delete all input;/* Add the delete all input parameter to automatically delete the archive after backup. */
4. Backup parameter file:
1) backup spfile;
5. Back up the backup set: you can back up the backup set to another disk or tape.
1) backup backupset all delete all input; 2) backup backupset n, n, n delete all input;
IV. Incremental backup (not displayed. The default mode is differential and cumulative)
1) backup incremental level 0 database; 2) backup incremental level 1 database format'/backup/backup_1/% d _ % s _ % p _ % u _ % T_1.dmp '; /* if the database is large, you can enable block tracking for incremental backup. However, if block tracking is not enabled, rman reads all databases and then performs incremental backup. */Select status from v $ block_change_tracking; alter database disable block change tracking; alter database enable block change tracking using file '/xxx/xxx '; /* if OMF (oracle-managed file) is used, a block tracking file is automatically created. */
V. rman backup redundancy policy (either based on time or based on the number of redundancy)
Configure retention policy to recovery window of n days;/* based on time */configure retention policy to redundancy n;/* based on number of redundancy */configure retention policy to none; /* Restore the default value */

 

Backup of RMAN comprehensive learning

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.