Oracle8i Backup and Recovery Guide
Release 8.1.5

A67773-01

Library

Product

Contents

Index

Prev Next

11
Recovery Manager Command Syntax

This chapter describes, in alphabetical order, Recovery Manager commands and sub-clauses.

Conventions Used in this Reference

This section explains the conventions used in this book including:

Text

The text in this reference adheres to the following conventions:

UPPERCASE  

Uppercase text calls attention to SQL commands and keywords, filenames, column headings in tables and views, and initialization parameters.  

bold  

Bold text calls attention to Recovery Manager keywords.  

italics  

Italicized text calls attention to definitions of terms, the names for Recovery Manager parameters and options that are not keywords (e.g., integer), and sample values for Recovery Manager parameters (e.g., datafile tbs_01.f).  

Syntax Diagrams and Notation

Syntax Diagrams

This reference uses syntax diagrams to show Recovery Manager commands. These syntax diagrams use lines and arrows to show syntactic structure, as shown here:


This section describes the components of syntax diagrams and gives examples of how to write Recovery Manager commands. Syntax diagrams are made up of these items:

Keywords

Keywords have special meanings in Recovery Manager syntax. In the syntax diagrams, keywords appear in square boxes and an uppercase font. When described in text, RMAN keywords appear in lowercase bold, e.g., backup database. You must use keywords in your RMAN statements exactly as they appear in the syntax diagram, except that they can be either uppercase or lowercase.

The RMAN language is free-form. Keywords must be separated by at least one white-space character, but otherwise there are no restrictions. A command may span multiple lines.

Parameters

Parameters act as placeholders in syntax diagrams. In the syntax diagrams, they appear in ovals. When described in text, RMAN parameters appear in lowercase italics, e.g., 'filename'. Parameters are usually names of database objects (tablespace_name), Oracle data type names (date_string), or sub-clauses (datafileSpec). When you see a parameter in a syntax diagram, substitute an object or expression of the appropriate type in your RMAN statement. For example, to write a duplicate target database to command, use the name of the duplicate database you want to create, such as dupdb, in place of the database_name parameter in the syntax diagram.

Some parameter values are enclosed in required or optional quotes. The syntax diagrams show single quotes, though in all cases double quotes are also legal. For example, you specify either 'filename' or "filename". For the sql command, it is recommended that you use double quotes.

This lists shows parameters that appear in the syntax diagrams and provides examples of the values you might substitute for them in your statements:

quoted strings such as 'filename', 'tablespace_name', 'channel_name', 'channel_parms'  

A string of characters contained in either single or double quotes, e.g., 'filename' or "filename". A quoted string may contain whitespace, punctuation, and RMAN and SQL keywords.  

"?/dbs/cf.f"

'dev1'  

non-quoted strings such as channel_id, tag_name, date_string  

A sequence of characters containing no white-space and no punctuation characters and starting with an alphabetic character.  

ch1  

integer  

Any sequence of characters containing only number characters.  

67843  

Code Examples

This reference contains many examples of RMAN commands. These examples show you how to use elements of RMAN. The following example shows a backup command:

run {
     allocate channel ch1 type disk;
     backup database;
} 
    

Note that examples appear in a different font from the text.

Command Entries

The description of each command or sub-clause contains the following sections:

Syntax  

shows the keywords and parameters that make up the statement.  

 

Note: Not all keywords and parameters are valid in all circumstances. Be sure to refer to the "Keywords and Parameters" section of each statement to learn about any restrictions on the syntax.  

Purpose  

describes the basic uses of the statement.  

Requirements  

lists any requirements and restrictions for proper use of the command.  

Keywords and Parameters  

describes the purpose of each keyword and parameter. Restrictions and usage notes also appear in this section.  

Examples  

shows how to use various clauses and options of the statement.  

 

Usage notes: Optional sections following the examples provide more information on how and when to use the statement.  

Summary of RMAN Commands

The following table provides a functional summary of RMAN commands. Note that all release 8.0 commands still work with the release 8.1 RMAN executable.

Table 11-1 Recovery Manager Commands
Command  Purpose 

"allocate"  

Establish a channel, which is a connection between RMAN and a database instance.  

"allocateForMaint"  

Allocate a channel in preparation for issuing maintenance commands such as change.  

"alterDatabase"  

Mount or open a database.  

"archivelogRecordSpecifier"  

Specify a range of archived redo logs files for use in backup, restore, and maintenance operations as well as queries to the recovery catalog.  

"backup"  

Back up a database, tablespace, datafile, or archived redo log file.  

"catalog"  

Add information about a datafile copy, archived redo log, or control file copy to the recovery catalog and control file.

Catalog a datafile copy as a level 0 backup, which enables you to use it as part of an incremental backup strategy.

Record the existence of file copies created before RMAN was installed or generated via means other than RMAN.  

