Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to next page

10
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 (for example, integer), and sample values for Recovery Manager parameters (for example, 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, for example, 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, for example, 'filename'. Parameters are usually:

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, for example, '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 

Reserved Words

Table 10-1 is a list of RMAN reserved words. If you use one of these words by itself without surrounding it in quotes, then RMAN generates an error. These are examples of correct and incorrect entries:

allocate channel backup type disk;         # incorrect
allocate channel 'backup' type disk;       # correct
backup database tag full;                  # incorrect
backup database tag 'full';                # correct
Table 10-1 RMAN Reserved Words (Page 1 of 2)

abort  

affinity  

after  

all  

allocate 

alter 

and 

append 

archivelog 

at 

auxiliary 

auxname 

available 

backslash  

backup 

backuppiece 

backupset 

before 

beginline 

between 

cancel 

catalog 

change 

channel 

channel_id 

check 

clone 

clone_cf 

clonename 

cmdfile 

check 

clone 

clone_cf 

clonename 

cmdfile 

command 

completed 

connect 

controlfile 

controlfilecopy 

copy 

create 

crosscheck 

cumulative 

current 

database 

datafile 

datafilecopy 

days 

dba 

dbid 

debug 

define 

delete 

destination 

device 

disk 

diskratio 

drop 

dump 

duplex 

duplicate 

echo 

equal 

execute 

exit 

expired 

filesperset 

for 

force 

forever 

format 

from 

full 

group 

high 

host 

id 

inaccessible 

incarnation 

include 

incremental 

input 

integer 

immediate 

job 

kbytes 

level 

libparm 

library 

like 

limit 

list 

log 

logfile 

logical 

logseq 

low 

maxcorrupt 

maxopenfiles 

msglog 

mask 

msgno 

maintenance 

mount 

name 

need 

newname 

nochecksum 

nocatalog 

newline 

noredo 

normal 

nomount 

nofilenamecheck 

null 

of 

offline 

orphan 

obsolete 

open 

on 

off 

only 

parms 

plsql 

print 

pfile 

proxy 

pool 

pipe 

rcvcat 

release 

reload 

replace 

replicate 

report 

recoverable 

reset 

restart 

restore 

resync 

rman 

rpctestrun 

readonly 

readrate 

recover 

redundancy 

register 

reuse 

schema 

scn 

script 

send 

set 

setlimit 

setsize 

shutdown 

size 

skip 

slaxdebug 

sql 

startup 

step 

tablespace 

tag 

target 

test 

thread 

time 

timeout 

to 

trace 

transactional 

type 

unavailable 

uncatalog 

underscore 

unrecoverable 

until 

upgrade 

validate 

 

 

 

 

 

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 10-2 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 through 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 remove its recovery catalog record.

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. 

"configure" 

Set the compatibility level of the recovery catalog. 

"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 operating system 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. 

"rmanCommand" 

Execute stand-alone commands, which are commands you run from the command-line interpreter (CLI), that is, 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, that is, 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. 


Go to previous page Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index