To backup the database with multithreads can considerably speed up the backup process as long as IO throughput is good enough to handle high volume read-write. command to display the current setting of the control file autobackup: RMAN configuration parameters for database with db_unique_name O12C are. Further reading: How to Set USE_DB_RECOVERY_FILE_DEST. In this post, I will talked about the following topics. RMAN will open a channel for each degree of parallelism, and if the number of channels opened is greater, than the number of preconfigured channels, for the unconfigured channels, RMAN will write backup files to the fRA, Setting the Autobackup of the Control File, You should always configure RMAN to back up the control file automatically after running any RMAN, command or after you make physical changes to the database that result in updates to the control file (such as. This example configures duplexing to2forDISKbackups of data files and control files (control file autobackups on disk are a special case and are never duplexed), then configuressbtas the default device. Oracle recommends that we enable asynchronous disk IO to backup the database, setting backup locations for different scenarios, How to Resolve ORA-20200: Database Instance does not exist, How to Revoke Quota on Tablespace from User, How to Build 19c RAC on Windows - 4 of 4 - Creating a RAC Database, How to Build 19c RAC on Windows - 3 of 4 - Installing Database Software on All Nodes, How to Resolve ORA-06502: PL/SQL: numeric or value error: character to number conversion error, How to Resolve Error in invoking target 'agent_nmhs' of makefile ins_emagent.mk, How to Shrink XFS File System on Enterprise Linux 7.2. Because duplexing is enabled for disk backups, two copies of each output backup set are created. Here is a typical configuration specifying.
Configuring a Default Compression Algorithm. COPIESsetting, so RMAN setsn=2. RMAN skips the backup of a log only if at least two copies of the log exist on thesbtdevice. However, RMAN backs up two copies of all logs generated after 9 a.m. because these logs have not yet been backed up to tape. Oracle Secure Backup is the media manager. Tape drivetape1is directly attached tonode1, while tape drivetape2is directly attached tonode2. This example configures channels of device typeDISKandsbtand sets the default device type assbt. This example usesCONFIGURE AUXNAMEto specify new file names for the data files. If you want to make theMEDIUMcompression algorithm the default compression algorithm for all compressed backups, issue the following: From this point on, you can use theMEDIUMcompression algorithm by issuing the following command: This example creates a persistent configuration that, by default, creates sparse backups to disk and in the backup set format. Specifying the Default Format for Control File Autobackup. The followingSHOWcommand displays the persistent device type configurations for the database whose unique name isdgprod3: The followingSHOWcommand displays the persistent configurations for all databases known to the recovery catalog whose DBID is 3257174182 (the value specified by the precedingSET DBIDcommand): This scenario illustrates the backup optimization behavior described inTable 2-3. At 9 a.m., you back up three copies of all existing archived redo log files to tape. Channels are released automatically once the execution exits the run-block. Assume that primary databaseprodis associated with two standby databases with theDB_UNIQUE_NAMEnamesdgprod3anddgprod4. The firstBACKUPcommand backs up the archived redo log files on the defaultsbtchannel. As you can see, we spread the backup across 4 disks by channels. TheBACKUP_TAPE_IO_SLAVESinitialization parameter must betruewhen duplexing backups to tape. Without specifying destination, backup pieces go to the configured destination, mostly, it's DB_RECOVERY_FILE_DEST (Fast Recovery Area, FRA). By the way, there're more about setting backup locations for different scenarios. For instance, if you specify a degree of parallelism of 2, RMAN allocates only two, channels, regardless of the number of channels you configured via the, In this example of configuring three channels, suppose the, RMAN allocates three channels, all on separate mount points (, specified locations. TheDUPLICATEcommand duplicates a database to a remote host with a different directory structure. Configuring Automatic Channels Across File Systems.
This example configures automatic disk channels across two file systems: BecausePARALLELISMis set to2, the following command divides the output data between two file systems: The followingLISTcommand shows how the data file backup was parallelized: Configuring Automatic Channels in an Oracle Real Application Clusters (Oracle RAC) Configuration. Although Oracle recommends that we enable asynchronous disk IO to backup the database, we can still use parallelism to simulate it and boost IO performance with synchronous IO. We can make all backup pieces go to the same specific destination as long as we format the filename in channels. Because three copies of each log exist onsbtof all the logs generated on or before 9 a.m., RMAN skips the backups of these logs. The secondBACKUPcommand backs up the database to disk locations. RMAN CONFIGUREcommand is used to create or change a persistent configuration affecting RMAN backup, restore, duplication, and maintenance jobs on a particular database. From now on, every time you backup by RMAN, you don't have to allocate any channels to do the job parallelly, because RMAN will spawn necessary channels for you. Assume that you start RMAN and connect toprodasTARGETand connect to a recovery catalog. We can also spread backup pieces across several destinations, this is especially useful when one disk space is not enough to accommodate all backup pieces. The following example enables the autobackup feature and configures the default autobackup format for theDISKandsbtdevices: Creating Configurations for Standby Databases. The control files of the two standby databases are updated with the configuration only after the reverse resynchronization from the recovery catalog to the control file, which occurs the first time that the user connects todgprod3anddgprod4. The example also enables backup optimization and configures a recovery windows of two weeks. RMAN only allocates the number of channels as specified by the degree of parallelism; other, configured channels are ignored. Assume that backup optimization is disabled. Required fields are marked *. syntax to specify the location for RMAN backups. The example configures an automatic SBT channel for each cluster node. RMAN> configure device type disk parallelism 3; RMAN> configure channel 1 device type disk format '/u01/O12C/rman/rman1_%U.bk'; RMAN> configure channel 2 device type disk format '/u02/O12C/rman/rman2_%U.bk'; RMAN> configure channel 3 device type disk format '/u03/O12C/rman/rman3_%U.bk'; In these lines of code, you should configure the device-type parallelism degree to match the number of channels, that you allocated. I prefer to use the, command. RMAN creates as many backup pieces in the three locations as it deems necessary to create a. Your email address will not be published. Your email address will not be published. If you'd like to control how many channels to backup the database parallelly, you can set it in the run-block. CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET SPARSE ON; Simple Steps to Getting Started with RMAN in Oracle 19c. Save my name, email, and website in this browser for the next time I comment. The following commands configure the default device type for databasesdgprod3anddgprod4. Now comes the question, how many parallel channels should be allocated? If you want RMAN to backup parallelly without specifying how many channels it could use, you can configure the degree of parallelism in RMAN. DOP = CPU_COUNT x PARALLEL_THREADS_PER_CPU. This is because I'm frequently writing to multiple disk locations and, need the flexibility to specify directories located on different mount points. I think we should seek for an answer from the database. This example illustrates channel connections to Oracle RAC instancesnode1andnode2. In fact, we derive the value of DOP from CPU_COUNT and PARALLEL_THREADS_PER_CPU by this: You can use the value as a good starting point to tune DOP. This example assumes that you have a license for the Advanced Compression Option (ACO) of the database. This example assumes an Oracle RAC database with two nodes. For both channel connections, RMAN uses the same user name and password that were entered for the target database connection. Next, for easing the burden of IO and space, you may consider to compress backup sets by RMAN. If you need to unconfigure a channel, do so as follows: RMAN> configure channel 3 device type disk clear; Also consider what happens if you configure a degree of parallelism higher than the number of preconfigured, channels.