Oracle9i Recovery Manager Reference
Release 1 (9.0.1)

Part Number A90136-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

RMAN Commands , 13 of 60


cmdLine

Syntax


Text description of cmdline.gif follows
Text description of the illustration cmdline.gif

Purpose

To start RMAN from the operating system command line. Use these arguments to:

If you start RMAN without specifying either CATALOG or NOCATALOG on the command line, then RMAN makes no connection to a repository. If you run a command that requires the repository, and if no CONNECT CATALOG command has been issued yet, then RMAN automatically connects in the default NOCATALOG mode. After that point, the CONNECT CATALOG command is not valid in the session.

See Also:

Oracle9i Recovery Manager User's Guide to learn how to use RMAN to connect to databases 

Restrictions and Usage Notes

Use these arguments at the operating system command line rather than at the RMAN prompt.

Keywords and Parameters

TARGET = connectStringSpec 

Specifies a connect string to the target database, for example, TARGET SYS/change_on_install@inst1.

See Also: "connectStringSpec" 

CATALOG = connectStringSpec 

Specifies a connect string to the database containing the recovery catalog, for example, CATALOG rman/rman@inst2.

See Also: "connectStringSpec" 

NOCATALOG 

Indicates that you are using RMAN without a recovery catalog.

Note: If you do not specify either CATALOG or NOCATALOG on the command line, then RMAN defaults to NOCATALOG mode when it requires a repository connection (assuming that you have not issued CONNECT CATALOG). 

AUXILIARY = connectStringSpec 

Specifies a connect string to an auxiliary database, for example, AUXILIARY SYS/change_on_install@dupdb.

See Also: "connectStringSpec" 

LOG = 'filename' 

Specifies the file where Recovery Manager will record RMAN output, that is, the commands that were processed and their results. If you do not specify this argument, then RMAN writes its message log file to standard output.

The LOG parameter does not cause RMAN to abort if the specified file cannot be opened. Instead, the output goes to standard output. 

APPEND 

Causes new output to be appended to the end of the message log file. If you do not specify this parameter, and if a file with the same name as the message log file already exists, then RMAN overwrites it. 

CMDFILE = 'filename' 

Runs a file containing a user-defined list of RMAN commands. If the first character of the filename is alphabetic, then you can omit the quotes around the filename.

The contents of the command file should be identical to commands entered at the RMAN prompt. For example, the following file contents will cause RMAN to connect to a target database and recovery catalog rcat, then back up the target:

CONNECT TARGET; CONNECT CATALOG rman/rman@rcat; BACKUP DATABASE PLUS ARCHIVELOG;

RMAN terminates after running the command file. 

@filename 

Equivalent to CMDFILE

MSGNO 

Causes RMAN to print message numbers, that is, RMAN-xxxx, for the output of all commands. By default, RMAN does not print the RMAN-xxxx prefix. 

SEND = 'command' 

Sends a vendor-specific command string to all allocated channels.

See Also: Your media management documentation to determine whether this feature is supported, and "SEND" 

PIPE = 'pipe_name' 

Invokes the RMAN pipe interface. RMAN uses two public pipes: one for receiving commands and the other for sending output. The names of the pipes are derived from the value of the PIPE parameter. For example, you can invoke the RMAN pipe interface with the following options: PIPE rpi TARGET SYS/pwd@tdb.

RMAN opens the following pipes in the target database:

  • ORA$RMAN_RPI_IN, which RMAN uses to receive user commands

  • ORA$RMAN_RPI_OUT, which RMAN uses to send all output

All messages on both the input and output pipes are of type VARCHAR2.

See Also: Oracle9i Recovery Manager User's Guide to learn how to pass commands to RMAN through a pipe 

TIMEOUT = integer 

Causes RMAN to exit automatically if it does not receive input from an input pipe within integer seconds. The PIPE parameter must be specified when using TIMEOUT.

See Also: Oracle9i Recovery Manager User's Guide to learn how to pass commands to RMAN through a pipe 

Examples

Connecting Without a Recovery Catalog: Example

This example connects to the target database prod1 without a recovery catalog:

% rman TARGET SYS/sys_pwd@prod1 NOCATALOG

Connecting in Default NOCATALOG mode: Example

This example connects to the target database prod1 without specifying catalog options. Because CONNECT CATALOG is not run at the RMAN prompt, RMAN connects in default NOCATALOG mode when the first command requiring a repository connection is run:

% rman
RMAN> CONNECT TARGET
RMAN> BACKUP DATABASE;

Connecting to an Auxiliary Instance: Example

This example connects to the target database prod1, the recovery catalog database rcat, and the auxiliary instance aux1:

% rman TARGET SYS/sys_pwd@prod1 CATALOG rman/rman@rcat AUXILIARY sys/aux_pwd@aux1

Specifying a Command File: Example

This example connects to the target database prod1 and the recovery catalog database rcat, and then runs the command file b_whole_10.rcv:

% rman TARGET SYS/sys_pwd@prod1 CATALOG rman/rman@rcat @'/oracle/dbs/b_whole_l0.rcv'

Specifying a Message Log in Append Mode: Example

This example connects to the target database prod1 without a recovery catalog and then specifies that RMAN should append messages to the message log:

% rman TARGET / NOCATALOG LOG = $ORACLE_HOME/dbs/log/msglog.f APPEND

Invoking the RMAN Pipe Interface: Example

This example invokes the RMAN pipe newpipe with a 90 second timeout option:

% rman PIPE newpipe TARGET SYS/sys_pwd@prod1 TIMEOUT = 90

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback