Skip Headers
Oracle® Database Backup and Recovery Basics
10g Release 2 (10.2)

Part Number B14192-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

3.3 Connecting the RMAN Client to Databases

This section describes connecting the RMAN client to target databases. It contains the following topics:

In the examples in this section, the generic values used have the following meanings.

Value Used in Example Meaning
SYS User with SYSDBA privileges
oracle The password for connecting as SYSDBA specified in the target database's orapwd file
trgt The net service name for the target database

3.3.1 Types of Database Connections Used with RMAN

To perform useful work, the RMAN client must connect to a target database, the database to be backed up or recovered. Depending upon the task to be performed and your specific backup strategy, the RMAN client may also connect to two other databases:

  • The recovery catalog database, which provides an optional backup store for the RMAN repository in addition to the control file

  • An auxiliary database, which may be a standby database, or an instance created for performing a specific task such as duplicating a database, transporting tablespaces without taking the making database read-only, or performing tablespace point-in-time recovery.

Note:

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 given any explicit command to conect to automatic auxiliary databases.

3.3.2 Authentication for Database Connections

When connecting to a target or auxiliary database, you must have the SYSDBA privilege.

You can connect as SYSDBA with a password file or with operating system authentication.

Note:

Unlike SQL*Plus, RMAN does not require that you specify the SYSDBA privilege when connecting to a database. Because all RMAN database connections require SYSDBA privilege, RMAN always implicitly attempts to connect with this privilege.

If the target database uses password files, then you can connect using a password. Use a password file for either local or remote access. You must use a password file if you are connecting remotely as SYSDBA with a net service name.

If you connect to the database using operating system authentication, you must set the environment variable specifying the Oracle SID. For example, to set the SID to trgt at the UNIX command line enter:

% ORACLE_SID=trgt; export ORACLE_SID

A SYSDBA privilege is not required when connecting to the recovery catalog. Note that you must grant the RECOVERY_CATALOG_OWNER role to the schema owner.

For automatic auxiliary instances, RMAN ensures that you have SYSDBA privilege when it sets up the instance.

See Also:

Oracle Database Administrator's Guide to learn how to authenticate users on a database

3.3.3 Connecting to the Target Database from the Command Line

To connect to the target database from the operating system command line, enter the connection as in the following examples:

# example of operating system authentication
% rman TARGET / NOCATALOG   
# example of Oracle Net authentication
% rman TARGET SYS/oracle@trgt NOCATALOG   

You can also start RMAN without specifying NOCATALOG or CATALOG as follows:

# example of operating system authentication
% rman TARGET /   
# example of Oracle Net authentication
% rman TARGET SYS/oracle@trgt   

If you do not specify NOCATALOG on the command line, and if you do not specify CONNECT CATALOG after RMAN has started, then RMAN begins to work in NOCATALOG mode the first time that you run a command that requires the use of the RMAN repository.

Note:

Once you have executed a command that uses the RMAN repository in NOCATALOG mode, you must exit and restart RMAN to be able to connect to a recovery catalog.

If you connect to the target database on the operating system command line, then you can begin executing commands after the RMAN prompt is displayed.

3.3.4 Connecting to the Target Database from the RMAN Prompt

If you start RMAN without connecting to the target database, then you must issue a CONNECT TARGET command at the RMAN prompt to connect to a target database and begin performing useful work. This example connects to a target database using operating system authentication:

% rman
RMAN> CONNECT TARGET /

This example connects to the target database with database-level credentials:

% rman
RMAN> connect target SYS/oracle@trgt