Type of database connection



Target database


A database to be backed up or recovered by RMAN

Recovery catalog database


A database that provides an optional backup store for the RMAN repository in addition to the control file.

Auxiliary instance


Auxiliary database


A physical standby database, or a database instance created for performing a specific task such as creating a duplicate database, transporting tablespaces, or performing tablespace point-in-time recovery (TSPITR).

For many tasks that use an auxiliary database, RMAN creates an automatic auxiliary instance for use during the task, connects to it, performs the task, and then destroys it when the task is completed. You do not give any explicit command

Authentication Using the Operating System

The following are the prerequisites for connecting to a database using operating system authentication (OS authentication):

■You must set the ORACLE_SID environment variable, specifying the system identifier (SID) for the database.
■You must be a member of the OSDBA operating system group to connect with the SYSDBA privilege or the OSBACKUPDBA operating system group to connect with the SYSBACKUP privilege.

On UNIX and Linux, the OSDBA group is typically named dba, and the OSBACKUPDBA group is typically named backupdba.

These names are assigned during database installation.
% rman target ‘”/ as sysdba”‘
% rman target ‘”/ as sysbackup”‘
rman target /

If neither AS SYSBACKUP nor AS SYSDBA is specified in the connection string, then the default used is AS SYSDBA.

About Backup and Recovery of CDBs

You can perform RMAN operations on a whole CDB, the root only, or one or more PDBs. You make RMAN connections to CDBs according to the following rules:
■To perform operations on the whole CDB (for example, to back up the whole CDB) you connect as target to the root.

■To perform operations on the root only (for example, to back up the root) you connect as target to the root.

■To perform operations on a single PDB, you can connect as target either to the root or directly to the PDB.
–If you connect to the root, you must use the PLUGGABLE DATABASE syntax in your RMAN commands. For example, to back up a PDB, you use the BACKUP PLUGGABLE DATABASE command.
–If instead you connect directly to a PDB, you can use the same commands that you would use when connecting to a non-CDB. For example, to back up a PDB, you would use the BACKUP DATABASE command.

■To perform operations on two or more PDBs with a single command, you connect as target to the root.
For example, to back up both the sales and hr PDBs, you connect to the root and submit the following command:

Restrictions When Connected to a PDB

The following operations are not available when you connect as target directly to a PDB:
■Back up archived logs
■Delete archived logs
■Delete archived log backups
■Restore archived logs (RMAN does restore archived logs when required during media recovery.)
■Point-in-time recovery (PITR)
■Table recovery
■Duplicate database
■Flashback operations
■Running Data Recovery Advisor
■Report/delete obsolete
■Register database
■Import catalog
■Reset database
■Configuring the RMAN environment (using the CONFIGURE command)

Connecting Locally to the Root

rman target sys
target database Password: password
connected to target database: CDB (DBID=659628168)

Connecting to the Root with Operating System Authentication

rman target /
connected to target database: CDB (DBID=659628168)

Connecting to the Root with a Net Service Name

rman target c##bkuser@sales
target database Password: password
connected to target database: CDB (DBID=659628168)

Connecting as Target to a PDB

To connect as target to a PDB, you must:
■Connect with a net service name that resolves to a database service for that PDB.
■Connect as a local user or common user with the SYSDBA privilege.
The following example assumes the following
■You want to perform RMAN operations on a PDB named hrpdb.
■The net service name hrpdb resolves to a database service for the hrpdb PDB.
■The local user hrbkup was created in the hrpdb PDB and granted the SYSDBA privilege.
rman target hrbkup@hrpdb
target database Password: password
connected to target database: CDB (DBID=659628168)

Specifying the Location of RMAN Output

By default, RMAN writes command output to standard output. To redirect output to a log file, enter the LOG parameter on the command line when you start RMAN, as in the following example:
# rman LOG /tmp/rman.log
In this case, RMAN displays command input but does not display the RMAN output. The easiest way to send RMAN output both to a log file and to standard output is to use the Linux tee command or its equivalent. For example, the following technique enables both input and output to be visible in the RMAN command-line interface:
# rman | tee rman.log

Setting Globalization Support Environment Variables for RMAN

Before invoking RMAN, it may be useful to set the NLS_DATE_FORMAT and NLS_LANG environment variables. These variables determine the format used for the time parameters in RMAN commands such as RESTORE, RECOVER, and REPORT.
The following example shows typical language and date format settings:

If you are going to use RMAN to connect to an unmounted database and mount the database later while RMAN is still connected, then set the NLS_LANG environment variable so that it also specifies the character set used by the database.
A database that is not mounted assumes the default character set, which is US7ASCII. If your character set is different from the default, then RMAN returns errors after the database is mounted.

For example, if the character set is WE8DEC, then to avoid errors, you can set the NLS_LANG variable as follows:
For the environment variable NLS_DATE_FORMAT to be applied and override the defaults set for the server in the server initialization file, the environment variable NLS_LANG must also be set.