Connecting to the Target Database Using RMAN

To perform backup or recovery operations or to configure backup and recovery settings, you must start the Oracle Recovery Manager (RMAN) client and connect to the target database. A target database is the Oracle database that must be backed up or restored using RMAN. Connections to the target database require the SYSDBA or SYSBACKUP administrative privilege.

To connect to the target database:

  1. Open a command window.
  2. Ensure that the ORACLE_SID environment variable is set to the system identifier (SID) of the database.
    $ ORACLE_SID=prod; export ORACLE_SID
    
  3. Do one of the following:
    • To connect as a database user who was granted the SYSBACKUP privilege, enter the following command:

      rman target '"username as sysbackup"'
      

      The single and double quotes are required. Enter the user's password when prompted.

    • To connect with operating system authentication, ensure that you are logged in to the database host as a user who is in the OSBACKUPDBA group (typically the backupdba group on UNIX and Linux systems), and enter the following command:

      rman target /
      

      When you do not explicitly specify SYSDBA or SYSBACKUP, you are connected to the target database with the SYSDBA privilege.

Note:

You can start RMAN on one database host and connect to a target database on another host. This is known as connecting to a remote database, and it requires that:

  • You supply a net service name in the connect string.

  • Your user name be entered in the password file of the remote database to connect as SYSBACKUP.

Connecting to a remote database is outside the scope of this documentation. For more information, see Oracle Database Backup and Recovery User's Guide

See Also: