A Some advantages of RMAN backup
1. RMAN detects and reports corrupted blocks of data.
2. RMAN can connect to the backup database without having to put the table space into hot backup mode. Additional build redo logs are generated during hot backup.
3. RMAN automatically tracks new data files and tablespaces so that new tablespaces and data files are no longer required to be added to the script.
4. Rman backs up only used databases (up to the highest wate mark), so the Rman backup image is typically less than the backup script for online backup.
5. RMAN provides the actual compression of the backup image.
6. RMAN provides automatic and convenient backup, restore, and recovery operations. RMAN tracks all the backups required to recover the database, needs to use these backups when the restore operation is required, and restores only the necessary objects.
7. RMAN can work seamlessly with third party media management products.
8. RMAN supports an incremental backup strategy.
9. You can use Rman to test backups without actually restoring them.
Two RMAN compatibility issues
Before you start a backup operation, you need to consider some compatibility issues. In an enterprise, different versions of Oracle may be running, so we must consider Rman compatibility issues when designing a backup strategy.
Reasons can refer to: RMAN Architecture Overview
The following table is a reference table for Oracle Compatibility:
RMAN Target Database version
(Apply patch)
RMAN Client Version
(Apply patch)
RMAN Catalog Database version
(Apply patch)
RMAN Catalog schema version
(Apply patch)
9.0.1
9.0.1
>=8.1.7
>=rman Client
9.2.0
>=9.0.1.3 and <= directory database executable version
>=8.1.7
>=rman Client
10.1.0
>=9.0.1.3 and <= directory database executable version
>=9.0.1
>=rman Client
10.2.0
>=9.0.1.3 and <= directory database executable version
>=9.0.1
>=rman Client
Catalog schema versions in tables can be viewed from the Rcver table:
Sql> Conn RMAN/RMAN@ORCL; --Login with catalog user
is connected.
Sql> select * from Rcver;
VERSION
------------
11.02.00.01
Three Monitoring Rman Backup
RMAN produces output during the backup and cancels the output if logging is enabled when the Rman is started. You can monitor the RMAN operation by viewing the generated log files, or view them through the V$rman_output view.
Sql> conn/@orcl as SYSDBA;
is connected.
Sql> Select output from V$rman_output order by stamp;
Four Offline Rman Database backup
4.1 Perform a backup operation using the default settings:
RMAN will have some parameters with default values that we can back up without changing these parameters. The backup set is then backed up to the flashback area. We can connect Rman using either catalog mode or catalog mode. If the catalog mode is used, just add the catalog parameter to the connection. Note, however, that it is generally recommended to directly connect Rman locally on the server and then connect to the catalog directory over a network connection.
When performing an offline backup operation, the database must be in the Mount state. Some of the commands are as follows:
Shutdown Immediate
Startup Mount
Backup Database
Or
Backup as compressed Backupset database-backs up databases as compressed backup sets
C:/users/administrator.daviddai>rman target '/@orcl as SYSDBA ';
Recovery manager: Release 11.2.0.1.0-production on Mon June 21 23:24:47 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connect to target database: ORCL (dbid=1247395743)
Rman>
C:/users/administrator.daviddai>rman target '/@orcl as sysdba ' catalog ' RMAN/RMAN@ORCL ';
Recovery manager: Release 11.2.0.1.0-production on Mon June 21 23:25:24 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connect to target database: ORCL (dbid=1247395743)
Connecting to the Recovery directory database
Rman>
4.2 Do not use default parameters to perform an offline backup operation
Let's take a look at a script:
Shutdown Immediate
Startup Mount
Run
{
Allocate Channel C1 device type disk format ' d:/backup/sid_%u ';
Allocate Channel C2 device type disk format ' e:/backup/sid_%u ';