Skip Headers
Oracle® Database Backup and Recovery Reference
11g Release 1 (11.1)

Part Number B28273-01
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
View PDF

CONNECT

Purpose

Use the CONNECT command to establish a connection between RMAN and a target, auxiliary, or recovery catalog database.

Note:

When connecting from the command line, the password may be visible to other users on the system. Use the CONNECT command at the RMAN prompt to avoid this problem.

See Also:

RMAN for command-line connection options

Prerequisites

You can only run the CONNECT TARGET, CONNECT CATALOG, and CONNECT AUXILIARY commands at the RMAN prompt and only if RMAN is not already connected to the databases specified by these commands. To connect to a different target, catalog, or auxiliary database you must start a new RMAN session.

Usage Notes

An RMAN session runs in NOCATALOG mode by default if all of the following conditions are met:

Syntax

connect::=

Description of connect.gif follows
Description of the illustration connect.gif

(connectStringSpec::=)

Semantics

Syntax Element Description
CONNECT AUXILIARY Establishes a connection between RMAN and an auxiliary instance. Auxiliary instances are used with the TRANSPORT TABLESPACE and DUPLICATE commands, and during RMAN TSPITR.
CONNECT CATALOG Establishes a connection between RMAN and the recovery catalog database.

If the recovery catalog is a virtual private catalog, then the RMAN client connecting to it must be at patch level 10.1.0.6 or 10.2.0.3. Oracle9i RMAN clients cannot connect to a virtual private catalog. This version restriction does not affect RMAN client connections to an Oracle Database 11g base recovery catalog, even if the base catalog has some virtual private catalog users.

RMAN issues an RMAN-06445 error if you attempt to use the CONNECT CATALOG command in an RMAN session when RMAN is already in the default NOCATALOG mode (see "Usage Notes").

Note: Oracle recommends that you always use RMAN with a recovery catalog in a Data Guard environment.

CONNECT TARGET Establishes a connection between RMAN and a target database.

Note: RMAN can connect to physical standby databases as TARGET in a Data Guard environment. If you run CONNECT TARGET for a database that has a DB_UNIQUE_NAME that is unknown to the recovery catalog, but the DBID is the same as a registered database, then RMAN automatically and implicitly registers the database in the recovery catalog.

   connectStringSpec
Specifies the connection information for the database.

Examples

Example 2-48 Connecting Without a Recovery Catalog

This example starts RMAN in NOCATALOG mode and then connects to the target database with an Oracle Net service name prod1.

% rman NOCATALOG
RMAN> CONNECT TARGET SYS/password@prod1;

Example 2-49 Connecting in the Default NOCATALOG Mode

This example starts RMAN without specifying either CATALOG or NOCATALOG and then uses CONNECT TARGET to connect to database prod1. Because no CONNECT CATALOG has been run, RMAN defaults to NOCATALOG mode when you run the BACKUP command.

% rman
RMAN> CONNECT TARGET /
RMAN> BACKUP DATABASE;

At this point in the RMAN session, you cannot run CONNECT CATALOG because the session has defaulted to NOCATALOG mode. At attempt to connect to the catalog in this session receives an error:

RMAN> CONNECT CATALOG rman/password@catdb

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been used

Example 2-50 Connecting to Target, Recovery Catalog, and Auxiliary Databases

This example connects to three databases. The example connects to the target database by means of operating system authentication and connects to the recovery catalog and auxiliary databases by means of password files.

% rman
RMAN> CONNECT TARGET;
RMAN> CONNECT CATALOG rman/password@catdb;
RMAN> CONNECT AUXILIARY SYS/password@dupdb;