{"id":73180,"date":"2014-12-01T16:54:03","date_gmt":"2014-12-01T16:54:03","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/uncategorized\/oracle-database-12c-rman-new-features-part-2\/"},"modified":"2021-07-14T13:07:28","modified_gmt":"2021-07-14T13:07:28","slug":"oracle-database-12c-rman-new-features-part-2","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/oracle-databases\/oracle-database-12c-rman-new-features-part-2\/","title":{"rendered":"Oracle Database 12c &#8211; RMAN New Features: Part 2"},"content":{"rendered":"<p>Oracle Database 12c has new enhancements and additions to Recovery Manager (RMAN).\u00a0 The Recovery Manager continues to enhance and extend the reliability, efficiency, and availability of Oracle Database Backup and Recovery. In this article series, I will be explaining the new features and how it will help the Oracle community.<\/p>\n<p>See new features covered in Part 1 \u2013 <b><a href=\"https:\/\/allthingsoracle.com\/oracle-database-12c-rman-new-features-part1\/\">Oracle Database 12c &#8211; RMAN New Features: Part 1<\/a><\/b><\/p>\n<p>In this article I will cover:<\/p>\n<ul>\n<li>Multisection Backup Improvements<\/li>\n<li>Restoring and Recovering Files Over Network<\/li>\n<li>Storage Snapshot Optimization<\/li>\n<li>Active Database Duplication Improvements<\/li>\n<\/ul>\n<h2>Multisection Backup Improvements<\/h2>\n<p>The multisection backup functionality was introduced in Oracle 11g to handle large data file backups. Using this functionality RMAN can break up a large file into sections during the backup and recovery, which can improve the performance of large datafiles backup. You can select the size using the SECTION SIZE keyword and each channel will create separate files within the backup set, and backup the database in parallel. This functionality supports only backup sets in 11g.<\/p>\n<p>In Oracle 12c, the multisection backup supports incremental backups and image copies, including backup sets (introduced in 11g). \u00a0This functionality can only be used for data files, you cannot use this to backup control files.<\/p>\n<p>If the SECTION SIZE that you selected is larger than the actual file then RMAN does not use multisection backup. If you specify a small SECTION SIZE that produces more than 256 sections then RMAN increases the SECTION SIZE to a value that results 256 sections.<\/p>\n<p>The following example creates a multisection backup of the database using image copies.<br \/>\n<code>RMAN&gt; BACKUP AS COPY SECTION SIZE 1024M DATABASE;<\/code><\/p>\n<p>The following example creates multisection incremental level1 backup<br \/>\n<code>RMAN&gt; BACKUP INCREMENTAL LEVEL 1 SECTION SIZE 1024M DATABASE;<\/code><\/p>\n<p>To improve the backup performance, use unused block compression and block change tracking in conjunction with multisection incremental backups.<\/p>\n<h2>Restoring and Recovering Files over Network<\/h2>\n<p>Using RMAN you can restore and recover a database, datafile, controlfile, tablespace or spfile over the network from a physical standby database. To restore the database over the network, use the <code>RESTORE\u2026 FROM SERVICE<\/code> command and use the <code>RECOVER\u2026FROM SERVICE<\/code> command to recover the database over the network. The <code>FROM SERVICE<\/code> clause specifies the service name of the physical standby.<\/p>\n<p>You can also use multisection, compression and encryption to improve backup and restore performance.<\/p>\n<ul>\n<li>Use <code>SECTION SIZE<\/code> with <code>RESTORE <\/code>command to perform multisection restore<\/li>\n<li>Use <code>SET ENCRYPTION<\/code> clause before the <code>RESTORE<\/code> command to specify the encryption<\/li>\n<li>Use <code>USING COMPRESSED BACKUPSET<\/code> clause to compress backup sets<\/li>\n<\/ul>\n<p>This feature is useful to synchronize primary and standby database.\u00a0 Here are the few scenarios<\/p>\n<ul>\n<li>Roll-forward a physical standby database to sync with the primary database<\/li>\n<li>Restore the primary database using physical standby database.<\/li>\n<li>Restore physical standby database using the primary database.<\/li>\n<\/ul>\n<p>In the following example restoring data file over the network from physical standby to primary database<\/p>\n<p>Connected to primary database implicitly<br \/>\n<code>RMAN&gt; CONNECT TARGET \/<\/code><\/p>\n<p>Backup sets encrypted using AES128 encryption algorithm<br \/>\n<code>RMAN&gt; SET ENCRYPTION ALGORITHM 'AES128';<\/code><\/p>\n<p>Restoring the datafile on the primary using datafile on physical database with service \u201cstandby_db\u201d<br \/>\n<code>RMAN&gt; RESTORE DATAFILE '\/db1\/oradata\/users.dbf' FROM SERVICE standby_db SECTION SIZE 1024M;<\/code><\/p>\n<h2>Storage Snapshot Optimization<\/h2>\n<p>This new feature enables you to take a storage snapshot of your database using third-party technologies without keeping the database in BACKUP mode. When you need to recover, you can use point in time of the snapshot. You can roll forward by using the database archive logs, and use this snapshot feature to recover part or all of the database.<\/p>\n<p>The best practice is to use different storage location to keep snapshot than the one where the database currently running.<\/p>\n<p>In order to backup your Oracle database using storage snapshot optimization, the third-party snapshot technologies must meet the following requirements:<\/p>\n<ul>\n<li>The snapshot preserves the write order for each file.<\/li>\n<li>The database is crash consistent during the snapshot.<\/li>\n<li>The snapshot technology stores the time at which the snapshot is completed.<\/li>\n<\/ul>\n<p>If third-party snapshot technology vendor cannot guarantee compliance with above requirements then you must keep the database in BACKUP mode to take the snapshot.<\/p>\n<p>Follow these steps to keep the database in BACKUP mode and take snapshot<\/p>\n<ol>\n<li><code>SQL&gt; ALTER DATABASE BEGIN BACKUP<\/code><\/li>\n<li>Take Snapshot using third-part technologies<\/li>\n<li><code>SQL&gt; ALTER DATABASE END BACKUP<\/code><\/li>\n<\/ol>\n<p>Use <code>RECOVER\u2026SNAPSHOT TIME<\/code> command to recover the database in one step from RMAN or SQL*Plus. You can recover the database to a point-in-time or current time after the snapshot was taken. When performing point-in-time make sure that the recovery time cannot be earlier than the snapshot time.<\/p>\n<p>To recover database completely use below command<br \/>\n<code>RECOVER DATABASE;<\/code><\/p>\n<p>To recover database using particular snapshot use below command<br \/>\n<code>RECOVER DATABASE UNTIL TIME \u201810\/10\/2014 10:00:00\u2019 SNAPSHOT TIME \u201810\/10\/2014 09:00:00\u2019<\/code><\/p>\n<p>In this example database will be recovered until \u201810\/10\/2014 10:00:00\u2019 using snapshot taken on \u201810\/10\/2014 09:00:00\u2019<\/p>\n<p>To perform partial recovery using archived redo logs use below command<br \/>\n<code>RECOVER DATABASE UNTIL CANCEL SNAPSHOT TIME \u201810\/10\/2014 09:00:00\u2019<\/code><\/p>\n<p>Note that <code>UNTIL CANCEL<\/code> clause is valid only in SQL*Plus<\/p>\n<p>If there are any structural changes during the snapshot then the snapshots are unusable.\u00a0 Do not perform the operations such as O<code>NLINE, OFFLINE, DROP, RENAME, ADD, READONLY<\/code> and <code>SHRINK<\/code> on data files and table spaces.<\/p>\n<h2>Active Database Duplication Improvements<\/h2>\n<p>Active Database duplication was introduced in Oracle Database 11g. Using this feature you can create clone or standby database by copying the data files and archive logs using the TARGET (Source) database channels over the network to clone AUXILIARY database. As you are using the TARGET database channels you will see processing load on the TARGET instance. In this method no backups of the TARGET database are required.<\/p>\n<div id=\"attachment_5308\" style=\"width: 380px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-5308\" alt=\"rman2pic1\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/oracle\/2014\/12\/rman2pic1.png\" width=\"370\" height=\"157\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/oracle\/2014\/12\/rman2pic1.png 370w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/oracle\/2014\/12\/rman2pic1-300x127.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p class=\"wp-caption-text\">In Oracle 11g, Performance typically gated by network bandwidth<\/p>\n<\/div>\n<p>In Oracle 12c, you can perform Active Database duplication using the backup sets. You can allocate sufficient AUXILIARY channels to connect TARGET database and retrieve the backup\u2019s sets over the network, this reduced the load on the TARGET (source) database. You can use unused block compression to reduce the size of the backups transported over the network.<\/p>\n<p>While performing the Active database duplication you can also encrypt backups and multisection backups.<\/p>\n<div id=\"attachment_5309\" style=\"width: 386px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-5309\" alt=\"rman2pic2\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/oracle\/2014\/12\/rman2pic2.png\" width=\"376\" height=\"168\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/oracle\/2014\/12\/rman2pic2.png 376w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/oracle\/2014\/12\/rman2pic2-300x134.png 300w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><\/p>\n<p class=\"wp-caption-text\">In Oracle 12c, it helps to reduce network consumption and improve performance<\/p>\n<\/div>\n<p>As you see in below duplication example, it is using AUXILIARY channel.<\/p>\n<pre>oracle@gc12c ~]$ rman target sys\/password@TESTDB auxiliary sys\/password@DUPDB \r\nRecovery Manager: Release 12.1.0.1.0 - Production on Wed Oct 15 10:26:58 2014 \r\nCopyright (c) 1982, 2013, Oracle and\/or its affiliates.\u00a0 All rights reserved. \r\n\r\nconnected to target database: TESTDB (DBID=488428308732) \r\nconnected to auxiliary database: DUPDB (not mounted) \r\n\r\nRMAN&gt; run { \r\n2&gt; duplicate target database to DUPDB from active database \r\n3&gt;\u00a0\u00a0 db_file_name_convert('TESTDB','DUPDB'); \r\n4&gt; } \r\n\r\nStarting Duplicate Db at 15-OCT-2014 10:27:11 \r\nusing target database control file instead of recovery catalog \r\n<b>allocated channel: ORA_AUX_DISK_1 \r\nchannel ORA_AUX_DISK_1: SID=20 device type=DISK<\/b> \r\ncurrent log archived \u2026\u2026\u2026\u2026\u2026\u2026.<\/pre>\n<p>Note that if the numbers of AUXILIARY channels allocated are less than target channels, or no auxiliary channels are allocated, then RMAN uses image copies to perform active database duplication. In order to RMAN use backup sets you need to establish connection to target database using a net service name and one of the following conditions must be satisfied.<\/p>\n<ul>\n<li>The number of AUXILIARY channels should be equal or greater than TARGET channels<\/li>\n<li>The DUPLICATION \u2026FROM ACTIVE DATABASE should contain either USING BACKUPSET, USING COMPRESSED BACKUPSET or SECTION SIZE clause<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Oracle Database 12c offers new enhancements and additions in Recovery Manager (RMAN). The above listed features will help user to backup the database in parallel, improve the backup performance, reduce the load on the source database during the active duplication, quickly create point-in-time copies using storage snapshot and easily synchronize primary and standby databases over the network. Take the advantage of new features for efficient backup and recovery.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Database 12c has new enhancements and additions to Recovery Manager (RMAN).\u00a0 The Recovery Manager continues to enhance and extend the reliability, efficiency, and availability of Oracle Database Backup and Recovery. In this article series, I will be explaining the new features and how it will help the Oracle community. See new features covered in Part 1 \u2013 Oracle Databas&hellip;<\/p>\n","protected":false},"author":316203,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143533],"tags":[5564,4598,48492],"coauthors":[],"class_list":["post-73180","post","type-post","status-publish","format-standard","hentry","category-oracle-databases","tag-backups","tag-recovery","tag-rman"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/73180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/316203"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=73180"}],"version-history":[{"count":1,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/73180\/revisions"}],"predecessor-version":[{"id":91669,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/73180\/revisions\/91669"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=73180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=73180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=73180"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=73180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}