"change"  

Mark a backup piece, image copy, or archived redo log as having the status unavailable or available.

Delete a backup piece, image copy, or archived redo log from the operating system and update its recovery catalog record to status deleted.

Check whether backup pieces, datafile copies, or archived redo logs are available and, if they are not, mark them as expired.  

"cmdLine"  

Connect to the target, recovery catalog, or auxiliary database.

Specify that you are using RMAN without a recovery catalog.

Specify a command file, which is a user-defined file containing RMAN commands.

Specify the file in which RMAN records the results of processed commands.

Add to rather than overwrite the contents of the command file.

Generate debugging output and specify its location.  

"completedTimeSpec"  

A sub-clause that specifies a time range during which the backup or copy completed.  

"connect"  

Establish a connection between RMAN and a target, auxiliary (duplicated or auxiliary instance used for TSPITR), or recovery catalog database.  

"connectStringSpec"  

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.  

"copy"  

Create an image copy of a file.  

"createCatalog"  

Create a schema for the recovery catalog.  

"createScript"  

Create a stored script and store it in the recovery catalog for future reference.  

"crosscheck"  

Determine whether backup sets stored on disk or tape still exist.  

"datafileSpec"  

Specify a datafile by filename or absolute file number.  

"debug"  

Turn RMAN's debugging feature off and on.  

"deleteExpired"  

Delete backup sets marked EXPIRED by the crosscheck command and remove references to them from the recovery catalog and control file.  

"deleteScript"  

Delete a stored script from the recovery catalog.  

"deviceSpecifier"  

Specify the type of storage for a backup or copy.  

"dropCatalog"  

Remove the schema from the recovery catalog.  

"duplicate"  

Use backups of the target database to create a duplicate database that you can use for testing purposes.  

"host"  

Invoke an O/S command-line sub-shell from within RMAN.  

"list"  

Produce a detailed report about a specified group of backup sets or copies recorded in the recovery catalog or target control file.  

"listObjList"  

Specify a database or one or more tablespaces, control files, datafiles, or archived redo logs.  

"printScript"  

Print a stored script to the RMAN message log file. Specify the log filename with the log argument at the command line (see "connect").  

"recover"  

Apply redo logs or incremental backups to a restored backup set or copy in order to update it to a specified time.  

"register"  

Register the target database in the recovery catalog so that RMAN can access it.  

"release"  

Release a sequential I/O device while maintaining the connection to the target database instance.  

"releaseForMaint"  

Release a sequential I/O device specified in an allocate channel command with the for delete or for maintenance option.  

"replaceScript"  

Replace an existing script stored in the recovery catalog. If the script does not exist, replace script creates it.  

"replicate"  

Copy the control file to multiple destinations.  

"report"  

Perform detailed analyses of the content of the recovery catalog.  

"reset"  

Create a new database incarnation record in the recovery catalog.  

"restore"  

Restore files from backup sets or from copies on disk to the current location, overwriting the files with the same name.  

"resync"  

Perform a full resynchronization, which creates a snapshot control file and then compares the recovery catalog to either the current control file of the target database or the snapshot control file and updates it with information that is missing or changed.  

"rmanCmd"  

Execute stand-alone commands, which are commands you run from the command-line interpreter (CLI), i.e., the RMAN prompt.  

"run"  

Compile and execute job commands, which are one or more statements executed within the braces of run.  

"send"  

Send a vendor-specific quoted string to one or more specific channels.  

"set"  

Specify the auxiliary filenames for target datafiles. This operation is useful when performing TSPITR.

Display executed RMAN commands in the message log.

Specify a database's db identifier.

Set the filename of the snapshot control file.  

"set_run_option"  

Specify new filenames for datafiles.

Specify a limit for the number of permissible block corruptions.

Override default archived redo log destinations.

Specify that backups should be duplexed.

Determine which server process corresponds to which channel.

Limit the number of buffers that will be read from each input datafile on a specified channel.

Limit the number of input files that a backup operation can have open at any given time for a specified channel.

Limit the size of the backup pieces for a specified channel.  

"shutdown"  

Shut down the target database without exiting RMAN. This command is equivalent to the SQL*Plus SHUTDOWN command.  

"sql"  

Execute a SQL statement from within Recovery Manager.  

"startup"  

Start up the database from within the RMAN environment. This command is equivalent to the SQL*Plus STARTUP command.  

"switch"  

Specify that a datafile copy is now the current datafile, i.e., the datafile pointed to by the control file.  

"upgradeCatalog"  

Upgrade the recovery catalog schema from an older version to the version required by the RMAN executable.  

"validate"  

Examine a backup set and report whether its data is intact. RMAN scans all of the backup pieces in the specified backup sets and looks at the checksums to verify that the contents can be successfully restored if necessary.  




Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index