Oracle® Database Backup and Recovery Reference 11g Release 1 (11.1) Part Number B28273-01 |
|
|
View PDF |
Purpose
Use the connectStringSpec
subclause to specify the username, password, and net service name for connecting to a target, recovery catalog, or auxiliary database. The connection is necessary to authenticate the user and identify the database.
Prerequisites
You must have SYSDBA
privileges to connect to a target or auxiliary database. Do not connect to the recovery catalog database as user SYS
.
Usage Notes
It is not recommended that you connect to the recovery catalog database as user SYS
.
Syntax
connectStringSpec::=
Semantics
Syntax Element | Description |
---|---|
/ |
If you do not specify a user ID or password when connecting to the target database, then a forward slash establishes a connection as user SYS by using operating system authentication (see Example 3-12).
Note: The forward slash depends on platform-specific environment variables. |
userid |
Establishes a connection to the database for the specified user. If you do not specify a password, then RMAN obtains the password interactively by displaying a prompt (see Example 3-11). The characters will not be echoed to the terminal.
You must have Note: The connect string must not contain any white space, but it can contain punctuation characters such as a forward slash ( |
/ password |
Establishes a connection for the specified user by using a password. If the target database is not open, then a password file must exist. |
@ net_service_name |
Establishes a connection to the database through an optional Oracle Net net service name (see Example 3-10). |
Examples
Example 3-10 Connecting to a Target Database Without a Recovery Catalog
This example connects to the target database by using a password and the Oracle Net service name prod1
in the default NOCATALOG
mode:
% rman
RMAN> CONNECT TARGET SYS/password@prod
Example 3-11 Connecting to a Target Database and Entering the Password Interactively
This example connects to the target database as user SYS
but without specifying a password at the command line. Note that you are prompted for a password.
% rman TARGET SYS Recovery Manager: Release 11.1.0.6.0 - Production on Wed Jul 11 17:51:30 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. target database Password:
Example 3-12 Connecting with Operating System Authentication
This example starts RMAN and then connects to the target database prod
by using operating system authentication. The example also connects to the recovery catalog database catdb
by using a net service name.
% rman
RMAN> CONNECT TARGET /
RMAN> CONNECT CATALOG rman/password@catdb