Oracle® Database: Backup and Recovery Reference 10g Release 2 (10.2)
Oracle® Database: Backup and Recovery Reference 10g Release 2 (10.2)
Oracle® Database: Backup and Recovery Reference 10g Release 2 (10.2)
November 2005
This book provides complete reference information on the
Recovery Manager client, including command syntax, a
compatibility matrix, and recovery catalog views.
Antonio Romero
Contributing Author:
Lance Ashdown
Contributors: Tammy Bednar, Anand Beldalker, Timothy Chien, Raymond Guzman, Alex Hwang, Ashok
Joshi, J. William Lee, Valarie Moore, Muthu Olagappan, Samitha Samaranayake, Francisco Sanchez, Steven
Wertheimer, Wanli Yang
The Programs (which include both the software and documentation) contain proprietary information; they
are provided under a license agreement containing restrictions on use and disclosure and are also protected
by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly,
or decompilation of the Programs, except to the extent required to obtain interoperability with other
independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems in
the documentation, please report them to us in writing. This document is not warranted to be error-free.
Except as may be expressly permitted in your license agreement for these Programs, no part of these
Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose.
If the Programs are delivered to the United States Government or anyone licensing or using the Programs on
behalf of the United States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data"
pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As
such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation
and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license
agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial
Computer SoftwareRestricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City,
CA 94065
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy and other measures to ensure the safe use of such applications if the Programs are used for such
purposes, and we disclaim liability for any damages caused by such use of the Programs.
Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.
The Programs may provide links to Web sites and access to content, products, and services from third
parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites.
You bear all risks associated with the use of such content. If you choose to purchase any products or services
from a third party, the relationship is directly between you and the third party. Oracle is not responsible for:
(a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the
third party, including delivery of products or services and warranty obligations related to purchased
products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from
dealing with any third party.
Contents
Preface ............................................................................................................................................................... vii
Audience...................................................................................................................................................... vii
Documentation Accessibility .................................................................................................................... vii
Related Documentation ............................................................................................................................ viii
Conventions ............................................................................................................................................... viii
1-1
1-1
1-1
1-1
1-2
1-2
1-2
1-3
1-5
1-5
RMAN Commands
Summary of RMAN Commands ........................................................................................................... 2-1
@................................................................................................................................................................... 2-5
@@ ................................................................................................................................................................ 2-6
ALLOCATE CHANNEL .......................................................................................................................... 2-7
ALLOCATE CHANNEL FOR MAINTENANCE ............................................................................ 2-10
allocOperandList ................................................................................................................................... 2-13
ALTER DATABASE .............................................................................................................................. 2-16
archivelogRecordSpecifier .................................................................................................................. 2-18
BACKUP.................................................................................................................................................. 2-22
BLOCKRECOVER ................................................................................................................................ 2-48
CATALOG............................................................................................................................................... 2-51
CHANGE ................................................................................................................................................ 2-54
cmdLine................................................................................................................................................... 2-57
completedTimeSpec.............................................................................................................................. 2-61
CONFIGURE.......................................................................................................................................... 2-63
CONNECT .............................................................................................................................................. 2-75
iii
connectStringSpec .................................................................................................................................
CONVERT ..............................................................................................................................................
CREATE CATALOG..............................................................................................................................
CREATE SCRIPT ...................................................................................................................................
CROSSCHECK ......................................................................................................................................
datafileSpec ............................................................................................................................................
DELETE ...................................................................................................................................................
DELETE SCRIPT .................................................................................................................................
deviceSpecifier.....................................................................................................................................
DROP CATALOG................................................................................................................................
DROP DATABASE..............................................................................................................................
DUPLICATE .........................................................................................................................................
EXECUTE SCRIPT...............................................................................................................................
EXIT........................................................................................................................................................
fileNameConversionSpec ..................................................................................................................
FLASHBACK........................................................................................................................................
formatSpec ............................................................................................................................................
HOST .....................................................................................................................................................
keepOption...........................................................................................................................................
LIST........................................................................................................................................................
listObjList .............................................................................................................................................
maintQualifier .....................................................................................................................................
maintSpec..............................................................................................................................................
obsOperandList ...................................................................................................................................
PRINT SCRIPT ....................................................................................................................................
QUIT ......................................................................................................................................................
recordSpec.............................................................................................................................................
RECOVER .............................................................................................................................................
REGISTER ............................................................................................................................................
RELEASE CHANNEL.........................................................................................................................
releaseForMaint ...................................................................................................................................
REPLACE SCRIPT...............................................................................................................................
REPORT ................................................................................................................................................
RESET DATABASE.............................................................................................................................
RESTORE..............................................................................................................................................
RESYNC ................................................................................................................................................
RUN........................................................................................................................................................
SEND .....................................................................................................................................................
SET .........................................................................................................................................................
SHOW....................................................................................................................................................
SHUTDOWN .......................................................................................................................................
SPOOL...................................................................................................................................................
SQL.........................................................................................................................................................
STARTUP ..............................................................................................................................................
SWITCH ................................................................................................................................................
tempfileSpec.........................................................................................................................................
TRANSPORT TABLESPACE ............................................................................................................
iv
2-77
2-79
2-89
2-91
2-93
2-95
2-96
2-100
2-101
2-102
2-103
2-104
2-112
2-113
2-114
2-117
2-122
2-125
2-126
2-128
2-144
2-146
2-148
2-150
2-151
2-152
2-153
2-155
2-164
2-166
2-167
2-168
2-170
2-176
2-179
2-193
2-195
2-198
2-199
2-207
2-210
2-212
2-213
2-215
2-217
2-220
2-222
UNREGISTER DATABASE...............................................................................................................
untilClause............................................................................................................................................
UPGRADE CATALOG .......................................................................................................................
VALIDATE ............................................................................................................................................
2-226
2-228
2-230
2-231
RC_REDO_LOG ....................................................................................................................................
RC_REDO_THREAD ...........................................................................................................................
RC_RESYNC ..........................................................................................................................................
RC_RMAN_BACKUP_JOB_DETAILS .............................................................................................
RC_RMAN_BACKUP_SUBJOB_DETAILS .....................................................................................
RC_RMAN_BACKUP_TYPE ..............................................................................................................
RC_RMAN_CONFIGURATION .......................................................................................................
RC_RMAN_STATUS ............................................................................................................................
RC_STORED_SCRIPT .........................................................................................................................
RC_STORED_SCRIPT_LINE..............................................................................................................
RC_TABLESPACE .................................................................................................................................
RC_TEMPFILE.......................................................................................................................................
RC_UNUSABLE_BACKUPFILE_DETAILS.....................................................................................
RMAN Compatibility
About RMAN Compatibility ................................................................................................................
Determination of Catalog Schema Version ...................................................................................
RMAN Compatibility Matrix................................................................................................................
Cross-Version Compatibility of Recovery Catalog Exports and Imports.................................
RMAN Compatibility: Scenario ...........................................................................................................
Index
vi
3-56
3-57
3-58
3-59
3-61
3-62
3-63
3-64
3-66
3-67
3-68
3-69
3-70
B-1
B-1
B-2
B-3
B-3
Preface
This preface contains these topics:
Audience
Documentation Accessibility
Related Documentation
Conventions
Audience
Backup and Recovery Reference is intended for database administrators who perform
the following tasks:
Documentation Accessibility
Our goal is to make Oracle products, services, and supporting documentation
accessible, with good usability, to the disabled community. To that end, our
documentation includes features that make information available to users of assistive
technology. This documentation is available in HTML format, and contains markup to
facilitate access by the disabled community. Accessibility standards will continue to
evolve over time, and Oracle is actively engaged with other market-leading
technology vendors to address technical obstacles so that our documentation can be
accessible to all of our customers. For more information, visit the Oracle Accessibility
Program Web site at
http://www.oracle.com/accessibility/
Accessibility of Code Examples in Documentation
Screen readers may not always correctly read the code examples in this document. The
conventions for writing code require that closing braces should appear on an
vii
otherwise empty line; however, some screen readers may not always read a line of text
that consists solely of a bracket or brace.
Accessibility of Links to External Web Sites in Documentation
This documentation may contain links to Web sites of other companies or
organizations that Oracle does not own or control. Oracle neither evaluates nor makes
any representations regarding the accessibility of these Web sites.
TTY Access to Oracle Support Services
Oracle provides dedicated Text Telephone (TTY) access to Oracle Support Services
within the United States of America 24 hours a day, seven days a week. For TTY
support, call 800.446.2398.
Related Documentation
For more information, see these Oracle resources:
Many of the examples in this book use the sample schemas of the seed database, which
is installed by default when you install Oracle. Refer to Oracle Database Sample Schemas
for information on how these schemas were created and how you can use them
yourself.
Conventions
The following text conventions are used in this document:
viii
Convention
Meaning
boldface
italic
monospace
1
About RMAN Commands
This chapter describes the basic elements of RMAN syntax. It includes the following
sections:
1-1
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 in the
following example for the RMAN CATALOG command.
lcatalog::=
ARCHIVELOG
BACKUPPIECE
filename
CONTROLFILECOPY
=
LEVEL
CATALOG
,
DATAFILECOPY
filename
integer
TAG
tag_name
RECOVERY AREA
NOPROMPT
DB_RECOVERY_FILE_DEST
START WITH
string_pattern
This section describes the components of syntax diagrams and gives examples of how
to write RMAN commands. Syntax diagrams are made up of these items:
Keywords
Placeholders
Keywords Keywords have special meanings in Recovery Manager syntax. In the syntax
diagrams, keywords appear in rectangular boxes and an uppercase font, like the word
CATALOG in the example diagram. When used in text and code examples, RMAN
keywords appear in uppercase, monospace font, for example, CATALOG
DATAFILECOPY. You must use keywords in RMAN statements exactly as they appear
in the syntax diagram, except that they can be either uppercase or lowercase.
Placeholders Placeholders in syntax diagrams indicate non-keywords. In the syntax
diagrams, they appear in ovals, as in the word integer in the example diagram. When
described in text, RMAN placeholders appear in lowercase italic, for example,
'filename'. Placeholders are usually:
Subclauses (datafileSpec)
itself may also contain a quote, and the most common type of quote in a SQL
statement is a single quote. Single and double quotes do not mean the same in SQL as
they do in RMAN.
The only system-independent, legal environment variables in RMAN quoted strings
are ? for the Oracle home and @ for the SID. However, you can use operating system
specific environment variables on the target system within quoted strings. The
environment variables are interpreted by the database server and not the RMAN
client.
The following table shows placeholders that appear in the syntax diagrams and
provides examples of the values you might substitute for them in your statements.
Placeholder
Description
Examples
A string of characters
contained in either single or
double quotes. A quoted
string may contain white
space, punctuation, and
RMAN and SQL keywords.
"?/dbs/cf.f"
A sequence of characters
containing no white space
and no punctuation
characters and starting with
an alphabetic character.
ch1
integer
67843
'dev1'
Reserved Word
Reserved
Word
Reserved Word
Reserved
Word
Reserved
Word
ABORT
CONSISTENT
FORMAT
MAXPIECESIZE
PLSQL
SETLIMIT
AFFINITY
CONTROLFILE
FROM
MAXSEQ
PLUS
SETSIZE
AFTER
CONTROLFILECO
PY
FULL
MAXSETSIZE
POLICY
SHOW
ALL
COPIES
MAXSIZE
POOL
SHUTDOWN
ALLOCATE
COPY
GET
MISC
SINCE
ALTER
CORRUPTION
GROUP
MOUNT
PROXY
SIZE
AND
CREATE
HIGH
MSGLOG
PUT
SKIP
APPEND
CROSSCHECK
HOST
MSGNO
QUIT
SLAXDEBUG
ARCHIVELOG
CUMULATIVE
ID
NAME
RATE
SNAPSHOT
AT
CURRENT
IDENTIFIER
NEED
RCVCAT
SPFILE
ATALL
DATABASE
IMMEDIATE
NEW
RCVMAN
SPOOL
AUTOBACKUP
DATAFILE
INACCESSIB
LE
NEW-LINE
READONLY
SQL
1-3
Reserved
Word
Reserved Word
AUTOLOCATE
DATAFILECOPY
AUXILIARY
Reserved
Word
Reserved Word
Reserved
Word
Reserved
Word
INCARNATIO
N
NEWNAME
READRATE
STANDBY
DAYS
INCLUDE
NOCATALOG
RECOVER
STARTUP
AUXNAME
DBA
INCREMENTA
L
NOCFAU
RECOVERABL STEP
E
AVAILABLE
DBID
INPUT
NOCHECKSUM
RECOVERY
BACKED
DEBUG
IO
NOEXCLUDE
REDUNDANCY SWITCH
BACKUP
DEFAULT
JOB
NOFILENAMECHE
CK
REGISTER
TABLESPACE
BACKUPPIEC
E
DEFINE
NOFILEUPDATE
RELEASE
TAG
BACKUPSET
DELETE
KBYTES
NOKEEP
RELOAD
TARGET
BEFORE
DESTINATION
KEEP
NOLOGS
REMOVE
TEST
BETWEEN
DEVICE
LEVEL
NOMOUNT
RENORMALIZ THREAD
E
BLOCK
DISK
LIBNAME
NONE
REPLACE
TIME
BLOCKRECOV
ER
DISKRATIO
LIBPARM
NOPROMPT
REPLICATE
TIMEOUT
BLOCKS
DISPLAY
LIBRARY
NOREDO
REPORT
TIMES
BY
DORECOVER
LIBTEXT
NORMAL
RESET
TO
CANCEL
DROP
LIKE
NOT
RESETLOGS
TRACE
CATALOG
DUMP
LIMIT
NULL
RESTART
TRANSACTION
AL
CHANGE
DUPLEX
LIST
OBSOLETE
RESTORE
TXT
CHANNEL
DUPLICATE
LOG
OF
RESYNC
TYPE
CHARSET
ECHO
LOGFILE
OFF
RETENTION
UNAVAILABLE
CHECK
EXCLUDE
LOGICAL
OFFLINE
REUSE
UNCATALOG
CLEAR
EXECUTE
LOGS
ON
RPC
UNLIMITED
CLONE
EXIT
LOGSCN
ONLY
RPCTEST
UNRECOVERAB
LE
CLONENAME
EXPIRED
LOGSEQ
OPEN
RUN
UNTIL
CLONE_CF
FILE
LOW
OPTIMIZATION
SAVE
UNUSED
CMDFILE
FILES
ORPHAN
SCHEMA
UP
COMMAND
FILESPERSET
MAINTENANC
E
PACKAGES
SCN
UPGRADE
COMPATIBLE
FINAL
MASK
PARALLELISM
COMPLETED
FOR
MAXCORRUPT
PARMS
SEND
VERBOSE
CONFIGURE
FORCE
MAXDAYS
PFILE
SEQUENCE
WINDOW
CONNECT
FOREVER
MAXOPENFIL
ES
PIPE
SET
SUMMARY
VALIDATE
If you must use one of the reserved words as an argument to an RMAN command (for
example, as a filename, tablespace name, tag name, and so on), surround it with
quotes. Otherwise, RMAN cannot parse your command correctly and generates an
error. These are examples of correct and incorrect commands that use RMAN reserved
words with quotes:
ALLOCATE CHANNEL backup DEVICE TYPE DISK;
ALLOCATE CHANNEL 'backup' DEVICE TYPE DISK;
BACKUP DATABASE TAG full;
BACKUP DATABASE TAG 'full';
#
#
#
#
incorrect
correct
incorrect
correct
In general, you should avoid using reserved words in ways that conflict with their
primary meaning in the RMAN command language.
Section
Content
Syntax
Purpose
Keywords and
Parameters
Examples
Note: Optional sections following the examples provide more information on how and
when to use the statement.
1-5
2
RMAN Commands
This chapter describes, in alphabetical order, Recovery Manager commands and
subclauses. For a summary of the RMAN commands and command-line options, refer
to "Summary of RMAN Commands" on page 2-1.
Command
Purpose
Run a command file in the same directory as another command file that is
currently running. The @@ command differs from the @ command only when
run from within a command file.
"ALLOCATE CHANNEL" on
page 2-7
"ALTER DATABASE" on
page 2-16
"archivelogRecordSpecifier" on
page 2-18
Back up database files, copies of database files, archived logs, or backup sets.
"BLOCKRECOVER" on
page 2-48
Recover an individual data block or set of data blocks within one or more
datafiles.
Mark a backup piece, image copy, or archived redo log as having the status
UNAVAILABLE or AVAILABLE; remove the repository record for a backup or
copy; override the retention policy for a backup or copy.
"completedTimeSpec" on
page 2-61
Purpose
"connectStringSpec" on
page 2-77
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.
"CREATE CATALOG" on
page 2-89
Delete backups and copies, remove references to them from the recovery
catalog, and update their control file records to status DELETED.
"DELETE SCRIPT" on page 2-100 Delete a stored script from the recovery catalog.
"deviceSpecifier" on page 2-101
"DROP CATALOG" on
page 2-102
"DROP DATABASE" on
page 2-103
Use backups of the target database to create a duplicate database that you
can use for testing purposes or to create a standby database.
"EXECUTE SCRIPT" on
page 2-112
"fileNameConversionSpec" on
page 2-114
Specify that a backup or copy should or should not be exempt from the
current retention policy.
Purpose
Apply redo logs and incremental backups to datafiles restored from backup
or datafile copies, in order to update them to a specified time.
"RELEASE CHANNEL" on
page 2-166
"REPLACE SCRIPT" on
page 2-168
Replace an existing script stored in the recovery catalog. If the script does
not exist, then REPLACE SCRIPT creates it.
"RESET DATABASE" on
page 2-176
Inform RMAN that the SQL statement ALTER DATABASE OPEN RESETLOGS
has been executed and that a new incarnation of the target database has been
created, or reset the target database to a prior incarnation.
Restore files from backup sets or from disk copies to the default or a new
location.
Sets the value of various attributes that affect RMAN behavior for the
duration of a RUN block or a session.
Shut down the target database. This command is equivalent to the SQL*Plus
SHUTDOWN command.
Specify that a datafile copy is now the current datafile, that is, the datafile
pointed to by the control file. This command is equivalent to the SQL
statement ALTER DATABASE RENAME FILE as it applies to datafiles.
"TRANSPORT TABLESPACE"
on page 2-222
"UNREGISTER DATABASE" on
page 2-226
Purpose
"UPGRADE CATALOG" on
page 2-230
Upgrade the recovery catalog schema from an older version to the version
required by the RMAN executable.
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.
@
Syntax
at::=
@
filename
Purpose
To execute a series of RMAN commands stored in an operating system file with the
specified full path name, for example, @/oracle/dbs/cmd/cmd1.rman. If you do
not specify the full path name, then the current working directory is assumed, for
example, @cmd1.rman. Do not use quotes around the string or leave whitespace
between the @ and filename. RMAN processes the specified file as if its contents had
appeared in place of the @ command.
The file must contain complete RMAN commands; partial
commands generate syntax errors.
Note:
Example
Running a Command File from the Command Line: Example This example creates a
command file and then runs it from the operating system command line:
echo "BACKUP DATABASE;" > backup_db.rman
rman TARGET / @backup_db.rman
Running a Command File Within RMAN: Example This example runs a command file
from the RMAN prompt and from within a RUN command:
@backup_db.rman
RUN { @backup_db.rman }
@@
@@
Syntax
atat::=
@@
filename
Purpose
To execute a series of RMAN commands stored in an operating system file with the
specified filename, for example, @@cmd2.rman. If @@ is contained in a command file,
then @@filename directs RMAN to look for the specified filename in the same
directory as the command file from which it was called. If not used within a command
file, the @@ command is identical to the @ command. For example, assume that you
invoke RMAN as follows:
% rman @$ORACLE_HOME/rdbms/admin/dba/scripts/cmd1.rman
Assume that the command @@cmd2.rman appears inside the cmd1.rman script. In
this case, the @@ command directs RMAN to look for the file cmd2.rman in the
directory $ORACLE_HOME/rdbms/admin/dba/scripts/. Note that the file must
contain complete RMAN commands.
Example
Assume that you
create command files called backup_logs.rman and backup_db.rman as in the
following example. Then, you execute bkup_db.rman from the command line, which
specifies that RMAN should look for the bkup_logs.rman script in the Oracle home
directory:
Calling a Command File Within Another Command File: Example
echo
echo
echo
rman
ALLOCATE CHANNEL
ALLOCATE CHANNEL
Syntax
allocate::=
AUXILIARY
ALLOCATE
=
DEVICE TYPE
CHANNEL
channel_id
allocOperandList
deviceSpecifier
Purpose
To manually allocate a channel, which is a connection between RMAN and a database
instance. Each connection initiates an database server session on the target or auxiliary
instance: this server session performs the work of backing up, restoring, or recovering
RMAN backups.
Manually allocated channels (allocated by using ALLOCATE) should be distinguished
from automatically allocated channels (specified by using CONFIGURE). Manually
allocated channels apply only to the RUN job in which you issue the command.
Automatic channels apply to any RMAN job in which you do not manually allocate
channels. You can always override automatic channel configurations by manually
allocating channels within a RUN command.
Each channel operates on one backup set or image copy at a time. RMAN
automatically releases the channel at the end of the job.
You can control the degree of parallelism within a job by allocating the desired number
of channels. Allocating multiple channels simultaneously allows a single job to read or
write multiple backup sets or disk copies in parallel. If you establish multiple
connections, then each connection operates on a separate backup set or disk copy.
Whether ALLOCATE CHANNEL causes operating system resources to be allocated
immediately depends on the operating system. On some platforms, operating system
resources are allocated at the time the command is issued. On other platforms,
operating system resources are not allocated until you open a file for reading or
writing.
Note: When you specify DEVICE TYPE DISK, no operating
system resources are allocated other than for the creation of the
server session.
You must either allocate a channel manually or configure a channel for automatic
allocation before executing a BACKUP, DUPLICATE, CREATE CATALOG,
RESTORE, RECOVER, or VALIDATE command.
You cannot use BACKUP DEVICE TYPE or RESTORE DEVICE TYPE to use
automatic channels after specifying manual channels with ALLOCATE CHANNEL.
RMAN Commands 2-7
ALLOCATE CHANNEL
Description
AUXILIARY
CHANNEL 'channel_id'
Specifies a connection between RMAN and the target database instance. Each
connection initiates a server session on the database instance: this server
session performs the work of backing up, restoring, and recovering backups
and copies.
Specify a channel id, which is the case-sensitive name of the channel, after the
CHANNEL keyword. The database uses the channel_id to report I/O errors.
allocOperandList
Examples
This command allocates a tape
channel for a whole database and archived redo log backup:
Spreading a Backup Across Multiple Disks: Example When backing up to disk, you
can spread the backup across several disk drives. Allocate one DEVICE TYPE DISK
channel for each disk drive and specify the format string so that the filenames are on
different disks:
RUN
{
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/disk1/backups/%U';
ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/disk2/backups/%U';
BACKUP DATABASE PLUS ARCHIVELOG; # AS COPY is default when backing up to disk
}
ALLOCATE CHANNEL
generates a single backup of the database to disk, and then creates two identical
backups of datafile 1 to two different file systems:
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE DISK MAXPIECESIZE 5M;
BACKUP DATABASE PLUS ARCHIVELOG; # AS COPY is the default, so RMAN creates image copies
SET BACKUP COPIES = 2;
BACKUP DATAFILE 1 FORMAT '/disk1/backups/%U', '/disk2/backups/%U';
}
TYPE sbt;
TYPE sbt;
200K,
200K
200K
=
DEVICE TYPE
allocOperandList
deviceSpecifier
Purpose
To manually allocate a channel in preparation for issuing a CHANGE, DELETE, or
CROSSCHECK command.
If you CONFIGURE at least one channel for each device type
you use in your configuration, then you do not need to use ALLOCATE
CHANNEL FOR MAINTENANCE at all.
Note:
Execute this command only at the RMAN prompt. This command cannot be used
within a RUN block.
You cannot prefix ORA_ to a channel name. RMAN reserves channel names
beginning with the ORA_ prefix for its own use.
Manually allocated channels (maintenance or normal channels) and automatic
channels based on configured settings are never mixed. To perform maintenance
on both disk and SBT simultaneously using manually allocated maintenance
channels, you must allocate both SBT and DISK channels explicitly.
If you use ALLOCATE CHANNEL FOR MAINTENANCE, then RMAN uses the
following convention for channel naming: ORA_MAINT_devicetype_n, where
devicetype refers to DISK or sbt and n refers to the channel number. For
example, RMAN uses these names for two manually allocated disk channels:
ORA_MAINT_DISK_1
ORA_MAINT_DISK_2
You can allocate multiple maintenance channels for a single job, but you should
only use this feature in these situations:
Description
allocOperandList
Examples
Deleting a Backup Set: Example
two nodes of an Oracle Real Application Clusters configuration, where each node has
access to a subset of backups. It is assumed here that all backups are accessible by at
least one of the two nodes used in the crosscheck. Any backups not accessible from at
least one of the nodes are marked EXPIRED after the crosscheck.
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/change_on_install@inst1';
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/change_on_install@inst2';
CROSSCHECK BACKUP;
Note:
Deleting on Disk and sbt Channels with One Command: Example In this example,
you delete a backup from both disk and tape:
# back up datafile to disk and tape
BACKUP DEVICE TYPE DISK DATAFILE 1 TAG "weekly_bkup";
BACKUP DEVICE TYPE sbt DATAFILE 1 TAG "weekly_bkup";
allocOperandList
allocOperandList
Syntax
allocOperandList::=
=
CONNECT
connect_string
=
FORMAT
formatSpec
=
MAXOPENFILES
integer
=
MAXPIECESIZE
sizeSpec
=
PARMS
channel_parms
=
RATE
sizeSpec
=
SEND
command
Purpose
A subclause specifying control options on a channel, which is a connection between
RMAN and a database instance. Specify this clause on the following commands:
ALLOCATE CHANNEL
CONFIGURE
Description
CONNECT = connectStringSpec
allocOperandList
Syntax Element
Description
FORMAT = formatSpec
Specifies the format to use for the names of backup pieces that are created on
this channel.
If you do not specify FORMAT, RMAN uses %U by default, which guarantees a
unique identifier. If the flash recovery area is configured, then the files are
created in the default disk location. Otherwise, the default disk location is
operating system specific (for example, ?/dbs on Solaris).
Because the channels correspond to server sessions on the target database,
the FORMAT string must use the conventions of the target host, not the client
host. For example, if the RMAN client runs on a Windows machine and the
target database runs on a UNIX machine, then the FORMAT string must
adhere to the naming conventions of a UNIX file system or raw device.
You can specify up to four FORMAT strings. RMAN uses the second, third,
and fourth values only when BACKUP COPIES, SET BACKUP COPIES, or
CONFIGURE ... BACKUP COPIES is in effect. When choosing which format
to use for each backup piece, RMAN uses the first format value for copy 1,
the second format value for copy 2, and so forth. If the number of format
values exceeds the number of copies, then the extra formats are not used. If
the number of format values is less than the number of copies, then RMAN
reuses the format values, starting with the first one.
This parameter is useful if you allocate multiple disk channels and want each
channel to write to a different directory. If you specify the FORMAT parameter
in the BACKUP command, then it overrides the FORMAT parameter specified
in CONFIGURE CHANNEL or ALLOCATE CHANNEL.
See Also: "formatSpec" on page 2-122 for available FORMAT parameters
MAXOPENFILES = integer
Controls the maximum number of input files that a BACKUP command can
have open at any given time (the default is 8). Use this parameter to prevent
"Too many open files" error messages when backing up a large number of
files into a single backup set.
MAXPIECESIZE = integer
Specifies the maximum size of each backup piece created on this channel.
Specify the size in bytes, kilobytes (K), megabytes (M), or gigabytes (G). The
default setting is in bytes and is rounded down into kilobytes. For example,
if you set MAXPIECESIZE to 5000, RMAN sets the maximum piece size at 4
kilobytes, which is the lower kilobyte boundary of 5000 bytes.
PARMS = 'channel_parms'
Specifies parameters for the device to allocate. Do not use this port-specific
string if you have specified DEVICE TYPE DISK.
See Also: Oracle Database Backup and Recovery Advanced User's Guide to learn
how to integrate media management libraries
'ENV=(var1=val1,
var2=val2,...)'
'SBT_LIBRARY = lib_name' Specifies which media library should be used on this sbt channel. The
default library is operating system specific (for example, libobk.so in the
Solaris Operating Environment and ORASBT.DLL on Windows). For
example:
PARMS="SBT_LIBRARY=/oracle/lib/mmv.so"
RATE = integer
Sets the maximum number of bytes (default), kilobytes (K), megabytes (M), or
gigabytes (G) that RMAN reads each second on this channel. This parameter
sets an upper limit for bytes read so that RMAN does not consume too much
disk bandwidth and degrade performance.
SEND 'command'
allocOperandList
Examples
Configuring an Automatic Channel: Example This example configures a persistent
disk channel:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '?/oradata/bkup_%U';
media management library, then makes a database backup by using this library. Then,
the example backs up the database again using a different library, then finally makes a
third backup using the default library:
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS="SBT_LIBRARY=/mediavendor/lib/mm_lib1.so";
BACKUP DATABASE;
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS="SBT_LIBRARY=/mediavendor/lib/mm_lib2.so";
BACKUP DATABASE;
}
BACKUP ARCHIVELOG ALL;
ALTER DATABASE
ALTER DATABASE
Syntax
alterDatabase::=
MOUNT
ALTER DATABASE
RESETLOGS
OPEN
Purpose
To mount or open a database.
See Also:
syntax
Execute this command either within the braces of a RUN command or at the
RMAN prompt.
The target instance must be started.
Description
MOUNT
Mounts the database without opening it. This option is equivalent to the SQL
statement ALTER DATABASE MOUNT.
OPEN
RESETLOGS
Archives the current online redo logs (or up to the last redo record before redo
corruption if corruption is found), clears the contents of the online redo logs,
and resets the online redo logs to log sequence 1. The RMAN RESETLOGS
option is equivalent to the SQL statement ALTER DATABASE OPEN
RESETLOGS.
If you use a recovery catalog, then RMAN performs an implicit RESET
DATABASE after the database is opened to make this new incarnation the
current one in the catalog. If you execute the SQL statement ALTER DATABASE
OPEN RESETLOGS (not the RMAN command of the same name), then you
must manually run the RESET DATABASE command.
Examples
Opening the Database After a Backup: Example This example mounts the database,
takes a whole database backup, then opens the database. At the RMAN prompt enter:
STARTUP MOUNT;
BACKUP DATABASE;
# now that the backup is complete, open the database.
ALTER DATABASE OPEN;
Mounting the Database After Restoring the Control File: Example To restore the
control file to its default location when connected to a recovery catalog, enter the
following:
STARTUP NOMOUNT;
ALTER DATABASE
RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
# you must run the RECOVER command after restoring a control file even if no datafiles
# require recovery
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
archivelogRecordSpecifier
archivelogRecordSpecifier
Syntax
archivelogRecordSpecifier::=
ALL
=
THREAD
ARCHIVELOG
LIKE
string_pattern
integer
archlogRange
LIKE
string_pattern
archlogRange::=
=
FROM SCN
integer
SCN BETWEEN
integer
AND
integer
=
UNTIL SCN
integer
=
FROM SEQUENCE
integer
=
=
SEQUENCE
THREAD
integer
SEQUENCE BETWEEN
integer
AND
integer
integer
=
UNTIL SEQUENCE
integer
=
FROM TIME
TIME BETWEEN
date_string
date_string
AND
date_string
=
UNTIL TIME
date_string
Purpose
A subclause used to specify an archived log or range of archived redo logs files for use
in backup, restore, recovery, and maintenance operations.
When backing up archived redo logs, RMAN can perform archived log failover
automatically. RMAN backs up the log when at least one archived log corresponding
to a given log sequence number and thread is available. Also, if the copy that RMAN is
backing up contains corrupt blocks, then it searches for good copies of these blocks in
other copies of the same archived logs.
Specifying a range of archived redo logs does not guarantee that RMAN includes all
redo data in the range: for example, the last available archived log file may end before
the end of the range, or an archived log file in the range may be missing from all
archiving destinations. RMAN includes the archived redo logs it finds and does not
issue a warning for missing files.
Note: Query the V$ARCHIVED_LOG view or RC_ARCHIVED_LOG
recovery catalog view to determine the time stamps, SCNs, and log
sequence numbers for an archived log. For information on how to
use the NLS_LANG and NLS_DATE_FORMAT environment variables
to specify the format for the time, see Oracle Database Reference.
archivelogRecordSpecifier
Description
ALL
LIKE 'string_pattern'
Specifies all archived logs that match the specified string_pattern. The
same pattern matching characters that are valid in the LIKE operator in the
SQL language can be used to match multiple files.
See Also: Oracle Database Oracle Clusterware and Oracle Real Application Clusters
Administration and Deployment Guide to learn about using RMAN in a RAC
configuration
archlogRange
Syntax Element
Description
Specifies the beginning SCN for a sequence of archived redo log files. If you
do not specify the UNTIL SCN parameter, RMAN will include all available log
files beginning with SCN specified in the from SCN parameter.
Specifies the ending SCN for a sequence of archived redo log files. If you do
not specify the FROM SCN parameter, then RMAN will start with the earliest
available archived log.
If the database is open when you run BACKUP ARCHIVELOG, and if the UNTIL
clause is specified, then RMAN does not run ALTER SYSTEM ARCHIVE LOG
CURRENT.
Specifies the beginning log sequence number for a sequence of archived redo
log files. If you do not specify the UNTIL SEQUENCE parameter, RMAN will
include all available log files beginning with log sequence number specified in
the FROM SEQUENCE parameter.
Note: You can specify all log sequence numbers in a thread by using the
following syntax, where thread_number is an integer referring to the thread:
... ARCHIVELOG FROM SEQUENCE 0 THREAD thread_number
SEQUENCE
integer
archivelogRecordSpecifier
Syntax Element
Description
Specifies the beginning date for a sequence of archived redo log files. The
clause specifies those logs that could be used in a recovery starting at the
indicated time.
The time specified in the string must be formatted according to the
Globalization Technology date format specification currently in effect, but can
also be any SQL expression with the DATE datatype, such as SYSDATE. The
TO_DATE function can be used to specify hard-coded dates that work
regardless of the current Globalization Technology settings.
If you do not specify the UNTIL TIME parameter, RMAN will include all
available log files beginning with the date specified in the FROM TIME
parameter. Use the V$ARCHIVED_LOG data dictionary view to determine the
time stamps for the first and last entries in a log file.
Note: The FROM TIME clause is not the same as the COMPLETED AFTER clause.
FROM TIME specifies logs that could be used to recover starting at the indicated
time, whereas COMPLETED AFTER specifies logs that were created after the
indicated time (refer to "completedTimeSpec" on page 2-61).
See Also: Oracle Database Reference for information on how to use the
NLS_LANG and NLS_DATE_FORMAT environment variables to specify the
format for the time
TIME BETWEEN
'date_string' AND
'date_string'
UNTIL TIME =
'date_string'
Specifies the end date for a sequence of archived redo log files. The clause
specifies those logs that could be used to recover to the indicated time.
The time specified in the string must be formatted according to the
Globalization Technology date format specification currently in effect, but can
also be any SQL expression with the DATE datatype, such as SYSDATE. The
TO_DATE function can be used to specify hard-coded dates that work
regardless of the current Globalization Technology settings.
If you do not specify the FROM TIME parameter, then the beginning time for
the sequence will be the earliest available archived redo log.
If the database is open when you run BACKUP ARCHIVELOG, and if the UNTIL
clause is specified, then RMAN does not run ALTER SYSTEM ARCHIVE LOG
CURRENT.
Note: The UNTIL TIME clause is not the same as the COMPLETED BEFORE
clause. UNTIL TIME specifies logs that could be used to recover to the
indicated time, whereas COMPLETED BEFORE specifies logs that were created
before the indicated time (refer to "completedTimeSpec" on page 2-61).
See Also: Oracle Database Reference for information on how to use the
NLS_LANG and NLS_DATE_FORMAT environment variables to specify the
format for the time
THREAD = integer
Specifies the thread containing the archived redo log files you wish to include.
You only need to specify this parameter when running the database in an
Oracle Real Application Clusters (RAC) configuration.
THREAD is only valid when SEQUENCE is also specified. Although the
SEQUENCE parameter does not require that THREAD be specified, a given log
sequence always implies a thread. The thread defaults to 1 if not specified.
Query V$ARCHIVED_LOG to check the thread number for a log.
Examples
This example deletes all archived
redo logs that were created more than two weeks ago:
archivelogRecordSpecifier
Specifying Records by SCN: Example This example restores backup archived redo
log files from tape that fall within a range of SCNs:
RESTORE ARCHIVELOG SCN BETWEEN 94097 AND 106245;
Specifying a Single Log Sequence Number: Example This example backs up only
This example
backs up all archived logs from sequence 431 to sequence 440 on thread 1 and deletes
the archived logs after the backup is complete. If the backup fails, the logs are not
deleted.
RUN
{
ALLOCATE CHANNEL dev1 DEVICE TYPE sbt;
BACKUP ARCHIVELOG
SEQUENCE BETWEEN 31 AND 40 THREAD 1
# delete original archived redo logs after backup completes
DELETE INPUT;
}
Specifying All Log Sequence Numbers in a Thread This example crosschecks all
archived redo logs in thread 1:
CROSSCHECK ARCHIVELOG FROM SEQUENCE 0 THREAD 1;
BACKUP
BACKUP
Syntax
backup::=
backupOperand
BACKUP
backupSpec
backupSpecOperand
PLUS ARCHIVELOG
;
backupOperand::=
BACKUP
backupTypeSpec
=
CHANNEL
channel_id
CHECK LOGICAL
=
COPIES
integer
CUMULATIVE
=
DEVICE TYPE
deviceSpecifier
=
DISKRATIO
integer
duration
fileNameConversionSpec
=
FILESPERSET
integer
FORCE
,
=
FORMAT
formatSpec
forRecoveryOfSpec
FULL
=
LEVEL
INCREMENTAL
integer
=
FROM SCN
integer
keepOption
=
MAXSETSIZE
sizeSpec
notBackedUpSpec
NOCHECKSUM
NOEXCLUDE
=
POOL
integer
ONLY
PROXY
REUSE
skipSpec
=
TAG
tag_name
VALIDATE
backupSpec::=
BACKUP
archivelogRecordSpecifier
ALL
completedTimeSpec
BACKUPSET
,
primaryKey
CONTROLFILECOPY
filename
ALL
LIKE
string_pattern
copyOfSpec
(
FOR STANDBY
backupSpecOperand
CURRENT CONTROLFILE
DATABASE
datafileCopySpec
,
DATAFILE
datafileSpec
RECOVERY AREA
DB_RECOVERY_FILE_DEST
RECOVERY FILES
SPFILE
,
TABLESPACE
tablespace_name
backupSpecOperand::=
=
CHANNEL
channel_id
ALL
DELETE
INPUT
=
DISKRATIO
integer
=
FILESPERSET
integer
FORCE
,
=
FORMAT
formatSpec
=
FROM TAG
tag_name
FOR STANDBY
sizeSpec
notBackedUpSpec
NOEXCLUDE
=
POOL
integer
REUSE
skipSpec
=
TAG
tag_name
BACKUP
backupTypeSpec::=
COMPRESSED
AS
BACKUPSET
COPY
copyOfSpec::=
DATABASE
,
DATAFILE
COPY OF
datafileSpec
,
TABLESPACE
tablespace_name
datafileCopySpec::=
,
filename
ALL
DATAFILECOPY
LIKE
string_pattern
NODUPLICATES
,
FROM TAG
tag_name
duration::=
LOAD
MINIMIZE
TIME
PARTIAL
DURATION
integer
integer
forRecoveryOfSpec::=
=
DATAFILECOPY FORMAT
=
formatSpec
WITH TAG
tag_name
COPY
FOR RECOVER OF
TAG
tag_name
notBackedUpSpec::=
integer
TIMES
UP
NOT BACKED
=
UP SINCE TIME
date_string
sizeSpec::=
G
K
M
integer
BACKUP
skipSpec::=
INACCESSIBLE
SKIP
OFFLINE
READONLY
Purpose
To back up a database, tablespace, datafile (current or copy), control file (current or
copy), SPFILE, archived log, or backup set.
RMAN can only back up datafiles, controlfiles, SPFILEs,
archived redo log files, as well as backups of these files created by
RMAN.
Note:
Note:
Each backup set contains at least one backup piece, which is an RMAN-specific
physical file containing the backed up data. You can also use the BACKUP command to
generate a proxy copy, which is a backup to a third-party medium in which the entire
data transfer is conducted by a media manager.
Backup sets can be created on disk, or on media manager devices such as tape drives.
When the AS COPY option is used, RMAN generates image copies of the input files.
An image copy is a byte-for-byte identical copy of the original file. You can create
image copy backups of datafiles, datafile copies, and archived redo log files. Image
copy files can only exist on disk.
You can create and restore image copy backups with RMAN, or with a native
operating system command for copying files. However, when you use RMAN to
create image copies, they are recorded in the RMAN repository, and are more easily
available for use in restore and recovery operations. Otherwise, you must use the
BACKUP
CATALOG command to add the image copies to the RMAN repository before RMAN
can use them.
By default, RMAN creates all backups as backup sets, on tape or on disk. You can
change the default backup type for disk backups to be image copies using the
CONFIGURE command. Backups to tape can only be backup sets.
Incremental Backups
Incremental backups copy only those blocks that have changed since a previous
backup. A level 0 incremental backup captures all data blocks in a datafile. Level 1
incremental backups capture changes since a previous backup. Level 1 backups can be
cumulative, in which case they capture changes since the last level 0 incremental
backup, or differential, in which case they capture changes since the last level 0 or level
1 incremental backup.
Note:
For more details on incrementally updated backups, see Oracle Database Backup and
Recovery Basics.
Note:
At the standby database, the RECOVER command is used with the NOREDO option to
apply the incremental backup to the standby. All changed blocks captured in the
RMAN Commands 2-27
BACKUP
incremental backup are updated at the standby, bringing it up to date with the
original.
For an overview of the encrypted backups mechanism, a guide to its use and
information on choosing among the different modes of encryption, see Oracle Database
Backup and Recovery Advanced User's Guide. The RMAN CONFIGURE, SET and SHOW
commands are used to manage the encryption settings for your database backups. See
the reference entries for those commands for more details.
There are currently no guaranteed restore points defined for the database
The datafile is being backed up to a backup set as part of a full backup or a level 0
incremental backup
The backup set is being created on disk.
Skipping unused data blocks where possible enables RMAN to back up datafiles using
less space, and can make I/O more efficient.
Backup Optimization
The BACKUP command optimizes backups, that is, does not back up files that are
identical to files that are already backed up, when the following conditions are met:
BACKUP
Channel Failover
A BACKUP command is decomposed into multiple independent backup steps by
RMAN. Each independent step can be executed on any channel allocated for a specific
device. If you have multiple channels allocated, and one channel fails or encounters a
problem during a backup step, then RMAN attempts to complete the work on another
channel. RMAN reports a message in V$RMAN_OUTPUT and in the output to the
interactive session or log file when channel failover occurs.
Although the database depends on other types of files for operation, such as
network configuration files, password files, and the contents of the Oracle home,
these files cannot be backed up with RMAN. Likewise, some features of Oracle,
such as external tables or the BFILE datatype, store data in files other than those
listed above. RMAN cannot back up those files. You must use some non-RMAN
backup solution for any files not in the preceding list.
The target database must be mounted or open when using the RMAN BACKUP
command.
RMAN can make an inconsistent backup when the database is in ARCHIVELOG
mode, but you must apply redo logs after restoring such a backup, to make the
database consistent.
You must use a current control file when using the BACKUP command.
If no automatic channel is configured for the specified device type, then you must
manually allocate a channel for each execution of the BACKUP command. If no
manual channel is allocated, then RMAN uses the default channels (as set using
the CONFIGURE command). RMAN comes with a DISK channel preconfigured
but no preconfigured channels for sbt devices.
Backups that use the disk test API are not supported for
production backups. Instead, use the preconfigured DISK channel
or manually allocate a DISK channel.
Note:
BACKUP
using BACKUP ... DEVICE TYPE DISK to back your database up to a writeable CD
or DVD, or some other device which has a larger physical block size.
You must back up files onto valid media. If you specify DEVICE TYPE DISK, then
RMAN will back up to random access disks. You can make a backup on any
device that can store a datafile: in other words, if the statement CREATE
TABLESPACE tablespace_name DATAFILE 'filename' works, then
'filename' is a valid backup path name. If you specify DEVICE TYPE sbt, then
you can back up to any media supported by the media manager.
You can only backup a database running in NOARCHIVELOG mode after a
consistent shutdown. You cannot make a backup (either normal or incremental) in
NOARCHIVELOG mode when the database is open or is closed after an instance
failure or SHUTDOWN ABORT.
You cannot stripe a single input file across multiple backup sets.
Archived redo log files and datafiles are never combined into a single backup set.
SET ENCRYPTION ON is in effect at the time that the archive log backup is
being created.
Encryption is configured for backups of the whole database or at least one
tablespace.
BACKUP
Do not open a NOARCHIVELOG mode database while it is being backed up. If you
do, and some data blocks in the files being backed up are modified before being
read by the backup session, then the backup is not usable after being restored
because it requires recovery.
The maximum length of a backup piece filename is platform-specific. For SBT
backups using a media manager, the length is also limited by the limit in the
supported version of the media management API. Vendors supporting SBT 1.1
must support filenames up to 14 characters. Some SBT1.1 vendors may support
longer filenames. Vendors supporting SBT 2.0 must support filenames up to 512
characters. Some SBT2.0 vendors may support longer filenames.
You cannot use the DEVICE TYPE option for a device other than DISK if you have
not already run CONFIGURE DEVICE TYPE for this device.
You cannot allocate channels and run BACKUP with the DEVICE TYPE option.
You cannot specify DEVICE TYPE DISK when running the BACKUP RECOVERY
AREA command.
You cannot back up the change tracking file with RMAN.
Description
backupOperand
backupSpec
PLUS ARCHIVELOG
backupSpecOperand
1.
2.
3.
4.
5.
backupOperand
Syntax Element
Description
backupOperand
BACKUP
Syntax Element
Description
backupTypeSpec
Specifies the type of backup being created, either backup sets or image copies.
See "backupTypeSpec" on page 2-41 for details.
CHANNEL channel_id
CHECK LOGICAL
Tests data and index blocks that pass physical corruption checks for logical
corruption, for example, corruption of a row piece or index entry. If RMAN
finds logical corruption, then it logs the block in the alert.log and server
session trace file.
If the sum of physical and logical corruptions detected for a file is no more
than its MAXCORRUPT setting, then the backup command completes, and
V$DATABASE_BLOCK_CORRUPTION is populated with any corrupt block
ranges. If there are more thanMAXCORRUPT corrupt blocks, then the command
terminates without updating the view and no output file is created for the
backup.
If the initialization parameter DB_BLOCK_CHECKSUM=TRUE, and if
MAXCORRUPT and NOCHECKSUM are not set, then specifying CHECK LOGICAL
detects all types of corruption that are possible to detect.
Note: The MAXCORRUPT setting specifies the total number of physical and
logical corruptions permitted on a file.
COPIES = integer
Sets the number of identical backups (1 - 4) that RMAN should create. The
default value is 1. You can specify duplexing on more than one command. The
order of precedence is as follows, with settings higher on the list overriding
lower settings:
1.
BACKUP COPIES
2.
3.
Note: This option does not apply with AS COPY and results in an error
message.
Note: Duplexing cannot be used when creating files in the flash recovery area.
CUMULATIVE
Copies the data blocks used since the most recent backup at level 0 or lower,
where n is 1. For example, in a cumulative level 1 backup RMAN backs up all
blocks used since the most recent level 0 backup.
Note: This option does not apply with AS COPY and results in an error
message.
Allocates automatic channels for the specified device type only. This option is
valid only if you have configured channels and have not manually allocated
channels. For example, if you configure disk and tape channels, then configure
sbt as the default device type, this command allocates disk channels only:
BACKUP DEVICE TYPE DISK DATABASE;
BACKUP
Syntax Element
Description
Directs RMAN to populate each backup set with datafiles from at least integer
disks. This parameter is only enabled when you are backing up datafiles or
control files, and when the operating system can give RMAN disk contention
and node affinity information. To manually disable this feature, set
DISKRATIO = 0.
For example, assume that datafiles are distributed across 10 disks. If the disks
supply data at 10 bytes/second, and if the tape drive requires 50 bytes/second
to keep streaming, then set DISKRATIO = 5 to direct RMAN to include
datafiles from at least 5 disks in each backup set.
If you set FILESPERSET but not DISKRATIO, then DISKRATIO defaults to
the same value as FILESPERSET. If you specify neither parameter, then
DISKRATIO defaults to 4. RMAN compares the DISKRATIO value to the
actual number of devices involved in the backup and uses the lowest value.
For example, if DISKRATIO is 4 and the datafiles are located on three disks,
then RMAN attempts to include datafiles from three disks in each backup set.
The DISKRATIO parameter is easier for datafile backups when the datafiles
are striped or reside on separate disk spindles and you either:
Note: Do not spread I/O over more than the minimum number of disks
required to keep the tape streaming. Otherwise, you increase restore time for a
file without increasing performance.
duration
Specifies options related to the maximum time for a backup command to run.
See Also: "duration" on page 2-43
filenameConversionSpec
This option is valid only when BACKUP is creating image copies. Files being
copied are renamed according to the specified patterns. If a file being backed
up has a name that does not match any of the specified rename patterns, then
RMAN uses FORMAT to name the output image copies. If no FORMAT was
specified, then RMAN uses the default format %U.
See "fileNameConversionSpec" on page 2-114 for details about file renaming
patterns.
When used with commands that create backupsets, specifies the maximum
number of files to include in each backupset created.
By default, RMAN divides files among backupsets in order to make optimal
use of channel resources. The number of files to be backed up is divided by
the number of channels. If the result is less than 64, then it is the number of
files placed in each backupset. Otherwise, 64 files will be placed in each
backupset.
FORCE
FORMAT = formatSpec
Specifies a pattern to use in creating a filename for the backup pieces or image
copies created by this command. For AS COPY, if one or more of the directories
mentioned in the specified format do not exist, then RMAN signals an error.
See Also: "formatSpec" on page 2-122 for legal substitution variables
forRecoveryOfSpec
BACKUP
Syntax Element
Description
FULL
Creates a backup of all blocks of datafiles included in the backup. FULL is the
opposite of INCREMENTAL.
RMAN makes full backups by default if neither FULL nor INCREMENTAL is
specified.
A full backup has no effect on subsequent incremental backups, and is not
considered a part of any incremental backup strategy (though a full image
copy backup can be incrementally updated by applying incremental backups
with the RECOVER command).
Note:Backup Unused Space Compression, described in "Unused Block
Compression Of Datafile Backups to Backup Sets" on page 2-28, causes some
datafile blocks to be skipped during full backups of datafiles as backup sets.
Copies only those data blocks that have changed since the last incremental
integer backup, where integer is 0 or 1. An incremental backup at level 0
backs up all data blocks in datafiles being backed up. An incremental backup
at level 1 backs up only changed blocks. An incremental backup can be either
differential or cumulative.In a cumulative level 1 incremental backup, RMAN
backs up all blocks changed since the most recent level 0 backup. In a
differential level 1 incremental backup, RMAN backs up blocks updated since
the last level 0 or level 1 incremental backup.
Incremental backups at level 0 can be either backup sets or image copies.
Incremental backups at level 1 can only be backup sets.
A level 0 backup must exist as the base backup for an incremental strategy. An
incremental backup at level 0 is identical in content to a full backup, but
unlike a full backup the level 0 backup is considered a part of the incremental
strategy. If no level 0 backup exists when you run a level 1 backup, then
RMAN makes a level 0 backup automatically.
The database performs checks when attempting to create a level 1 incremental
backup, to ensure that the incremental backup is usable by a subsequent
RECOVER command. Among the checks performed are:
A level 0 backup must exist for each datafile in the BACKUP command.
These backups must not have status UNAVAILABLE. If no level 0 backup
exists, then RMAN makes one.
Sufficient incremental backups taken since the level 0 must exist and be
available such that the incremental backup to be created is usable.
If you specify INCREMENTAL, then in the backupSpec clause you must set
one of the following parameters: DATAFILE, DATAFILECOPY, TABLESPACE,
or DATABASE. RMAN does not support incremental backups of control files,
archived redo logs, or backup sets.
Note: You cannot make inconsistent incremental backups when the database
is in NOARCHIVELOG mode. Hence, you cannot generate incremental backups
when a NOARCHIVELOG database is open and in use.
Note: When creating an incremental backup, RMAN considers backups from
parent incarnations as valid. For example, assume you make a level 0 backup
and then OPEN RESETLOGS. If you make a level 1 incremental backup, then
RMAN backs up all blocks changed since the pre-RESETLOGS level 0 backup.
See Also: "CHANGE" on page 2-54
BACKUP
Syntax Element
Description
keepOption
The default location of the incremental is the dbs subdirectory under the
Oracle home.
The incremental backup created by BACKUP INCREMENTAL FROM SCN is
not part of any incremental strategy at the primary database. It can only
be used to refresh a standby with the changes at the primary. In the
RMAN repository, this backup is not marked with an incremental level
when it is recorded in the RMAN repository. The algorithms that control
which backups RMAN selects for use in a restore and recovery do not
select incremental backups created using FROM SCN.
Overrides any configured retention policy for this backup so that the backup
is not considered obsolete. You can use CHANGE to alter the keep status.
Note that you must be connected to a recovery catalog when you specify
KEEP FOREVER.
See Also: "keepOption" on page 2-126
MAXSETSIZE =
integer [ K | M | G ]
Specifies a maximum size for a backup set.RMAN limits all backup sets to this
size. Use MAXSETSIZE to configure backup sets so that each fits on one tape
rather than spanning multiple tapes. Otherwise, if one tape of a multivolume
backup set fails, then you lose the data on all the tapes rather than just one.
Specify size in bytes (default), kilobytes (K), megabytes (M), or gigabytes (G).
Thus, to limit a backup set to 3 MB, specify MAXSETSIZE = 3M. The default
size is in bytes, rounded down from kilobytes. For example, MAXSETSIZE =
3000 is rounded down to 2 KB (2048 bytes). The minimum value must be
greater than or equal to the database block size.
The default number of files in each backup set is 4 for datafiles and 16 for
archived logs. When you specify MAsXSETSIZE, RMAN attempts to limit the
size in bytes of the backup sets according to the MAXSETSIZE parameter. The
limit on the number of files in a backup set will apply even if the total size of
the resulting backup set is less than MAXSETSIZEs.
Note: This option cannot be used with BACKUP AS COPY and results in an
error message. If you run BACKUP AS COPY on a channel that has
MAXSETSIZE set, then MAXSETSIZE is silently ignored.
NOCHECKSUM
BACKUP
Syntax Element
Description
notBackedUpSpec
NOEXCLUDE
POOL = integer
Specifies the media pool in which the backup should be stored. Consult your
media management documentation to see whether the POOL option is
supported.
Note: This option does not apply with AS COPY and results in an error
message.
PROXY
Backs up the specified files by means of the proxy copy functionality, which
gives the media management software control over the data transfer between
storage devices and the datafiles on disk. The media managernot
RMANdecides how and when to move data.
When you run BACKUP with the PROXY option, RMAN performs these steps:
1.
2.
If you do not want RMAN to try a conventional copy when a proxy copy fails,
use the ONLY option.
Note: If you specify PROXY, then the %p variable must be included in the
FORMAT string either explicitly or implicitly within %U.
Note: This option cannot be used with BACKUP AS COPY and results in an
error message.
ONLY
Causes the database to issue an error message when it cannot proxy copy
rather than creating conventional backup sets.
REUSE
skipSpec
Excludes datafiles or archived redo logs from the backup if they are
inaccessible, offline or read-only. See "skipSpec" on page 2-44 for details.
BACKUP
Syntax Element
Description
TAG tag_name
Creates a user-specified tag name for a backup. The tag is not case sensitive.
If you do not specify a tag name, then by default RMAN creates a tag for
backups (except for control file autobackups) in the format
TAGYYYYMMDDTHHMMSS, where YYYY is the year, MM is the month, DD is the
day, HH is the hour (in 24-hour format), MM is the minutes, and SS is the
seconds. For example, a backup of datafile 1 can receive the tag
TAG20020208T133437. The date and time refer to when RMAN started the
backup. If multiple backup sets are created by one BACKUP AS BACKUPSET
command, then each backup piece is assigned the same default tag.
A tag applies to each backup piece in a given copy of a backup set (for AS
BACKUPSET) or each image copy (for AS COPY). For example, if you run
BACKUP AS BACKUPSET COPIES 1 DATABASE TAG TUE_PM, then only one
copy of the backup set exists and each piece in the backup set has tag TUE_PM.
Assume that this backup set has primary key 1234. If you then run BACKUP
BACKUPSET 1234 TAG WED_PM, then the first copy of the backup set has tag
TUE_PM and the second copy of the backup set has tag WED_PM.
Typically, a tag is a meaningful name such as MONDAY_EVENING_BACKUP or
WEEKLY_FULL_BACKUP. Tags are reusable, so that backup set 100 can have
the tag MONDAY_EVENING_BACKUP one week while backup set 105 has the
same tag the next week.
Tags must be 30 characters or less. The characters used in a tag must be
limited to the characters that are legal in filenames on the target filesystem.
For example, ASM does not support the use of the - character in the filenames
it uses interally, so a tag including a - (for example, weekly-incremental)
is not a legal tag name if you are storing backups in ASM disk groups.
You can also specify the tag at the backupSpec level. If you specify the tag at:
VALIDATE
The command level, then all backup sets created by the command have
the tag.
The backupSpec level, then backup sets created as a result of different
backup specifications can have different tags.
Both levels, then the tag in the backupSpec takes precedence.
Causes RMAN to scan the specified files and verify their contents, testing
whether this file can be backed up. RMAN creates no output files. Use this
command periodically to check for physical and logical errors in database
files.
Note: You cannot validate backups of backup sets.
backupSpec
Syntax Element
Description
backupSpec
BACKUP
Syntax Element
Description
archivelogRecordSpecifier
Specifies a range of archived redo logs to be backed up. RMAN does not
signal an error if the command finds no logs to back up, because this situation
probably exists because no new logs were generated after the previous
BACKUP ARCHIVELOG ALL DELETE INPUT command.
If you specify BACKUP ARCHIVELOG ALL, then RMAN backs up exactly one
copy of each distinct log sequence number. For example, if you archive to
multiple destinations, RMAN backs up one copy of each log sequence
numbernot each copy of each log sequence number. For other commands,
such as DELETE, ALL does refer to every log, even duplicate log sequences.
If the database is open when you run BACKUP ARCHIVELOG, and if the UNTIL
clause or SEQUENCE parameter is not specified, then RMAN runs ALTER
SYSTEM ARCHIVE LOG CURRENT.
Note: If you run BACKUP ARCHIVELOG ALL, or if the specified log range
includes logs from prior incarnations, then RMAN backs up logs from prior
incarnations to ensure availability of all logs that may be required for recovery
through an OPEN RESETLOGS.
See Also: "archivelogRecordSpecifier" on page 2-18 for syntax, and Oracle
Database Backup and Recovery Advanced User's Guide explanations of backup
failover for logs and automatic log switching
BACKUPSET {
ALL
| completedTimeSpec
|
primaryKey
[, primaryKey
]
}
CONTROLFILECOPY {
'filename'
| ALL
| LIKE
'string_pattern' }
A copy of a normal control file (that is, not a standby control file) created
with the BACKUP AS COPY CURRENT CONTROLFILE command or the SQL
statement ALTER DATABASE BACKUP CONTROLFILE TO '...'
A standby control file copy created with the BACKUP AS COPY STANDBY
CONTROLFILE command or the SQL statement ALTER DATABASE
CREATE STANDBY CONTROLFILE
RMAN inspects the header of the control file copy to determine whether it is a
standby or nonstandby control file.
copyOfSpec
BACKUP
Syntax Element
Description
CURRENT CONTROLFILE
[FOR STANDBY]
DATABASE
Creates a backup set (AS BACKUPSET) or group of image copies (AS COPY) for
all datafiles in the database. If generating a backup set, then RMAN can
include only datafiles and control files: it cannot include archived redo logs.
If the backupSpec includes datafile 1, and if CONFIGURE CONTROLFILE
AUTOBACKUP is OFF, then RMAN automatically includes the control file in the
backup. If the instance is started with a server parameter file, then RMAN also
includes this parameter file in the backup.
If the backupSpec includes datafile 1, and if CONTROLFILE AUTOBACKUP is
ON, then RMAN does not automatically include the control file in the output.
Instead, RMAN generates a separate control file autobackup piece. If the
instance is started with a server parameter file, then RMAN includes this
parameter file in the autobackup piece.
Note: To force RMAN to include the current control file in the backup when
CONTROLFILE AUTOBACKUP is ON, specify the INCLUDE CURRENT
CONTROLFILE clause.
datafileCopySpec
DATAFILE datafileSpec
RECOVERY AREA
| DB_RECOVERY_FILE_DEST
Backs up recovery files created in the current and all previous flash recovery
area destinations. Recovery files are full and incremental backup sets, control
file autobackups, archived logs, and datafile copies. Flashback logs, the
current control file, and online redo logs are not backed up.
RECOVERY AREA and DB_RECOVERY_FILE_DEST are synonyms.
Backup optimization is always ON for this option. The backup must go to sbt,
so RMAN issues an error if no sbt channels are allocated or configured.
Note: If the flash recovery area is not enabled but has been enabled in the past,
then files that were created in the previous flash recovery area location are
backed up.
RECOVERY FILES
Backs up all recovery files on disk, whether they are stored in the flash
recovery area or another locations on disk. Recovery files include full and
incremental backup sets, control file autobackups, archived logs, and datafile
copies. Backup optimization is always ON for this option. The backup must go
to sbt, so RMAN issues an error if no sbt channels are allocated or
configured.
SPFILE
Backs up the server parameter file currently used by the database. RMAN
cannot back up other copies of the server parameter file, and cannot back up
the server parameter file when the instance was started with an initialization
parameter file. RMAN cannot make incremental backups of the SPFILE.
TABLESPACE
tablespace_name
[, tablespace_name]
Specifies the names of one or more tablespaces. RMAN backs up all datafiles
that are currently part of the tablespaces. If the SYSTEM tablespace (and thus
datafile 1) is included in the backup, and if CONTROLFILE AUTOBACKUP is
not configured, then RMAN creates a copy of the control file.
The TABLESPACE keyword is merely a convenience; tablespace names are
translated internally into a list of datafiles. If you rename a tablespace (for
example, from users to customers), then RMAN detects that the tablespace
has changed its name and updates the recovery catalog on the next
resynchronization.
BACKUP
Syntax Element
Description
backupSpecOperand
backupSpecOperand
Syntax Element
Description
backupSpecOperand
Deletes the input files upon successful creation of the backup. Specify this
option only when backing up archived logs, datafile copies (COPY OF or
DATAFILECOPY), or backup sets. It is equivalent to issuing DELETE for the
input files.
The ALL option applies only to archived logs. If you run DELETE ALL INPUT,
then the command deletes all copies of corresponding archived redo logs or
datafile copies that match the selection criteria. For example, if you specify the
SEQUENCE n clause, then RMAN deletes all archive logs with same sequence
number n, including duplicate archived logs (that is, logs with same log
sequence number and thread).
Note: The BACKUP ARCHIVELOG command only backs up one copy of each
distinct log sequence number, so if the DELETE INPUT option is used without
the ALL keyword, RMAN only deletes the copy of the file that it backs up.
See Also: "CONNECT" on page 2-75 for information on the effect of recovery
catalog compatibility on this command
INCLUDE CURRENT
CONTROLFILE
[FOR STANDBY]
Creates a snapshot of the current control file and places it into each backup set
produced by this clause.
If you specify FOR STANDBY, then RMAN creates a backup of the control file
usable for creation of a standby database. The backup set includes the standby
control file and the object backed up.
Note: This option does not apply with AS COPY and results in an error
message.
BACKUP
backupTypeSpec
Syntax Element
Description
AS [ COMPRESSED ]
BACKUPSET
Creates backup sets (rather than image copies) on the specified device type.
AS BACKUPSET is the only possibility when backing up to tape, and for
creating level 1 incremental backups to any destination.
When backing up datafiles into backup sets, RMAN only backs up blocks that
are currently in use.
With the COMPRESSED option, binary compression is used. The data written
into the backup set is compressed to reduce the overall size of the backup set.
All backups that create backup sets can create compressed backup sets.
Restoring compressed backup sets is no different from restoring
uncompressed backup sets.
Note:
AS COPY
Creates image copies (rather than backup sets). Can only be used with
backups created on disk.
Note:
When using BACKUP AS COPY, if you do not specify the destination for the
image copies, RMAN will choose a location according to the following rules:
BACKUP
copyOfSpec
Syntax Element
Description
COPY OF DATABASE
Makes a backup of previous image copies of all datafiles and control files in
the database. All datafiles that would normally be included by BACKUP
DATABASE are expected to have copies: if not, then RMAN signals an error. It
is not necessary for all copies to have been produced by a single BACKUP
command. If multiple copies exist of datafile, then RMAN backs up the latest.
Optionally, specify the copies by tag name (for example, FULL_COLD_COPY).
Note: The output of this command can be image copies or backup sets.
COPY OF TABLESPACE
tablespace_name
Makes a backup of a previous image copy of one or more datafiles. Specify the
datafile by file number (DATAFILE 3) or filename (DATAFILE
'?/oradata/trgt/users01.dbf'). You specify the datafile filename and
not the filename of the copy of the datafile. If more than one copy exists of a
given datafile, then RMAN backs up the most recent copy.
Note: It is not necessary for the image copies that you are backing up to have
been created by a single BACKUP command.
Note: The output of this command can be image copies or backup sets.
See Also: "datafileSpec" on page 2-95
datafileCopySpec
Syntax Element
Description
Specifies the filenames of one or more datafile image copies. You can use the
DATAFILECOPY {
filename [,filename...] following parameters:
|{ ALL
NODUPLICATES
BACKUP
duration
Syntax Element
Description
DURATION hh:mm
[PARTIAL]
[MINIMIZE
(TIME|LOAD)]
forRecoveryOfSpec
Syntax Element
Description
Lets you identify any tagged level 0 incremental to serve as the basis for this
level 1 incremental. Useful in strategies other than the incrementally updated
backups strategy, which uses the FOR RECOVER OF COPY clause.
Lets you specify that this incremental should contain all changes since the
SCN of a specified datafile copy (level 0 incremental backup) of your
database. The datafile copies should be identified with either a DATAFILE
COPY or WITH TAG clause, to keep the incremental backup strategy for which
this backup will be used separate from the rest of your backup strategies.
Otherwise, the most recent copy of each datafile will be used as the basis for
the incremental.
Used with FOR RECOVER OF COPY, specifies a tag to identify the level 0
incremental backup to serve as the basis of the incremental. If no level 0 with
the tag specified in WITH TAG option is found, then FOR RECOVER OF COPY
option will create a level 0 datafile copy tagged with the value specified in the
WITH TAG option. BACKUP... FOR RECOVER OF COPY WITH TAG... is
key to backup strategies based on incrementally updated backups, as
described in Oracle Database Backup and Recovery Basics and used in some
Enterprise Manager backup strategies.
Used with FOR RECOVER OF COPY, identifies the datafile copies to use as
the basis for this incremental.
notBackedUpSpec
Syntax Element
Description
NOT BACKED UP
Backs up only those files (of the files specified on the command) that RMAN
has never backed up. This option is a convenient way to back up new files
after adding them to the database.
BACKUP
Syntax Element
Description
Specifies the date after which RMAN should back up files that have no
backups. The date_string is either a date in the current
NLS_DATE_FORMAT, or a SQL date expression such as 'SYSDATE-1'. When
calculating the number of backups for a file, RMAN only considers backups
created on the same device type as the current backup.
This option is a convenient way to back up files that were not backed up
during a previous failed backup. For example, you back up the database, but
the instance fails halfway through. You can restart the backup with the NOT
BACKED UP SINCE TIME clause and avoid backing up those files that you
already backed up. If AS BACKUPSET is set, then this feature is only useful if
RMAN generates multiple backup sets during the backup.
When determining whether a file has been backed up, the SINCE date is
compared with the completion time of the most recent backup. For BACKUP
AS BACKUPSET, the completion time for a file in a backup set is the
completion time of the entire backup set. In other words, all files in the same
backup set have the same completion time.
Backs up only those archived logs that have not been backed up at least
integer times. To determine the number of backups for a file, RMAN only
considers backups created on the same device type as the current backup.
integer TIMES
sizeSpec
Syntax Element
Description
integer [K|M|G]
Specifies the size of data, such as a file, in kilobytes (K), megabytes (M) or
gigabytes (G).
skipSpec
Syntax Element
Description
SKIP
Excludes datafiles or archived redo logs from the backup according to the
criteria specified by the following keywords.
Note: You can also specify this option in the backupSpec clause.
INACCESSIBLE
Specifies that datafiles or archived redo logs that cannot be read due to I/O
errors should be excluded from the backup.
A datafile is only considered inaccessible if it cannot be read. Some offline
datafiles can still be read because they still exist on disk. Others have been
deleted or moved and so cannot be read, making them inaccessible.
OFFLINE
READONLY
Examples
This example assumes that CONFIGURE
CONTROLFILE AUTOBACKUP is OFF. The command backs up all datafiles to tape, as
well as the current control file, the server parameter file, and archived logs:
BACKUP
Scripting Incremental Backups: Example This example shows a series of scripts that
you can run to make regular incremental backups of the database:
# Run once a week to back up database to disk as level 0:
BACKUP INCREMENTAL LEVEL 0 DATABASE;
# Run every day to back up blocks that have changed since most recent level 0 or 1:
BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
BACKUP INCREMENTAL LEVEL 1 DIFFERENTIAL TABLESPACE users;
command uses two backupSpec clauses to back up tablespaces and datafiles and lets
RMAN perform automatic parallelization of the backup:
RUN
{
ALLOCATE CHANNEL dev1 DEVICE TYPE DISK FORMAT '/disk1/%U';
ALLOCATE CHANNEL dev2 DEVICE TYPE DISK FORMAT '/disk2/%U';
BACKUP AS BACKUPSET
(TABLESPACE SYSTEM, tools, users, undotbs MAXSETSIZE 5M)
(DATAFILE 2,4,5);
}
command uses two backupSpec clauses to back up tablespaces and datafiles and lets
RMAN perform automatic parallelization of the backup:
RUN
{
ALLOCATE CHANNEL dev1 DEVICE TYPE DISK FORMAT '/disk1/%U';
ALLOCATE CHANNEL dev2 DEVICE TYPE DISK FORMAT '/disk2/%U';
BACKUP AS COPY
(TABLESPACE SYSTEM, tools, users, undotbs)
(DATAFILE 2,4,5);
}
Backing Up Datafile Copies: Example This example finds three datafile copies with
the tag LATESTCOPY, copies them to directory /copies and names the new copies by
means of subsitution variables:
BACKUP AS COPY
FROM TAG 'LATESTCOPY'
COPY OF DATAFILE 4, 6, 14
FORMAT '/copies/Datafile%f_Database%d';
Backing Up Backup Sets to Tape: Example In this example, the goal is to keep recent
backup sets on disk and older backup sets on tape, and to avoid keeping copies of the
same backup set on disk and tape simultaneously. This command backs up backup
sets created more than two weeks ago to tape and then deletes the backed-up backup
pieces from disk:
BACKUP DEVICE TYPE sbt BACKUPSET COMPLETED BEFORE 'SYSDATE-14'
BACKUP
DELETE INPUT;
This example
configures DISK as the default device type, then backs up the server parameter file
and all archived logs to tape:
Specifying DEVICE TYPE on the BACKUP Command: Example
# when disk is the default device and you do not specify a FORMAT parameter, then the
# default backup location is the flash recovery area (if configured) or
# a platform-specific default location (if not configured)
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
BACKUP DEVICE TYPE sbt SPFILE ARCHIVELOG ALL;
Creating a Control File for a Standby Database: Example This example creates a
backup of the current control file that can be used to create a standby database:
BACKUP CURRENT CONTROLFILE FOR STANDBY;
datafile 3 and specifies that no more than two blocks with corruption should be
tolerated:
RUN
{
SET MAXCORRUPT FOR DATAFILE 3 TO 2;
BACKUP CHECK LOGICAL
DATAFILE 3;
}
BACKUP
Making an Image Copy of a Database Copy: Example This example makes an image
copy of the database copy with tag TEST to the default destination, gives the output
copy the tag DUPTEST, and performs logical checking:
BACKUP AS COPY COPY OF DATABASE FROM TAG 'TEST' CHECK LOGICAL TAG 'DUPTEST';
backup of the database and server parameter file that is exempt from the retention
policy. The command instructs RMAN to keep the backup for the next year, but not to
keep the archived logs necessary to recover it:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP DATABASE
KEEP UNTIL TIME 'SYSDATE+365'
NOLOGS;
ALTER DATABASE OPEN;
Exempting Copies from the Retention Policy: Example The following example
copies the control file and two datafiles and exempts them from the retention policy
forever. (Note that KEEP FOREVER requires a recovery catalog.)
rman TARGET / CATALOG rman/rman@rcat
RMAN> SHUTDOWN IMMEDIATE;
RMAN> STARTUP MOUNT;
RMAN> BACKUP AS COPY
KEEP FOREVER NOLOGS
CURRENT CONTROLFILE FORMAT '?/oradata/cf_longterm.cpy',
DATAFILE 1 FORMAT '?/oradata/df1_longterm.cpy',
DATAFILE 2 FORMAT '?/oradata/df2_longterm.cpy';
ALTER DATABASE OPEN;
BACKUP DEVICE TYPE sbt DATABASE NOT BACKED UP SINCE TIME 'SYSDATE-31';
BACKUP DEVICE TYPE sbt ARCHIVELOG ALL NOT BACKED UP 2 TIMES;
AS
AS
AS
AS
AS
BLOCKRECOVER
BLOCKRECOVER
Syntax
blockrecover::=
,
=
DEVICE TYPE
deviceSpecifier
BLOCKRECOVER
bmrOption
bmrBlockSpec
bmrBlockSpec::=
CORRUPTION LIST
,
DATAFILE
datafileSpec
BLOCK
integer
,
TABLESPACE
tablespace_name
DBA
integer
bmrOption::=
FROM
BACKUPSET
DATAFILECOPY
=
FROM TAG
RESTORE
tag_name
untilClause
Purpose
Block media recovery recovers an individual data block or set of data blocks within a
datafile. This type of recovery is useful if the data loss or corruption applies to a small
number of blocks rather than to an entire datafile.
Typically, block corruption is reported in error messages in trace files. Block-level data
loss usually results from:
You can either use BLOCKRECOVER CORRUPTION LIST to recover all blocks reported
in the V$DATABASE_BLOCK_CORRUPTION view, or specify the datafile number and
block number or the tablespace and data block address (DBA) when executing the
BLOCKRECOVER command.
The target database must be mounted or open. You do not have to take a datafile
offline if you are performing block media recovery on it.
You can only perform complete media recovery of individual blocks. Point-in-time
recovery of individual data blocks is not supported.
Blocks marked media corrupt are not accessible until recovery completes.
You cannot perform block media recovery when using a backup control file.
BLOCKRECOVER
You cannot use proxy backups to perform block media recovery. If the only
backups that you have are proxy backups, then you can restore them to a
nondefault location on disk, which causes RMAN to view the restored files as
datafile copies. You can then use the datafile copies for block media recovery.
You must have a full backup of the file containing the corrupt blocks: block media
recovery cannot use incremental backups.
If RMAN fails to access a specific archived redo log file needed for block media
recovery, it performs restore failover, trying all other backups listed in the RMAN
repository that are suitable for use in this operation, and only fails if no suitable
backup is available. See Oracle Database Backup and Recovery Advanced User's Guide
for details on restore failover.
Block media recovery cannot survive a missing or inaccessible archived log,
although it can sometimes survive missing or inaccessible records (Oracle Database
Backup and Recovery Advanced User's Guide).
Description
Specifies the device type for the backup used in the block recovery.
See Also: "deviceSpecifier" on page 2-101
bmrBlockSpec
Syntax Element
Description
bmrBlockSpec
CORRUPTION LIST
DATAFILE datafileSpec
Specifies a list of one or more datafiles that contain blocks requiring recovery.
See Also: "datafileSpec" on page 2-95
BLOCK integer
Specifies the block number of the block requiring media recovery. Typically,
the block number is obtained from error message output.
BLOCKRECOVER
Syntax Element
Description
TABLESPACE
tablespace_name
DBA integer
bmrOption
Syntax Element
Description
bmrOption
FROM BACKUPSET
FROM DATAFILECOPY
FROM TAG=
'tag_name'
Indicates that only the copy of the backup with the specified tag should be
restored. Tag names are not case sensitive.
See Also: "BACKUP" on page 2-22 to learn how a tag is applied to a copy of a
backup.
RESTORE untilClause
Specifies that only backups and copies created before the specified time, SCN,
or log sequence number should be restored.
See Also: "untilClause" on page 2-228
Examples
Recovering a Group of Corrupt Blocks: Example This example recovers corrupt
blocks in three datafiles:
BLOCKRECOVER DATAFILE 2 BLOCK 12, 13 DATAFILE 3 BLOCK 5, 98, 99 DATAFILE 4 BLOCK 19;
Limiting Block Media Recovery by Type of Restore: Example The following example
BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 RESTORE UNTIL TIME 'SYSDATE-2';
Repairing All Block Corruption in the Database: Example The following example
runs a backup validation to populate V$DATABASE_BLOCK_CORRUPTION, then
repairs any corrupt blocks recorded in the view:
BACKUP VALIDATE DATABASE;
BLOCKRECOVER CORRUPTION LIST;
CATALOG
CATALOG
Syntax
catalog::=
ARCHIVELOG
BACKUPPIECE
filename
CONTROLFILECOPY
=
LEVEL
CATALOG
,
DATAFILECOPY
filename
integer
TAG
tag_name
RECOVERY AREA
NOPROMPT
DB_RECOVERY_FILE_DEST
START WITH
string_pattern
Purpose
Use the CATALOG command to do the following:
Add backup pieces and image copies on disk to the RMAN repository.
Record a datafile copy as a level 0 incremental backup in the RMAN repository,
which enables you to use it as part of an incremental backup strategy.
Record the existence of the last user-managed datafile copies made after the final
shutdown in Oracle7, before migrating the database to Oracle8.
See Also: Oracle Database Backup and Recovery Basics to learn how
to manage target database records stored in the catalog
You must be connected to the target database, which must be mounted or open.
If RMAN is connected to a recovery catalog, then the catalog database must be
open.
For a user-managed copy to be cataloged, it must be:
Accessible on disk.
RMAN treats all user-managed backups as image copies. Note that during
cataloging, RMAN does not check whether the file was correctly copied by the
operating system utility: it just checks the header.
You cannot catalog any datafile copies that were created in Oracle7 unless they
were made after the final consistent shutdown in Oracle7 and before running the
migration utility, or were made of a tablespace that was offline normal or
read-only at the time of the migration. In other words, it must be possible to use
the Oracle7 datafile copies without applying any archived logs.
You cannot use CATALOG to catalog a file that belongs to a different database.
You cannot use CATALOG to catalog a backup piece that exists on an sbt device.
CATALOG
Description
ARCHIVELOG 'filename'
BACKUPPIECE
Specifies the name of a backup piece to be added to the RMAN repository. The
backup piece must be on disk. RMAN verifies the backup piece header before
cataloging it. RMAN can catalog a backup piece from a prior incarnation.
Typically, you would catalog a backup piece in the following situations:
You have copied a backup piece with an operating system utility. In this
case, the original backup piece is cataloged but the piece copy is not.
You want to move a backup piece from one disk to another under a
different absolute filename.
You run in NOCATALOG mode and must re-create the control file, thereby
losing all RMAN repository data. Cataloging your backups makes them
avaialble again.
If you specify a list of backup pieces, RMAN attempts to catalog all pieces in
the given list even if some of them fail. Cataloging a backup piece creates a
new row in V$BACKUP_PIECE. A backup set is only usable when all backup
pieces are cataloged. Otherwise it would be in partially available state.
Note: When cataloging backup pieces from releases prior to Oracle9i,
performance improves when you catalog higher copy numbers first. For
example, if you need to catalog copies 1, 2, and 3 of a backup piece, then
specify copy 3 as the first item in the CATALOG list.
CONTROLFILECOPY
'filename'
A copy of a normal control file (that is, not a standby control file) created
with the RMAN command BACKUP AS COPY CURRENT CONTROLFILE
command or the SQL statement ALTER DATABASE BACKUP
CONTROLFILE
A standby control file copy created with the RMAN command BACKUP
AS COPY STANDBY CONTROLFILE or the SQL statement ALTER
DATABASE CREATE STANDBY CONTROLFILE
DATAFILECOPY 'filename'
LEVEL = 0
For datafile copies only, indicates that the copy should be recorded as a level 0
incremental backup. You can perform incremental backups by using this
datafile copy as the base level 0 backup.
(RECOVERY AREA |
DB_RECOVERY_FILE_DEST)
[ NOPROMPT ]
Catalogs all valid backup sets, datafile copies, and archived redo logs in the
flash recovery area. RMAN must be connected to the target database and the
target database must be mounted or open. Specify NOPROMPT if you do not
want to be prompted after every match. The keywords RECOVERY AREA and
DB_RECOVERY_FILE_DEST are exact synonyms.
START WITH
'string_pattern'
Catalogs all valid backups in locations that match the string pattern, which
can be an Automatic Storage Management disk group, Oracle Managed Files
directory, or part of a filename. RMAN will report any files in the disk location
that cannot be cataloged. RMAN must be connected to the target database and
the target database must be mounted. Specify NOPROMPT if you do not want
to be prompted after every match.
[ NOPROMPT ]
If the string pattern specifies a filename, then it matches the left part of the
filename pattern. For example, /tmp/arc matches everything in directory
/tmp/arc_dest and /tmp/archive/january as well as a file
/tmp/arc.cpy.
Note: You cannot use wildcard characters in the string pattern, only a strict
prefix.
CATALOG
Examples
This example assumes that you made
operating system copies of archived logs or transferred them from another location,
and then added them to the RMAN repository:
Note that you can create datafile copies either using the RMAN BACKUP AS COPY
command, or by using operating system utilities in conjunction with ALTER
TABLESPACE BEGIN/END BACKUP.
Cataloging Multiple Copies in a Directory: Example The following example catalogs
a directory full of archived logs that were copied into the /tmp/arch_logs
directory with an operating system utility:
CATALOG START WITH '/tmp/arch_logs';
Cataloging Backup Pieces: Example The following example catalogs a backup piece
that was copied with an operating system utility:
CATALOG BACKUPPIECE '?/oradata/01dmsbj4_1_1.bcp';
CHANGE
CHANGE
Syntax
change::=
AVAILABLE
CHANGE
keepOption
maintSpec
=
DEVICE TYPE
,
deviceSpecifier
;
UNAVAILABLE
UNCATALOG
maintSpec::=
OF
listObjList
BACKUP
maintQualifier
archivelogRecordSpecifier
OF
listObjList
COPY
=
DEVICE TYPE
,
deviceSpecifier
recordSpec
Purpose
To make the following changes:
To change the status of backups, copies, and archived logs in the repository to
AVAILABLE or UNAVAILABLE. This feature is useful when a previously
unavailable file is made available again, or you do not want a specific backup or
copy to be eligible to be restored but also do not want to delete it.
To alter the repository status of usable backups and copies from prior incarnations.
To remove catalog records for backups and copies, and update the corresponding
records in the target control file to status DELETED. This feature is useful when
you remove a file by using an operating system command rather than the RMAN
CHANGE command, and want to remove its repository record as well.
To specify that a backup or copy should either abide by the currently configured
retention policy or be exempt from it.
See Also: Oracle Database Backup and Recovery Basics to change the
availability status of a backup or copy
You cannot use CHANGE... UNAVAILABLE or KEEP attributes for files stored in
the flash recovery area.
The only CHANGE command that requires either a manual or automatic
maintenance channel is the CHANGE ... AVAILABLE command. However, a
maintenance channel is not required when CHANGE ... AVAILABLE is used with
a file that is disk only (that is, an ARCHIVELOG, DATAFILECOPY, or
CONTROLFILECOPY).
CHANGE
If you use CHANGE ... AVAILABLE on files that are not disk-only, and have
objects created on device types that are not configured for automatic channels,
then issue manual maintenance commands on these channels. For example, if you
created a backup on an sbt channel, but have only a DISK channel automatically
configured, then you must manually allocate an sbt channel before CHANGE ...
AVAILABLE can operate on the backup.
Description
maintSpec
Specifies which files you want to CHANGE. Refer to "maintSpec" on page 2-148
for descriptions of the options in this caluse.
AVAILABLE
keepOption
UNAVAILABLE
UNCATALOG
Removes references to a datafile copy, backup piece, or archived redo log from
the recovery catalog, and updates records in the target control file to status
DELETED. The CHANGE ... UNCATALOG command does not touch physical
backups and copies. Use this command to notify RMAN when a file is deleted
by some means other than a DELETE command.
Caution: If you resynchronize from a backup control file, or upgrade the
recovery catalog, then records previously removed from the RMAN repository
with CHANGE... UNCATALOG may reappear in the recovery catalog.
Executes the CHANGE for the specified device type only (see "deviceSpecifier"
on page 2-101). This option is valid only if you have configured automatic
channels and have not manually allocated channels. For example, if you run
CHANGE UNCATALOG...DEVICE TYPE DISK, then RMAN only uncatalogs
files on disk.
Examples
This example changes the
status of backup set 100 as well as all backups of server parameter files created more
than a day ago to UNAVAILABLE:
CHANGE
Uncataloging and Cataloging Archived Logs: Example In this example, you move
all archived logs to a new directory, uncatalog them, and then recatalog them in the
new location:
HOST 'mv $ORACLE_HOME/oradata/trgt/arch/* /fs2/arch';
CHANGE ARCHIVELOG ALL UNCATALOG;
CATALOG START WITH '/fs2/arch';
cmdLine
cmdLine
Syntax
cmdLine::=
APPEND
CHECKSYNTAX
=
AUXILIARY
connectStringSpec
=
CATALOG
connectStringSpec
=
CMDFILE
filename
=
LOG
MSGNO
NOCATALOG
=
SEND
command
PIPE
pipe_name
=
SCRIPT
script_name
=
TARGET
connectStringSpec
=
TIMEOUT
integer
RMAN
Purpose
To start RMAN from the operating system command line. Use these arguments to:
Note:
cmdLine
Description
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.
AUXILIARY = connectStringSpec
CATALOG = connectStringSpec
Specifies a connect string to the database containing the recovery catalog, for
example, CATALOG rman/rman@inst2.
See Also: "connectStringSpec" on page 2-77
CATALOG = connectStringSpec
Specifies a connect string to the database containing the recovery catalog, for
example, CATALOG rman/rman@inst2.
See Also: "connectStringSpec" on page 2-77
CHECKSYNTAX
Causes RMAN to start in a mode where commands entered are checked for
syntax errors, but no other processing is performed. If used with a CMDFILE
or @ argument, the RMAN client starts, checks all commands in the file, then
exits. If used without specifying a command file, then RMAN prompts the
user for input and parses each command until the user exits the RMAN client.
RMAN reports an RMAN-0558 error for each command that is not
syntactically correct.
CMDFILE = 'filename'
Parses and compiles all RMAN commands in a file and then sequentially
executes each command in the file. RMAN exits if it encounters a syntax error
during the parse phase or if it encounters a runtime error during the execution
phase. If no errors are found, then RMAN exits after the job completes.
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.
Note: If you run a command file at the RMAN prompt rather than as an
option on the operating system command line, then RMAN does not run the
file as a single job. RMAN reads each line sequentially and executes it, only
exiting when it reaches the last line of the script.
@filename
Equivalent to CMDFILE.
cmdLine
Syntax Element
Description
LOG = 'filename'
Specifies the file where RMAN records its 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 RMAN output is
also stored in the V$RMAN_OUTPUT view (a memory-only view for jobs in
progress) and in V$RMAN_STATUS (a control file view for completed jobs and
jobs in progress).
The LOG parameter does not cause RMAN to terminate if the specified file
cannot be opened. Instead, RMAN writes to standard output.
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.
NOCATALOG
SEND = 'command'
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:
All messages on both the input and output pipes are of type VARCHAR2.
See Also: Oracle Database Backup and Recovery Advanced User's Guide to learn
how to pass commands to RMAN through a pipe
SCRIPT = 'script_name'
Once connected to the target database and recovery catalog (which must be
specified using the TARGET and CATALOG options), RMAN will run the
named stored script from the recovery catalog against the target database. If
there are both a global script.and a local stored script on the target database
with the name script_name, RMAN will run the local script.
The single-quotes around the stored script name are required when the script
name either begins with a number or is an RMAN reserved word. You should
avoid creating script names that begin with a number or that match RMAN
reserved words.
See "CREATE SCRIPT" on page 2-91 for more details about stored scripts.
TARGET = connectStringSpec
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: Oracle Database Backup and Recovery Advanced User's Guide to learn
how to pass commands to RMAN through a pipe
Examples
Connecting Without a Recovery Catalog: Example
cmdLine
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'
Syntax Check of a Command File: Example This example checks syntax of the
Specifying a Stored Script: Example This example connects to the target database
prod1 and the recovery catalog database rcat, and then runs the stored script
full_backup:
% rman TARGET SYS/sys_pwd@prod1 CATALOG rman/rman@rcat SCRIPT full_backup
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/oracle@inst1 TIMEOUT = 90
completedTimeSpec
completedTimeSpec
Syntax
completedTimeSpec::=
=
AFTER
date_string
COMPLETED
BEFORE
BETWEEN
date_string
date_string
AND
date_string
Purpose
A subclause that specifies when a backup or copy completed.
'SYSDATE-30'
Description
AFTER 'date_string'
BEFORE 'date_string'
Specifies a time range during which the backup was completed. Note that
BETWEEN 'date1' AND 'date2' is exactly equivalent to AFTER
'date1' BEFORE 'date2'.
Examples
Crosschecking Backups Within a Time Range: Example
completedTimeSpec
Deleting Expired Backups: Example This example deletes expired backup sets of
datafile 1 made in the last two weeks:
DELETE EXPIRED BACKUP OF DATAFILE 1 COMPLETED AFTER 'SYSDATE-14';
CONFIGURE
CONFIGURE
Syntax
configure::=
CLEAR
ARCHIVELOG DELETION POLICY
APPLIED ON STANDBY
TO
NONE
CLEAR
datafileSpec
TO
filename
backupConf
cfauConf
CONFIGURE
deviceConf
;
ALGORITHM CLEAR
ENCRYPTION
FOR
ON
DATABASE
TABLESPACE
ALGORITHM
SNAPSHOT CONTROLFILE NAME
tablespace_name
OFF
CLEAR
quoted_string
CLEAR
TO
filename
backupConf::=
ARCHIVELOG
DATAFILE
=
BACKUP COPIES FOR DEVICE TYPE
deviceSpecifier
CLEAR
TO
integer
CLEAR
BACKUP OPTIMIZATION
OFF
ON
CLEAR
tablespace_name
CLEAR
MAXSETSIZE
TO
sizeSpec
UNLIMITED
CLEAR
NONE
RETENTION POLICY
TO
RECOVERY WINDOW OF
integer
DAYS
=
REDUNDANCY
integer
cfauConf::=
CLEAR
=
CONTROLFILE AUTOBACKUP
deviceSpecifier
CLEAR
TO
formatSpec
OFF
ON
CONFIGURE
deviceConf::=
AUXILIARY
integer
CHANNEL
=
DEVICE TYPE
deviceSpecifier
allocOperandList
CLEAR
CLEAR
TO
deviceSpecifier
CLEAR
=
DEVICE TYPE
COMPRESSED
deviceSpecifier
BACKUP TYPE TO
PARALLELISM
BACKUPSET
COPY
integer
Purpose
To configure persistent settings affecting RMAN backup, restore, duplication, and
maintenance jobs. These configurations are in effect for any RMAN session until the
configuration is cleared or changed.
Use CONFIGURE to set the following:
The maximum size of backup pieces and sets created on automatic channels
The default format for the control file autobackup output files
RMAN uses default settings for CONFIGURE options. You can return to the default
value for any CONFIGURE command by running the same command with the CLEAR
option.
See Also: Oracle Database Backup and Recovery Basics to learn how
to configure the RMAN environment
Execute this command at the RMAN prompt. CONFIGURE cannot be used within a
RUN block.
The target database must be mounted or open, because configuration settings are
stored in the control file.
Channels allocated with ALLOCATE CHANNEL override any configured
automatic channels.
CONFIGURE
RMAN does not simultaneously allocate automatic channels for multiple device
types in BACKUP command.
To direct backups or restores to specific channels, use the RMAN-generated
channel names. If you specify channel numbers in the CONFIGURE CHANNEL
command, then RMAN uses the same numbers in the system-generated channel
names.
If you configure channels by using the nondefault CONNECT or PARMS options to
create backups or copies, then you must either use the same configured channels
or manually allocate channels with the same options to restore or crosscheck these
backups.
You cannot exclude the SYSTEM tablespace from whole database backups.
The REDUNDANCY and RECOVERY WINDOW options are mutually exclusive. Only
one type of retention policy can be in effect at any time.
You cannot clear individual parameters when running CONFIGURE ... CLEAR.
For example, you can run CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR but
not CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 5M CLEAR.
The channel number in a manually numbered channel must be less than 255.
You must specify at least one channel option when running CONFIGURE CHANNEL.
In other words, you cannot issue a command such as CONFIGURE CHANNEL 2
DEVICE TYPE DISK, but you can issue a command such as CONFIGURE CHANNEL
2 DEVICE TYPE DISK MAXPIECESIZE 2500K.
The CONFIGURE CONTROLFILE AUTOBACKUP FORMAT format string must include
the %F substitution variable. It cannot contain any other substitution variable.
With Oracle Database Release 10g in a Data Guard environment, configurations
can be set for standby databases as well as primary databases. All configurations
except for retention policy, tablespace exclude and auxiliary names can be set to
node-specific values. This means that the primary and standby databases can have
different channel configurations, autobackup locations, and so on.
Description
ARCHIVELOG
DELETIONPOLICYTO (
APPLIED ON STANDBY |
NONE |
CLEAR
)
Governs archived redo log deletion policy for the flash recovery area. Possible
settings are:
CONFIGURE
Syntax Element
Description
backupConf
cfauConf
deviceConf
Configures default backup settings for devices, such as the default backup
device, channel configurations for devices, default backup types for each
device, and parallelism.
ENCRYPTION
Used to specify encryption settings for the database or tablespaces within the
database, which apply unless overridden using the SET command. Options
specified for an individual tablespace take precedence over options specified
for the whole database.
ALGORITHM
{ algorithm_name |
CLEAR }
Specifies the default algorithm to use for encryption, when writing encrypted
backup sets. Possible values are listed in
V$RMAN_ENCRYPTION_ALGORITHMS. With CLEAR, resets the database to the
default algorithm, which is AES128.
CONFIGURE
Syntax Element
Description
Specifies whether to use encryption for the database or specified tablespaces.
With FOR DATABASE, the effect is as follows:
FOR
{ DATABASE |
TABLESPACE
tablespace_name }
{ ON | OFF | CLEAR }
SNAPSHOT CONTROLFILE NAME Configures the snapshot control file filename to 'filename'. If you run
[ TO 'filename' | CLEAR ] CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR, then RMAN sets the
snapshot control file name to its default.
The default value for the snapshot control file name is platform-specific and
dependent on the Oracle home. For example, the default on some UNIX
system is ?/dbs/[email protected]. If you clear the control file name, and you
change the Oracle home, then the default location of the snapshot control file
changes as well.
See Also: Oracle Database Backup and Recovery Advanced User's Guide for more
information about snapshot control files
backupConf
Syntax Element
Description
{ARCHIVELOG | DATAFILE}
BACKUP COPIES
FOR DEVICE TYPE [=]
deviceSpecifier
[CLEAR |TO integer]
Specifies the number of copies of each backup set for DATAFILE (both
datafiles and control files) or ARCHIVELOG files on the specified device type,
from 1 (default) to 4. If duplexing is specified in the BACKUP command or in
a SET BACKUP COPIES command, then the CONFIGURE setting is overridden.
Note: Control file autobackups on disk are a special case and are never
duplexed. RMAN always writes one and only copy.
Note: RMAN raises an error if you try to duplex backups to the flash recovery
area. You cannot duplex backups to the flash recovery area.
CONFIGURE
Syntax Element
Description
BACKUP OPTIMIZATION
[CLEAR | OFF | ON ]
The retention policy has an effect on which files backup optimization skips.
See Also: Oracle Database Backup and Recovery Advanced User's Guide for a
description of how RMAN determines that it can skip the backup of a file
EXCLUDE FOR TABLESPACE
tablespace_name
[ CLEAR ]
MAXSETSIZE [
CLEAR | TO
[ sizeSpec |
UNLIMITED ]
RETENTION POLICY
Specifies a persistent, ongoing policy for datafile and control file backups and
copies that RMAN marks as obsolete, that is, not needed and eligible for
deletion. As time passes, RMAN marks backups and copies as obsolete
according to the criteria you specify in the retention policy. RMAN does not
automatically delete any backups or copies: manually run the DELETE
OBSOLETE command to remove obsolete files. By default, RETENTION
POLICY is configured to REDUNDANCY 1.
For backups, the basic unit of the retention policy is a backup set (not a
backup piece) or image copy. For example, BACKUP AS BACKUPSET COPIES 4
TABLESPACE users generates a single backup set that is duplexed into four
identical backup pieces. The retention policy considers this as one backup, not
four separate backups.
CLEAR
TO RECOVERY WINDOW OF
integer DAYS
CONFIGURE
Syntax Element
Description
TO REDUNDANCY integer
TO NONE
Disables the retention policy feature. RMAN does not consider any backups or
copies as obsolete.
cfauConf
Syntax Element
Description
CONTROLFILE AUTOBACKUP
Controls the control file autobackup feature. By default, this feature is not
enabled.
CLEAR
Configures the default filename format for the control file autobackup on the
specified device type. If a flash recovery area is enabled, then RMAN creates
the disk autobackup in the flash recovery area. Otherwise, RMAN creates it in
an operating system specific location (?/dbs on Unix and Windows).
By default, the initial format is %F for all devices. Any default format string
specified with CONFIGURE must include the %F substitution variable.
%F is the only legal substitution variable for use in a control file autobackup
format. Use of any other substitution variable is an error.
Specify CLEAR to return the format to the default %F.
The formatSpec can specify an Automatic Storage Management disk group.
The following example configures a channel for an ASM disk group:
CONFIGURE CONTROLFILE AUTOBACKUP FOR DEVICE TYPE DISK TO
'+dgroup1';
See Also: "formatSpec" on page 2-122, for the semantics of the %F substitution
variable.
OFF
Disables the autobackup feature. (OFF is the default value.) When this
command is OFF, any BACKUP command that includes datafile 1 (including
BACKUP DATABASE) automatically includes the current control file and server
parameter file in the backup set. Otherwise, RMAN does not include these
files.
CONFIGURE
Syntax Element
Description
ON
The first channel allocated during the backup or copy job creates the
autobackup and places it into its own backup set; for post-structural
autobackups, the default disk channel makes the backup. RMAN writes the
control file and the server parameter file to the same backup piece. After the
control file autobackup completes, the database writes a message containing
the complete path of the backup piece and the device type to the alert log.
The default location for the autobackup on disk is the flash recovery area (if
configured) or a platform-specific location (if not configured). RMAN
automatically backs up the current control file using the default format of %F
(refer to entry for CONFIGURE CONTROLFILE AUTOBACKUP FORMAT for an
explanation of this substitution variable). You can change the location and
filename format with the CONFIGURE CONTROLFILE AUTOBACKUP FORMAT
and SET CONTROLFILE AUTOBACKUP FORMAT commands.
deviceConf
Syntax Element
Description
[AUXILIARY] CHANNEL
[ integer ] DEVICE TYPE
deviceSpecifier
The second command erases the MAXPIECESIZE setting of the first command.
If AUXILIARY is specified, then this configuration is used only for channels
allocated at the auxiliary instance. Specify configuration information for
auxiliary channels if they require different parameters from the channels
allocated at the target instance. If no auxiliary device configuration is
specified, then RMAN configures any auxiliary channels using the target
database device configuration.
See Also: Oracle Database Backup and Recovery Advanced User's Guide to learn
how configure automatic channels specified by channel number
CONFIGURE
Syntax Element
Description
allocOperandList
Specifies control options for the allocated channel. Note that the FORMAT
parameter can specify an Automatic Storage Management disk group. The
following example configures a channel for an ASM disk group:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '+dgroup1';
Specifies the default device type for automatic channels. By default, DISK is
the default device type. CLEAR returns the default device type to DISK.
By default, the BACKUP command only allocates channels of the default device
type. For example, if you configure automatic channels for DISK and sbt and
set the default device type to DISK, then RMAN only allocates disk channels
when you run the BACKUP DATABASE command. You can override this
behavior either by manually allocating channels in a RUN command, or by
specifying DEVICE TYPE on the BACKUP command itself.
The RESTORE command allocates automatic channels of all configured device
types, regardless of the default device type. The RESTORE command obeys the
PARALLELISM setting for each configured device type.
DEVICE TYPE [ = ]
deviceSpecifier
Specifies the device type (disk or sbt) to which to apply the settings specified
in this CONFIGURE command.
CLEAR
Resets backup type and parallelism settings for this device to their defaults..
BACKUP TYPE TO [
COPY |
[ COMPRESSED ]
BACKUPSET]
Configures the default backup type for disk or tape backups to either
BACKUPSET, COMPRESSED BACKUPSET or COPY.
For sbt devices the COPY option is not supported.
The default for DISK is BACKUPSET.
If the backup type is set to BACKUPSET, the BACKUP command always
produces backup sets regardless of which media the backup is produced on.
With the COMPRESSED option, the backupsets produced will use binary
compression.
The default location for disk backups is the flash recovery area, if one is
configured; otherwise, backups are stored in a platform-specific location (for
Unix and Windows, this is $ORACLE_HOME/dbs). The default format for
backup filenames is %U.
CONFIGURE
Syntax Element
Description
PARALLELISM integer
Configures the device types that are eligible for use in jobs that use automatic
channels and sets the degree of channel parallelism (DISK is the default).
The PARALLELISM parameter sets the number of automatic channels of the
specified device type allocated for RMAN jobs. RMAN always allocates the
number of channels set by PARALLELISM, although it may use only a subset
of these channels.
By default, PARALLELISM = 1. Specifying CLEAR for a device type resets its
settings to the default. For example, you can set PARALLELISM for disk
backups to 3. If you configure automatic channels of type disk and tape, and
set the default device type as disk, then RMAN allocates three disk channels
when you run BACKUP DATABASE at the RMAN prompt.
To change the parallelism for a device type to n, run a new CONFIGURE
DEVICE TYPE ... PARALLELISM n command. For example, you can change
configure PARALLELISM to 3 for sbt and then change it to 2 as follows:
CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
CONFIGURE DEVICE TYPE sbt PARALLELISM 2;
Examples
Configuring Backup Optimization: Example This example configures RMAN so that
the BACKUP command does not back up files to a device type if the identical file has
already been backed up to the device type:
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
Overriding the Default Device Type: Example This example configures the default
device type to sbt, backs up the archived logs on the default sbt channel, and then
backs up the database to disk on the default disk channel:
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksrv1)';
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
BACKUP ARCHIVELOG ALL;
BACKUP DEVICE TYPE DISK DATABASE;
CONFIGURE
Configuring and Clearing Parallelism: Example This example sets DISK parallelism
excludes the example tablespace from whole database backups, then returns the
tablespace to its default value of "not excluded":
CONFIGURE EXCLUDE FOR TABLESPACE example;
CONFIGURE EXCLUDE CLEAR;
RUN
{
ALLOCATE AUXILIARY CHANNEL dupdb1 TYPE DISK;
DUPLICATE TARGET DATABASE TO dupdb
CONFIGURE
LOGFILE
GROUP 1 ('?/dbs/dupdb_log_1_1.f',
'?/dbs/dupdb_log_1_2.f') SIZE 200K,
GROUP 2 ('?/dbs/dupdb_log_2_1.f',
'?/dbs/dupdb_log_2_2.f') SIZE 200K REUSE;
}
# Un-specify the auxiliary names
# by mistake:
CONFIGURE AUXNAME FOR DATAFILE 1
CONFIGURE AUXNAME FOR DATAFILE 2
CONFIGURE AUXNAME FOR DATAFILE 3
CONFIGURE AUXNAME FOR DATAFILE 4
Specifying the Default Format for the Control File Autobackup: Example This
example turns on the autobackup feature, then changes the default format for the
DISK and sbt devices, then clears the autobackup setting:
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONTROLFILE
CONTROLFILE
CONTROLFILE
CONTROLFILE
AUTOBACKUP
AUTOBACKUP
AUTOBACKUP
AUTOBACKUP
ON;
FORMAT FOR DEVICE TYPE DISK TO '?/oradata/%F';
FORMAT FOR DEVICE TYPE sbt TO 'cf_auto_%F';
CLEAR;
# returns to default setting of OFF
CONNECT
CONNECT
Syntax
connect::=
CONNECT AUXILIARY
CONNECT CATALOG
connectStringSpec
connectStringSpec
CONNECT TARGET
Purpose
To establish a connection between RMAN and a target, auxiliary, or recovery catalog
database.
When connecting from the command line, the password
may be visible to other users on the system. The CONNECT
command used from within RMAN avoids this problem.
Note:
You can only run the CONNECT TARGET, CONNECT CATALOG, and CONNECT
AUXILIARY commands if you are at the RMAN prompt and if you are not already
connected to the specified databases.
If you need to connect to a different target, catalog, or auxiliary database, then you
must start a new RMAN session.
You cannot use the CONNECT CATALOG command when RMAN is in the default
NOCATALOG mode, that is, when these conditions are met:
You have already run a command such as BACKUP that requires a repository
connection.
Description
CONNECT AUXILIARY
connectStringSpec
CONNECT CATALOG
connectStringSpec
CONNECT TARGET
connectStringSpec
CONNECT
Examples
This example starts RMAN and
then connects to the target database with an Oracle Net service name prod1:
% rman
RMAN> CONNECT TARGET sys/change_on_install@prod1;
RMAN> BACKUP DATAFILE 7;
# You cannot run CONNECT CATALOG after this point because RMAN has defaulted to NOCATALOG
Connecting with a Recovery Catalog: Example This example starts RMAN and then
connects to the target database prod1 by using operating system authentication and
the recovery catalog database rcat by using a password file:
% rman
RMAN> CONNECT TARGET / ;
RMAN> CONNECT CATALOG rman/rman@rcat;
example connects to three databases specifying a username and password for each:
% rman
RMAN> CONNECT TARGET SYS/sysdba@prod1;
RMAN> CONNECT CATALOG rman/rman@rcat;
RMAN> CONNECT AUXILIARY SYS/sysdba@dupdb;
connectStringSpec
connectStringSpec
Syntax
connectStringSpec::=
password
userid
net_service_name
Purpose
A subclause specifying 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.
Description
userid
You must have SYSDBA authority when connecting to the target or auxiliary
database, but must not connect as SYS to the recovery catalog database.
Note: The connect string must not contain any white space, but it can contain
punctuation characters such as a forward slash (/) and an at sign (@).
/password
@net_service_name
Examples
Connecting to a Target Database Without a Recovery Catalog: Example This
example connects to the target database by using a password and the Oracle Net
service name prod1 in the default NOCATALOG mode:
% rman TARGET SYS/change_on_install@prod1
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.
connectStringSpec
CONVERT
CONVERT
Syntax
convert::=
,
DATAFILE
filename
TABLESPACE
tablespace_name
NEW DATABASE
CONVERT
database_name
convertOptionList
TRANSPORT SCRIPT
script_name
CONVERT SCRIPT
script_name
ON TARGET PLATFORM
skipSpec
DATABASE
convertOptionList::=
fileNameConversionSpec
=
FORMAT
formatSpec
=
FROM PLATFORM
platform
=
PARALLELISM
integer
=
TO PLATFORM
platform
Purpose
To convert a datafile, tablespace or database to the format of a destination platform, in
preparation for transport across different platforms.
CONVERT TABLESPACE is used at the source database to produce datafiles for the
specified tablespaces in the format of a different destination platform. The
converted files can then be transported to the destination platform.
CONVERT DATAFILE is used on the destination database to convert datafiles that
are in the format of a different source platform. Once all of the datafiles required
for a tablespace have been converted, the datafiles can be transported into the
destination database.
CONVERT DATABASE is used to transport an entire database from a source
platform to a destination platform, converting the datafiles to the format of the
destination platform and ensuring the creation of other required database files.
Depending upon the requirements of your situation, CONVERT DATABASE on
either the source or destination platform.
The following list describes some situations in which CONVERT TABLESPACE and
CONVERT DATAFILE can be useful:
CONVERT
See Also: Oracle Database Backup and Recovery Advanced User's Guide
for a complete discussion of the use of CONVERT DATAFILE,
CONVERT TABLESPACE and CONVERT DATABASE
CONVERT DATAFILE and CONVERT TABLESPACE can also be used to move files into
and out of Automated Storage Management (ASM) disk groups. This capability is
needed because native operating system file manipulation commands like Unix cp
and Windows COPY cannot read from or write to ASM disk groups.
The input files are not altered by the CONVERT process. The conversion is not
performed in place. Instead, converted files are written to a specified output
destination.
Both source and destination databases must be running with initialization
parameter COMPATIBLE set to 10.0 or higher.
Prior to Release 10g, CLOBs were created in a variable width character set and
stored in an endian-dependent format. The CONVERT command does not perform
conversions on these CLOBs. Instead, RMAN captures the endian format of each
LOB column and propagates it to the target database. Subsequent reads of this
data by the SQL layer will interpret the data correctly based on either endian
format and write it out in an endian- independent way if the tablespace is
writeable. CLOBs created in Oracle Database Release 10gare stored in character set
AL16UTF16, which is platform independent.
CONVERT
CONVERT does not process user datatypes that require endian conversions. If you
need to transport objects between databases that are built on underlying types that
store data in a platform-specific format, then use the Data Pump Import and
Export utilities.
A tablespace must have been made read-write at least once in Release 10g before it
can be transported to another platform. Hence, any read-only tablespaces (or
currently existing transported tablespaces) that exist from an earlier release must
be first made read-write at least once before they can be transported to a different
platform. (It is sufficient to open the tablespace read-write and then immediately
make it read-only again.)
CONVERT
Because you cannot use operating system utilities to move files into ASM, you
may want to use CONVERT TABLESPACE or CONVERT DATAFILE to move files into
ASM even if no change in endian format is required. Using CONVERT in this
manner provides the equivalent of an operating system-level file copy command
for copying files into ASM. BACKUP AS COPY provides similar functionality but
catalogs the file copies created in the RMAN repository, which is only desirable if
the file copies created in ASM are intended for use as backups at the target
database.
Note:
Also note that some parts of the database are not transported directly:
Redo log files and control files from the source database are not transported. New
control files and redo log files are created for the target database during the
transport process, and an OPEN RESETLOGS is performed once the new database
is created.
CONVERT
The control file for the converted database does not contain a
copy of the RMAN repository information from the source database.
Backups from the source database cannot be used with the converted
database.
Note:
BFILEs are not transported. RMAN provides a list of objects using the BFILE
datatype in the output for the CONVERT DATABASE command, but users must
copy the BFILEs themselves and fix their locations on the target platform.
Datafiles for locally managed temporary tablespaces are not transported. The
temporary tablespaces are re-created at the target platform by running the
transport script.
External tables and directories are not transported. RMAN provides a list of
affected objects as part of the output of the CONVERT DATABASE command, but
users must redefine these on the target platform. See Oracle Database
Administrator's Guide for more information on managing external tables and
directories.
Password files are not transported. If a password file was used with the source
database, the output of CONVERT DATABASE includes a list of all usernames and
their associated privileges. Create a new password file on the target database
using this information. See Oracle Database Security Guide for more information on
managing password files.
Description
DATABASE
Used to transport entire databases across platforms (where the source and
destination platforms have the same endian format).
NEW DATABASE
database_name
ON TARGET PLATFORM
CONVERT SCRIPT
'script_name'
Specifies the DB_NAME for the new database produced by the CONVERT
DATABASE command.
Specifies that any CONVERT commands required for datafiles should be
performed on the destination platform rather than the source database. Useful
if you do not want the overhead of the conversion on the source platform, or if
you do not know the destination platform (for example, if you are publishing
a transportable tablespace to be used by recipients with many different target
platforms).
Specifies the location of the file to contain the convert script generated by
CONVERT DATABASE... ON TARGET PLATFORM. If not specified, the convert
script is not generated.
skipSpec
TRANSPORT SCRIPT
Specifies the location of the file to contain the transport script generated by
CONVERT DATABASE. If omitted, the transport script is not generated.
script_name'
DATAFILE
datafile_name
Specifies the name of a datafile that you want to transport into the destination
database.
CONVERT DATAFILE can only be used at the destination database.
CONVERT
Syntax Element
Description
TABLESPACE
Specifies the name of a tablespace in the source database that you want to
transport into the destination database on a different platform. CONVERT
TABLESPACE can only be used when connected to the source database and
converting on the source platform.
tablespace_name
convertOptionList
Syntax Element
Description
fileNameConversionSpec
A set of string pairs. Whenever any of the input filenames contains one of the
first halves of a pair, anywhere in the filename, it will be replaced with the
second half of the same pair.You can use as many pairs of replacement strings
as required. You can use single or double quotation marks.
FORMAT formatSpec
Specifies the name template for the output file(s). See the BACKUP AS COPY
command for the format values that are valid here.
FROM PLATFORM =
platform_name
Specifies the name of the source platform. This must be one of the platforms
listed in the PLATFORM_NAME column of the V$TRANSPORTABLE_PLATFORM
view.
TO PLATFORM =
platform_name
Examples
Examples for Creating Transportable Tablespace Sets
The procedure for creating and using a transportable tablespace set is documented at
length in Oracle Database Administrator's Guide. RMAN's CONVERT command is only
required in cases where you are moving transportable tablespaces between platforms
with different byte ordering. If your platforms have the same byte ordering, then you
can either use CONVERT or copy the files directly.
The basic outline of the process is as follows:
1.
2.
3.
Use the Original Export utility to generate a file containing structural information
from the data dictionary for the tablespaces to be transported. This file will be
used when plugging the tablespaces into the destination database.
4.
If you need to convert your datafiles for transport and you wish to use the source
system's resources for the conversion, then use the RMAN CONVERT
TABLESPACE command at this point on the source platform to convert the
tablespaces for the target platform. See the first example following this outline. (If
you prefer to use the destination system's resources for the conversion, do nothing
in this step.)
CONVERT
5.
Copy the datafiles (converted, if necessary) and the export dump file to the target
database. You may move these by any means that is convenient: an operating
system copy, ftp, or even distribution on removable media like CDs or tapes.
6.
If you are transporting across platforms where endian conversion is required, and
you did not perform the conversion on the source platform, then perform the
conversion on the destination platform. See the second example following this
outline.
7.
Invoke the Original Import utility to plug the set of tablespaces into the target
database.
For more details on this process, see Oracle Database Administrator's Guide. Read that
discussion in its entirety before attempting any part of the tablespace transport process.
The discussion in this document will focus on the specifics of using the CONVERT
TABLESPACE and CONVERT DATAFILE commands.
Suppose you need to
convert tablespaces finance (datafiles '/orahome/fin/fin01.dbf' and
'/orahome/fin/fin02.dbf') and hr (datafiles '/orahome/fin/hr01.dbf' and
'/orahome/fin/hr02.dbf') from a source database running on a Sun Solaris host to
a destination database running on an Linux PC. You plan to store the converted
datafiles in the temporary directory /tmp/transport_linux/ on the source host.
The example assumes that you have carried out the following steps in preparation for
the tablespace transport:
Now use RMAN to convert the datafiles to be transported to the destination host's
format on the source host. The FORMAT argument controls the name and location of
the converted datafiles.
% rman TARGET /
RMAN> CONVERT TABLESPACE finance,hr
TO PLATFORM 'Linux IA (32-bit)'
FORMAT='/tmp/transport_linux/%U';
CONVERT
The example assumes that you have carried out the following steps in preparation for
the tablespace transport:
You have set the source tablespaces to be transported to be read-only, used the
Original Export utility to create the structural information file (named, in our
example, expdat.dmp), gathered expdat.dmp and the unconverted tablespace
datafiles to be transported, and copied these files to the destination host, in the
/tmp/transport_solaris/' directory. You have preserved the subdirectory
structure from the files' original location, that is, the datafiles are stored as:
/tmp/transport_solaris/fin/fin01.dbf
/tmp/transport_solaris/fin/fin02.dbf
/tmp/transport_solaris/hr/hr01.dbf
/tmp/transport_solaris/hr/hr02.dbf
Now use RMAN's CONVERT command to convert the datafiles to be transported to the
destination host's format and deposit the results in /orahome/dbs.
Note the following:
You have to identify the datafiles by filename, not by tablespace name. Until the
datafiles are plugged in, the local instance has no way of knowing the desired
tablespace names.
The FORMAT argument controls the name and location of the converted datafiles.
When converting on the destination host, you must specify the source platform
using the FROM argument. Otherwise, RMAN will assume that the source
platform is the same as the platform of the host performing the conversion.
% rman TARGET /
RMAN> CONVERT DATAFILE
/tmp/transport_solaris/fin/fin01.dbf',
/tmp/transport_solaris/fin/fin02.dbf',
/tmp/transport_solaris/hr/hr01.dbf',
/tmp/transport_solaris/hr/hr02.dbf'
DB_FILE_NAME_CONVERT
'/tmp/transport_solaris/fin','/orahome/dbs/fin',
'/tmp/transport_solaris/hr','/orahome/dbs/hr'
;
/orahome/dbs/fin/fin01.dbf
/orahome/dbs/fin/fin02.dbf
/orahome/dbs/hr/hr01.dbf
/orahome/dbs/hr/hr02.dbf
From this point, follow the rest of the general outline for tablespace transport. Use
Import to plug the converted tablespaces into the new database with the import utility,
and make the tablespaces read-write if applicable.
Copying Datafiles To and From ASM Using CONVERT DATAFILE: Examples
The following example illustrates copying datafiles into ASM from normal storage.
Use CONVERT DATAFILE without specifying a source or destination platform, and
specifying ASM disk group +DATAFILE for the output location, as shown here:
RMAN>
CONVERT
'/disk1/oracle/dbs/t_ax1.f'
format '+datafile';
Starting backup at 29-MAY-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input filename=/disk1/oracle/dbs/t_ax1.f
converted datafile=+DATAFILE/asmv/datafile/sysaux.280.559534477
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting datafile conversion
input filename=/disk1/oracle/dbs/my_tbs_f1.df
converted datafile=+DATAFILE/asmv/datafile/my_tbs.281.559534493
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:04
Finished backup at 29-MAY-05
The following example illustrates copying the datafiles of a tablespace out of ASM
storage, to directory /tmp, with uniquely generated filenames.
RMAN> convert tablespace tbs_2 format '/tmp/tbs_2_%U.df';
Starting backup at 03-JUN-05
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=20 devtype=DISK
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00006 name=+DATAFILE/tbs_21.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-6_11gm2fq9.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00007 name=+DATAFILE/tbs_22.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-7_12gm2fqa.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00019 name=+DATAFILE/tbs_25.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-19_13gm2fqb.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00009 name=+DATAFILE/tbs_23.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-9_14gm2fqc.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00010 name=+DATAFILE/tbs_24.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-10_15gm2fqd.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
Finished backup at 03-JUN-05
CONVERT
The following example illustrates using the CONVERT DATABASE command and
converting the datafiles to the destination platform format on the destination host:
CONVERT DATABASE ON TARGET PLATFORM
CONVERT SCRIPT '/tmp/convertdb/convertscript.rman'
TRANSPORT SCRIPT '/tmp/convertdb/transportscript.sql'
new database 'newdb'
FORMAT '/tmp/convertdb/%U'
CREATE CATALOG
CREATE CATALOG
Syntax
createCatalog::=
;
CREATE CATALOG
Purpose
To create a schema for the recovery catalog. Typically, you create this schema in a
separate recovery catalog database. The catalog is created in the default tablespace of
the recovery catalog owner.
Note:
Example
Creating a Catalog Schema: Example
CREATE CATALOG
CREATE SCRIPT
CREATE SCRIPT
Syntax
createScript::=
=
GLOBAL
CREATE
SCRIPT
COMMENT
comment
script_name
backupCommands
{
maintenanceCommands
miscellaneousCommands
restoreCommands
;
FROM FILE
filename
Purpose
To create a stored script in the recovery catalog.
A stored script is a sequence of RMAN commands, given a name and stored in the
recovery catalog for later execution. A stored script may be local (that is, associated
with one target database) or global (available for use with any database registered in
the recovery catalog).
Any command that is legal within a RUN command is permitted in the stored script.
Several other commands are used with stored scripts:
The PRINT SCRIPT command is used to view the contents of a stored script.
The REPLACE SCRIPT command is used to update the contents of a stored script.
The EXECUTE SCRIPT command is used to execute the commands in the stored
script.
The SCRIPT command line arguments for RMAN (described in "cmdLine" on
page 2-57) runs a stored script automatically when starting RMAN.
The LIST SCRIPT NAMES command is used to find out what stored scripts are
defined for the current target database and recovery catalog.
The DELETE SCRIPT command is used to delete a stored script from the recovery
catalog.
See Also: Oracle Database Backup and Recovery Advanced User's
Guide to learn how to use stored scripts
Execute CREATE SCRIPT only at the RMAN prompt, not within a RUN block.
When creating a script, RMAN must be connected to a target database and a
recovery catalog, and the catalog database must be open.
You cannot run CREATE SCRIPT once to create a local script, and then use this
same script on multiple target databases. If you want to create a global script, you
CREATE SCRIPT
must connect to some target database (as well as a recovery catalog) and then use
CREATE GLOBAL SCRIPT instead of CREATE SCRIPT.
Quotes must be used around the script name when the name contains either
spaces or reserved words.
RMAN returns an error RMAN-20401: script already exists if you try to
create a local script when another local script already exists for the same target
database with the same name. The same error is returned if you try to create a
global script and a global script already exists with the same name in the recovery
catalog. If the script already exists, you must use REPLACE SCRIPT to update its
contents.
Description
GLOBAL
Identifies the script being created as global. If omitted, RMAN creates a local
stored script script_name defined on the current target database. If no such
script is defined on the target database, RMAN creates for a global stored
script script_name.
'script_name'
Reads the sequence of commands to define the script from the specified file.
The file should look like the body of a valid stored script. The first line of the
file must be a '{' and the last line must contain a '}'. The RMAN commands in
the file must be valid in a stored script.
backupCommands
maintenanceCommands
miscellaneousCommands
restoreCommands
Example
Creating a Local Stored Script: Example This example creates a stored script called
backup_whole that backs up the database and archived redo logs:
# creates recovery catalog script to back up database and archived logs
CREATE SCRIPT backup_whole
COMMENT "backup whole database and logs"
{
BACKUP INCREMENTAL LEVEL 0 TAG b_whole_l0
DATABASE PLUS ARCHIVELOG;
}
Creating a Global Stored Script: Example This example creates a stored script called
backup_whole that backs up the database and archived redo logs:
# creates recovery catalog script to back up database and archived logs
CREATE GLOBAL SCRIPT global_backup_db
COMMENT "backup any database from the recovery catalog, with logs"
{
BACKUP DATABASE PLUS ARCHIVELOG;
}
CROSSCHECK
CROSSCHECK
Syntax
crosscheck::=
CROSSCHECK
maintSpec
maintSpec::=
OF
listObjList
BACKUP
maintQualifier
archivelogRecordSpecifier
OF
listObjList
COPY
=
DEVICE TYPE
,
deviceSpecifier
recordSpec
Purpose
To verify the status of backups and copies recorded in the RMAN repository against
media such as disk or tape. The CROSSCHECK command only processes files created
on the same device type as the channels running the crosscheck.
Status
Description
EXPIRED
Object is not found either in file system (for DISK) or in the media
manager (for sbt). Note that for a backup set to be EXPIRED, all backup
pieces in the set must be EXPIRED.
Note: EXPIRED does not mean the same as OBSOLETE.
AVAILABLE
UNAVAILABLE
The CROSSCHECK command does not delete any files that it is unable to find, but
updates their repository records to EXPIRED. Then, you can run DELETE EXPIRED to
remove the repository records for all expired files as well as any existing physical files
whose records show the status EXPIRED.
If some backup pieces or copies were erroneously marked as EXPIRED, for example,
because the media manager was misconfigured, then after ensuring that the files really
do exist in the media manager, run the CROSSCHECK BACKUP command again to
restore those files to AVAILABLE status.
CROSSCHECK
See Also: Oracle Database Backup and Recovery Basics to learn how
to manage target database records in the catalog
Description
maintSpec
Examples
Crosschecking All Backups and Copies: Example The following example, which
assumes that the default configured channel is DEVICE TYPE sbt, queries the status of
all backups and copies on tape and disk. Because RMAN preconfigures a disk channel,
you do not need to manually allocate a disk channel:
CROSSCHECK BACKUP; # crosschecks backup sets and image copies
datafileSpec
datafileSpec
Syntax
datafileSpec::=
filename
integer
Purpose
A subclause that specifies a datafile by filename or absolute file number.
Description
'filename'
Specifies the datafile by using either the full path or a relative filename. If you
specify a relative filename, the filename is qualified in a port-specific manner
by the target database.
integer
Specifies the datafile by using its absolute file number. Obtain the file number
from the V$DATAFILE, V$DATAFILE_COPY, or V$DATAFILE_HEADER views
or REPORT SCHEMA command output.
Examples
Specifying a Datafile by Filename: Example This example copies datafile
DELETE
DELETE
Syntax
delete::=
EXPIRED
FORCE
maintSpec
NOPROMPT
DELETE
=
obsOperandList
DEVICE TYPE
deviceSpecifier
OBSOLETE
maintSpec::=
OF
listObjList
BACKUP
maintQualifier
archivelogRecordSpecifier
OF
listObjList
COPY
,
=
DEVICE TYPE
deviceSpecifier
recordSpec
Purpose
To delete physical backups and copies as well as do the following:
Update their repository records in the target control file to status DELETED
Remove their repository records from the recovery catalog (if you use a catalog)
When running RMAN interactively, DELETE displays a list of the files and prompts
you for confirmation before deleting any file in the list. When reading commands from
a command file, RMAN will not prompt for confirmation.
Physical Status
AVAILABLE
Not found on
media
EXPIRED
Found on media
UNAVAILABLE
Any
DELETE
Repository Status
Physical Status
FORCE
Any
See Also:
Description
FORCE
Deletes specified files (whether or not they exist on the media) and removes
repository records. RMAN ignores any I/O errors for the deleted objects.
RMAN displays the number of deleted objects at the end of the job.
NOPROMPT
Deletes specified files without first listing the files or prompting for
confirmation. The DELETE NOPROMPT command still displays each item as it
is deleted.
By default, DELETE displays a list of files to be deleted and prompts for
confirmation. If the user confirms, then RMAN shows each item as it is
deleted. If you are running commands from a command file, then NOPROMPT
is the default.
EXPIRED
Removes only files whose status in the repository is EXPIRED. RMAN marks
backups and copies as expired when you run a CROSSCHECK command and
the files are absent or inaccessible. To determine which files are expired, run a
LIST EXPIRED command.
If for some reason a backup or copy marked EXPIRED exists when you run
the DELETE EXPIRED command, then RMAN deletes the physical files.
maintSpec
Deletes files output by the BACKUP command. For maintSpec options, refer to
the parameter descriptions in "maintSpec" on page 2-148.
DELETE
Syntax Element
Description
OBSOLETE
Deletes backups and datafile copies recorded in the RMAN repository that are
obsolete, that is, no longer needed. In addition to obsolete datafile backups,
RMAN deletes obsolete archived logs and archived log backups. RMAN
determines which backups and copies of datafiles are no longer needed,
which in turn determines when logs (and backups of logs) are no longer
needed. RMAN considers the creation of a datafile as a backup when deciding
which logs to keep.
RMAN first uses the options that you specify with obsOperandList to
determine what is obsolete. If you do not specify options in obsOperandList,
then RMAN uses the options specified in CONFIGURE RETENTION POLICY.
Note: Even if you use a KEEP UNTIL clause to specify a time after which a
backup is to be considered obsolete, RMAN does not consider that backup
obsolete if it is needed to satisfy the specified retention policy. A KEEP UNTIL
clause can cause a backup to be kept longer than the retention policy requires,
but never a shorter time.
obsOperandList
Specifies the criteria for determining which backups and copies are obsolete.
See Also: "obsOperandList" on page 2-150
Restricts the deletion to obsolete backups and copies created on the specified
device type only.
See Also: "deviceSpecifier" on page 2-101
Examples
Deleting Expired Backups: Example The following example uses a configured sbt
channel to check the media manager for expired backups of the tablespace users that
are more than one month old and removes their catalog records:
CROSSCHECK BACKUPSET OF TABLESPACE users
DEVICE TYPE sbt COMPLETED BEFORE 'SYSDATE-31';
DELETE NOPROMPT EXPIRED BACKUPSET OF TABLESPACE users
DEVICE TYPE sbt COMPLETED BEFORE 'SYSDATE-31';
Deleting Obsolete Backups: Example The following example deletes backups and
copies that are not needed to recover the database to a random point within the last
week. RMAN also deletes archived redo logs that are no longer needed:
DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 7 DAYS;
Deleting Files That Have Already Been Backed Up: Example The following example
deletes backups and copies (including archived redo logs) that have already been
backed up at least twice to tape:
DELETE NOPROMPT BACKUP BACKED UP 2 TIMES TO DEVICE TYPE sbt;
DELETE NOPROMPT COPY BACKED UP 2 TIMES TO DEVICE TYPE sbt;
Forcing the Deletion of a Backup Set: Example The following example attempts to
delete the backup set copy with tag weekly_bkup:
DELETE NOPROMPT BACKUPSET TAG weekly_bkup;
However, RMAN displays a warning because the repository shows the backup set as
available, but the object is not actually available on the media:
RMAN-06207: WARNING: 1 objects could not be deleted for SBT_TAPE channel(s) due
RMAN-06208:
to mismatched status. Use CROSSCHECK command to fix status
List of Mismatched objects
==========================
Object Type
Filename/Handle
DELETE
DELETE SCRIPT
DELETE SCRIPT
Syntax
deleteScript::=
GLOBAL
DELETE
SCRIPT
script_name
Purpose
To delete a local or global stored script from the recovery catalog.
Description
GLOBAL
Specifies that the script to delete is a global stored script. Otherwise, RMAN
will look for a local stored script called script_name defined on the current
target database. (If no such script is defined on the target database, RMAN
will check for a global stored script named script_name and delete that
script if it exists.)
'script_name'
Example
The following example deletes a stored script
b_whole_10 from the recovery catalog:
deviceSpecifier
deviceSpecifier
Syntax
deviceSpecifier::=
DISK
media_device
Purpose
A subclause specifying the type of storage for a backup or copy.
Description
DISK
'media_device'
Specifies a sequential I/O device or access method for storage. The syntax and
semantics of sequential I/O device types are platform-specific. Example
values are sbt and sbt_tape (with or without quotes). These values are
synonymous.
The media_device variable specifies a media manager. Media device names
are case insensitive. The sbt variable is legal as input, but RMAN output
always displays its synonym sbt_tape. It is stored in the catalog as
sbt_tape for backward compatibility.
Examples
Allocating a Tape Channel: Example This example allocates a maintenance channel
for a media management device:
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
Restoring from Tape: Example This example restores archived logs from tape:
RESTORE DEVICE TYPE sbt ARCHIVELOG ALL;
DROP CATALOG
DROP CATALOG
Syntax
dropCatalog::=
;
DROP CATALOG
Purpose
To remove the schema from the recovery catalog.
Caution: This command deletes all RMAN repository data from
the recovery catalog. If you have no backups of the catalog, then all
backups of all databases managed by this recovery catalog become
unusable.
Example
Deleting the Catalog: Example This example drops the schema from the recovery
catalog (you must enter the command twice to confirm):
RMAN> DROP CATALOG
recovery catalog owner is RMAN
enter DROP CATALOG command again to confirm catalog removal
RMAN> DROP CATALOG
DROP DATABASE
DROP DATABASE
Syntax
dropDatabase::=
INCLUDING BACKUPS
DROP DATABASE
NOPROMPT
;
Purpose
Deletes the target database and, if RMAN is connected to a recovery catalog,
unregisters it. RMAN removes all datafiles, online logs, and control files belonging to
the target database.
Description
INCLUDING BACKUPS
Deletes backup sets, proxy copies, image copies, and archived logs associated
with the target database from all configured device types.
Note: If you have been using a recovery catalog but run RMAN in
NOCATALOG mode when you drop the database, then RMAN will not delete
any backups which are known to the recovery catalog but no longer exist in
the target database control file.
NOPROMPT
Specifies that you do not want RMAN to prompt you for confirmation before
deleting the database. By default, RMAN prompts for confirmation.
Example
In this example, you want to delete a test database
called test1 that is registered in the recovery catalog. You connect to test1 which is
started in RESTRICT mode, and delete the database files, as well as all backups,
copies, and archived logs associated with the database:
Deleting a Database: Example
DUPLICATE
DUPLICATE
Syntax
duplicate::=
dupsbyOptionList
FOR STANDBY
DUPLICATE TARGET DATABASE
TO
dupOptionList
database_name
dupOptionList::=
,
=
DEVICE TYPE
deviceSpecifier
fileNameConversionSpec
,
LOGFILE
logSpec
NOFILENAMECHECK
OPEN RESTRICTED
=
PFILE
filename
SKIP READONLY
,
SKIP TABLESPACE
tablespace_name
untilClause
dupsbyOptionList::=
DORECOVER
fileNameConversionSpec
NOFILENAMECHECK
logSpec::=
REUSE
filename
SIZE
sizeSpec
,
GROUP
integer
filename
REUSE
SIZE
sizeSpec
sizeSpec::=
G
K
M
integer
Purpose
To use backups (backup sets or image copies) of the target database to create either of
the following:
DUPLICATE
A duplicate database, which is a copy of the target database (or a subset of the
target database) with a unique DBID. Because a duplicate database has a unique
DBID, it is entirely independent of the primary database and can be registered in
the same recovery catalog as the primary database. Typically, duplicate databases
are used for testing.
A standby database, which is a special copy of the primary database that is
updated by applying archived redo logs from the primary database. A standby
database does not get a new DBID.
To create a standby database with the DUPLICATE command you must specify the FOR
STANDBY option. The DUPLICATE ... FOR STANDBY command creates the standby
database by restoring a standby control file, mounting the standby control file, and
then restoring and recovering backups of the target datafiles. The standby database is
left mounted after duplication is complete. Note that backups of the standby database
are interchangeable with backups of the primary database.
When duplicating a database that is currently in NOARCHIVELOG mode, recovery
occurs with the NOREDO option. Hence, if incremental backups exist, RMAN applies
only these backups to the restored files during recovery. For databases in ARCHIVELOG
mode, DUPLICATE recovers by default up to the last archived redo log generated at
the time the command was executed, or until a time specified with a SET UNTIL
clause.
See Also:
The target SCN for a DUPLICATE command cannot be before the most recent
OPENRESETLOGS. DUPLICATE to previous incarnations is not supported.
Issue one or more ALLOCATE AUXILIARY CHANNEL commands before executing
the DUPLICATE command, or CONFIGURE automatic auxiliary channels. RMAN
uses the channel configuration from the target for auxiliary channels in the
following circumstances:
The DUPLICATE command does not require non-AUXILIARY channels (that is,
normal target database channels).
You must be connected to both the target database and auxiliary instance. The
auxiliary instance must be started with the NOMOUNT option, and the target
database must be mounted or open. The target database cannot be a standby
database.
If you need to duplicate a database when some backups of the target database do
not exist then you must specify SKIP TABLESPACE. If you do not specify SKIP
TABLESPACE, then RMAN attempts to duplicate the following:
DUPLICATE
All datafiles in online tablespaces, whether or not the datafiles are online.
All tablespaces taken offline with an option other than NORMAL. For example,
RMAN attempts to duplicate tablespaces taken offline with the IMMEDIATE
option. You cannot duplicate OFFLINE NORMAL tablespaces, although you can
add these tablespaces manually after duplication.
You can skip all tablespaces in the target database except the SYSTEM tablespace,
undo tablespaces, and tablespaces containing rollback segments. RMAN does not
check for completeness. For example, you can duplicate a data tablespace but not
the tablespace containing the index for the data, or duplicate a tablespace that
contains only one partition of a partitioned table.
If the target and duplicate databases reside on the same host, set the
CONTROL_FILES parameter appropriately so that the DUPLICATE command does
not generate an error because the target control file is in use.
If the target and duplicate databases share the same host, set all *_PATH and
*_DEST initialization parameters appropriately so that the target database files are
not overwritten by the duplicate database files.
You cannot set the DB_NAME parameter in the duplicate parameter file to a value
different from the database name specified in the DUPLICATE command.
You cannot use the same database name for the target and duplicate databases
when the duplicate database resides in the same Oracle home as the target. Note
that if the duplicate database resides in a different Oracle home from the target,
then its database name just has to differ from other database names in that same
Oracle home.
If the target and duplicate databases reside on different hosts, then you must do
one of the following tasks for duplication to be successful:
Move backups and disk copies from the target host to the duplicate host to the
same location as the target host so that the path names are identical
Move backups and disk copies from the target host to the duplicate host to a
new location (so that the path names are different), and then CATALOG them.
Make sure that all backups and copies (disk or sbt) on the target host are
remotely accessible from the duplicate host. Make sure that the archived redo
logs are available in the expected location in the new host.
DUPLICATE
The following restrictions and notes apply when you use the DUPLICATE command
with the FOR STANDBY option:
All backups and copies located on disk must be available at the standby host with
the same path names as in the target host.
Backups on tape must be accessible from the standby host.
If archived logs have not been backed up, then archived logs must be available at
the standby host with the same path names as in the target host.
If RMAN recovers the standby database, then the checkpoint SCN of the control
file must be included in an archived redo log that is either available at the standby
site or included in an RMAN backup. For example, assume that you create the
standby control file and then immediately afterward archive the current log,
which has a sequence of 100. In this case, you must recover the standby database
up to at least log sequence 100, or the database signals an ORA-1152 error
message because the standby control file backup or copy was taken after the point
in time.
You cannot use SET NEWNAME or CONFIGURE AUXNAME to transform the
filenames for the online redo logs on the standby database.
You cannot use the DUPLICATE command to activate a standby database.
You cannot connect to the standby database and then DUPLICATE ... FOR
STANDBY to create an additional standby database. To create additional standby
databases, connect to the original primary database and run DUPLICATE ... FOR
STANDBY.
Do not attempt to register the standby database in the primary database
repository.
The DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT initialization
parameters cannot be used to control generation of new names for files at the
duplicate which are Oracle Managed Files (OMF) at the target database. When
using Oracle Managed Files at the target instance, it is not generally possible to
generate valid OMF filenames for the duplicate instance by replacing a substring
of the target instance OMF filename. When duplicating Oracle Managed Files and
storing the duplicates in an ASM disk group, RMAN uses
DB_FILE_NAME_CONVERT or LOG_FILE_NAME_CONVERT to convert the disk
group name, and then generates a new, valid filename based on the converted disk
group name.
You can avoid this issue by using one of the other supported options for naming
datafiles being duplicated from OMF:
The supported options for naming online logs being duplicated from OMF are to
use DB_CREATE_FILE_DEST, DB_RECOVERY_FILE_DEST or
DUPLICATE
When creating a standby or duplicate database and using Oracle Managed Files,
tempfiles are re-created in the current DB_CREATE_FILE_DEST, either when the
database is opened to become a primary, or when it is opened read-only. When not
using Oracle Managed Files, DB_FILE_NAME_CONVERT is used to convert the
tempfile names for the new database. When the standby or duplicate database is
opened in read-only or read/write mode, Oracle automatically creates temporary
files as needed, with the converted names based upon DB_FILE_NAME_CONVERT.
To specify different filenames for the tempfiles, see the discussion of SWITCH
TEMPFILE on page 2-217.
Description
FOR STANDBY
dupsbyOptionList
DORECOVER
Specifies that RMAN should recover the database after creating it. If you
specify an untilClause, then RMAN recovers to the specified point and leaves
the database mounted.
NOFILENAMECHECK
Prevents RMAN from checking whether target datafiles sharing the same
names as the duplicated files are in use. Note that the NOFILENAMECHECK
option is required when the standby and primary datafiles and logs have
identical filenames.
See Also: The description in dupOptionList
TO 'database_name'
Specifies the name of the duplicate database. The name should match the
name in the initialization parameter file of the duplicate database or the
database signals an error when creating the control file.
dupOptionList
Syntax Element
Description
dupOptionList
Specifies options that apply when creating a duplicate database not intended
for use as a standby database.
DUPLICATE
Syntax Element
Description
fileNameConversionSpec
LOGFILE logSpec
Specifies the online redo logs when creating a nonstandby duplicate database.
The syntax is the same used in the LOGFILE option of the CREATE DATABASE
statement.
Refer to the description of logSpec for the legal options.
NOFILENAMECHECK
Prevents RMAN from checking whether target datafiles sharing the same
names as the duplicated files are in use. The user is responsible for
determining that the duplicate operation will not overwrite useful data.
This option is necessary when you are creating a duplicate database in a
different host that has the same disk configuration, directory structure, and
filenames as the host of the target database. For example, assume that you
have a small database located in the /dbs directory of host1:
/oracle/dbs/system_prod1.dbf
/oracle/dbs/users_prod1.dbf
/oracle/dbs/tools_prod1.dbf
/oracle/dbs/rbs_prod1.dbf
Assume that you want to duplicate the database in machine host2, which has
the same file system /oracle/dbs/*, and you want to use the same
filenames in the duplicate database as in the primary. In this case, specify the
NOFILENAMECHECK option to avoid an error message. Because RMAN is not
aware of the different hosts, RMAN cannot determine automatically that it
should not check the filenames.
OPEN RESTRICTED
PFILE = 'filename'
SKIP READONLY
SKIP TABLESPACE
'tablespace_name'
Excludes the specified tablespace from the duplicate database. Note that you
cannot exclude the SYSTEM tablespace, undo tablespaces, and tablespaces
with rollback segments.
untilClause
Sets the end point for incomplete recovery of the duplicate database. You can
achieve the same result by running SET UNTIL before the DUPLICATE
command.
See Also: "untilClause" on page 2-228
DUPLICATE
logSpec
Syntax Element
Description
logSpec
Specifies the online redo logs when creating a nonstandby duplicate database.
If you do not specify LOGFILE, then RMAN uses LOG_FILE_NAME_CONVERT
if it is set. If neither LOGFILE nor LOG_FILE_NAME_CONVERT is set, then
RMAN uses the original target log filenames for the duplicate files. You must
specify the NOFILENAMECHECK option in this case.
See Also: Oracle Database SQL Reference for CREATE DATABASE syntax
Specifies the filename of the online redo log member and the size of the file in
kilobytes (K) or megabytes (M). The default is in bytes.
REUSE
Allows the database to reuse an existing file. If the file already exists, then the
database verifies that its size matches the value of the SIZE parameter. If the
file does not exist, then it is created.
GROUP integer
dupsbyOptionList
Syntax Element
Description
dupsbyOptionList
DORECOVER
Specifies that RMAN should recover the database after creating it. If you
specify an untilClause, then RMAN recovers to the specified point and leaves
the database mounted.
fileNameConversionSpec
Specifies how to convert original datafile names to new datafile names in the
standby database.
See Also:"fileNameConversionSpec" on page 2-114
NOFILENAMECHECK
Prevents RMAN from checking whether target datafiles sharing the same
names as the duplicated files are in use. Note that the NOFILENAMECHECK
option is required when the standby and primary datafiles and logs have
identical filenames.
See Also: The description in dupOptionList on page 2-108
Examples
Setting New Filenames Manually: Example This example assumes that the target
datafiles are on host1 in directory /h1/oracle/dbs/trgt. You wish to duplicate
the database to newdb on host2 in the directory /h2/oracle/oradata/newdb. The
DUPLICATE command uses backup sets stored on tape to duplicate the target database
to database newdb, and recovers it to a point 24 hours ago:
RUN
{
ALLOCATE AUXILIARY CHANNEL newdb1 DEVICE TYPE sbt;
DUPLICATE TARGET DATABASE TO newdb
DB_FILE_NAME_CONVERT=('/h1/oracle/dbs/trgt/','/h2/oracle/oradata/newdb/')
UNTIL TIME 'SYSDATE-1' # specifies incomplete recovery
SKIP TABLESPACE cmwlite, drsys, example
# skip desired tablespaces
PFILE = ?/dbs/initNEWDB.ora
lOGFILE
GROUP 1 ('?/oradata/newdb/redo01_1.f',
'?/oradata/newdb/redo01_2.f') SIZE 200K,
GROUP 2 ('?/oradata/newdb/redo02_1.f',
'?/oradata/newdb/redo02_2.f') SIZE 200K
GROUP 3 ('?/oradata/newdb/redo03_1.f',
DUPLICATE
Reusing the Target Filenames: Example This example assumes the following:
The target host and duplicate host have the same file structure.
You wish to name the duplicate files exactly like the target database files.
You want to prevent RMAN from checking whether files on the target database
that have the same names as the duplicated files are in use.
CONNECT TARGET
CONNECT AUXILIARY SYS/aux_pwd@newdb
DUPLICATE TARGET DATABASE TO ndbnewh
LOGFILE
'?/dbs/log_1.f' SIZE 200K,
'?/dbs/log_2.f' SIZE 200K
SKIP READONLY
NOFILENAMECHECK;
EXECUTE SCRIPT
EXECUTE SCRIPT
Syntax
executeScript::=
GLOBAL
EXECUTE
SCRIPT
script_name
Purpose
To run a local or global RMAN script stored in the recovery catalog.
See Also: "CREATE SCRIPT" on page 2-91 and Oracle Database
Backup and Recovery Advanced User's Guide for more details about
stored scripts
Description
GLOBAL
'script_name'
Example
Executing a Script: Example
backup_whole_10:
RUN { EXECUTE script backup_whole_10; }
EXIT
EXIT
Syntax
exit::=
EXIT
Purpose
To shut down the Recovery Manager utility.
Example
Exiting RMAN: Example
% rman
RMAN> EXIT
fileNameConversionSpec
fileNameConversionSpec
Syntax
fileNameConversionSpec::=
,
=
DB_FILE_NAME_CONVERT
string_pattern
Purpose
A subclause that specifies one or more patterns to be used in generating new database
file names based on old ones. Used with BACKUP , CONVERT and DUPLICATE as
one way of generating output file names.
where:
You can use as many pairs of primary and standby replacement strings as required.
For example, when making image copy backups of tablespaces users (with datafiles
in directory /disk1/dbs/users) and tools (with datafiles in
/disk1/dbs/tools/), to direct the converted datafiles to /newdisk/users and
/newdisk/tools respectively, use the DB_FILE_NAME_CONVERT pattern shown
here:
BACKUP AS COPY TABLESPACE users, tools
DB_FILE_NAME_CONVERT = ('disk1/dbs','newdisk');
For each datafile to be converted where 'disk1/dbs' is a substring of the filename, the
new filename is created by replacing 'disk1/dbs' with 'newdisk'. For example, the
converted datafile corresponding to /disk1/dbs/users/users01.dbf is stored in
/newdisk/users/users01.dbf, the converted datafile corresponding to
/disk1/dbs/tools/tools01.dbf is stored in /newdisk/tools/tools.dbf,
and so on.
Be aware of the following details:
fileNameConversionSpec
The pattern does not have to match at the beginning of the filename. In the
previous example, the match of the pattern to the original filename began at the
second character. The command
BACKUP AS COPY TABLESPACE users
DB_FILE_NAME_CONVERT = ('dbs','newdbs');
When there are multiple possible matches for a given filename being converted,
the first match in the list of patterns is used to generate the new filename. The
command
BACKUP AS COPY TABLESPACE users
DB_FILE_NAME_CONVERT = ('dbs','newdbs','/disk1','/newdisk');
would have the same effect as the previous example, because the pattern 'dbs'
matches the filename and therefore the filename is never compared to the second
pattern '/disk1'.
Only the database can generate and manage specific OMF filenames, and
substituting the name of a different disk group or a different OMF location into an
OMF filename generally does not produce a valid filename in the new destination.
To convert OMF filenames for storage in another OMF location, use an alternative
such as a FORMAT clause with these commands to specify the new output
location and allow the database to manage the specific output filenames.
Description
'string_pattern'
Specifies the pattern, consisting of the pairs of strings used to convert the
filenames..
Examples
Using DB_FILE_NAME_CONVERT with Multiple String Patterns: Example This
example shows the use of DB_FILE_NAME_CONVERT with BACKUP AS COPY to
create image copies of the users and tools tablespaces from the previous discussion,
directing users to /newdisk1 and tools to /newdisk2:
BACKUP AS COPY DEVICE TYPE DISK
DB_FILE_NAME_CONVERT=('/disk1/dbs/users','/newdisk1',
fileNameConversionSpec
'/disk1/dbs/tools','/newdisk2')
TABLESPACE tools, users;
See Also:
FLASHBACK
FLASHBACK
Syntax
flashback::=
,
=
DEVICE TYPE
deviceSpecifier
FLASHBACK
DATABASE
=
TO BEFORE SCN
integer
=
=
THREAD
TO BEFORE SEQUENCE
integer
integer
TO BEFORE RESETLOGS
=
TO BEFORE TIME
date_string
=
TO SCN
integer
=
=
THREAD
TO SEQUENCE
integer
integer
TO RESTORE POINT
restore_point_name
=
TO TIME
date_string
Purpose
Performs a Flashback Database operation, returning the database to (or to just before)
target time, as specified by time, SCN or log sequence number.
The result of using flashback database is generally similar to a database point-in-time
recovery performed with RECOVER, except for the following principal differences:
Because FLASHBACK DATABASE does not require you to restore a backup, it is usually
much faster than incomplete recovery.
Flashback Database also has a number of applications in the context of standby
databases, including providing functionality comparable to storage snapshots for
reporting and testing databases, more flexibility in testing disaster recovery, and
recovery from unwanted changes at a standby such as application of corrupted or
erroneous updates at the standby database. These uses are discussed in more detail in
Oracle Data Guard Concepts and Administration.
FLASHBACK
You can run this command from the RMAN prompt or from within a RUN
command.
You must have enabled the flashback logging functionality before the target time
for flashback, using the SQL statement ALTER DATABASE ... FLASHBACK ON.
You can check V$DATABASE.FLASHBACK_ON to determine whether flashback
logging has been enabled.
The target database must be mounted with a current control file, that is, the
control file cannot be a backup or have been re-created.
The flash recovery area must be enabled to enable logging for Flashback Database
(that is, DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE must
be set). Flashback logs can only be stored in the flash recovery area.
The FLASHBACK command does not start modifying the database until it has
made sure that it has all the files and resources that it needs. A Flashback Database
operation should never fail due to missing datafiles, redo log files or flashback
logs.
RMAN performs restore failover when unable to restore an archvied redo log file
for use in a Flashback Database operation. See Oracle Database Backup and Recovery
Advanced User's Guide for details on restore failover.
The earliest SCN that can be used for a Flashback Database operation depends on
the setting of the DB_FLASHBACK_RETENTION_TARGET initialization parameter,
and upon the actual retention of flashback logs permitted by available disk space
If the FLASHBACK command does not have enough flashback data to return the
database to the requested SCN or time, then RMAN issues an error and does not
modify the database.
Flashback logs may be deleted if disk space in the flash recovery area is low. If
there is not enough space in the flash recovery area for the retention of other files,
then the database may delete an archived redo log file that is eligible for deletion
because it is backed up to another location, or because it is obsolete. In such a case,
flashback logs that cannot be used without that redo log file are also deleted. To
ensure that this does not occur, make sure the flash recovery area is large enough
to accomodate your flashback logs and other backups.
FLASHBACK DATABASE can be used to return your database to a point prior to the
most recent OPEN RESETLOGS operation, if your database has been upgraded to
10g Relase 2.
If the database has not retained enough flashback logs to allow a Flashback
Database operation on all of your datafiles, then you can identify the datafiles for
which there are not enough flashback logs, and take these datafiles offline. You can
then run FLASHBACK DATABASE on the database and only the datafiles that are
online will be affected. Then, you can perform point-in-time recovery on those
files where there was not sufficient flashback log data.
RMAN issues an error if you attempt to perform Flashback Database on online
tablespaces on which flashback was disabled using the SQL statement ALTER
TABLESPACE ... FLASHBACK OFF.
FLASHBACK
Use FLASHBACK DATABASE to bring the affected datafiles to the same time or
SCN as the other datafiles.
Run RESTORE and then RECOVER to bring the affected datafiles to the same
time or SCN as the rest of the database.
Table 23
Added
Dropped
Renamed
FLASHBACK
Resized
May fail. You can take the datafile offline and then
rerun the FLASHBACK command. The datafile will
not be flashed back. You can then restore and recover
the datafile to the same time or SCN.
Taken offline
Brought online
Description
Allocates automatic channels for the specified device type only. For example,
if you configure automatic disk and tape channels, and issue
FLASHBACK...DEVICE TYPE DISK, then RMAN allocates only disk
channels. RMAN may need to restore redo logs from backup during the
flashback database process. Changes between the last flashback log and the
target time must be re-created based on the archived redo log. If no automatic
channels are allocated for tape and a needed redo log is on tape, the
FLASHBACK operation will fail.
See Also: "deviceSpecifier" on page 2-101
DATABASE
TO RESTORE POINT =
restore_point_name
Returns the database to the SCN associated with the specified restore point.
This can be an ordinary restore point or a guaranteed restore point.
TO SCN = integer
Returns the database to the point up to (and including) the specified SCN. By
default, the provided SCN resolves to the current or ancestor incarnation. The
DBA can override the default by using the RMAN RESET DATABASE
INCARNATION command to set the recovery target incarnation.
Returns the database to its state just before the specified SCN. Any changes at
an SCN lower than that specified are applied, but if there is a change
associated with the specified SCN it is not applied. By default, the provided
SCN resolves to the current or ancestor incarnation. The DBA can override
the default by using the RMAN RESET DATABASE INCARNATIONcommand
to set the recovery target incarnation.
TO SEQUENCE = integer
THREAD = integer
Specifies a redo log sequence number and thread as an upper limit. RMAN
applies changes up to (and including) the last change in the log with the
specified sequence and thread number.
TO BEFORE SEQUENCE =
integer [THREAD =
integer]
Specifies a redo log sequence number and thread as an upper limit. RMAN
applies changes up to (but not including) the last change in the log with the
specified sequence and thread number.
TO TIME = 'date_string'
Returns the database to its state at the specified time. You can use any SQL
DATE expressions to convert the time to the current format, for example,
FLASHBACK DATABASE UNTIL TIME 'SYSDATE-7'.
TO BEFORE TIME =
'date_string'
Similar to the TO TIME clause, but returns the database to its state including
all changes up to but not including changes at the specified time.
FLASHBACK
Syntax Element
Description
TO BEFORE RESETLOGS
Returns the database to its state including all changes up to the SCN of the
lastOPEN RESETLOGS.
Examples
FLASHBACK DATABASE to a Specific SCN: Example The following command uses
Flashback Database to return the database to the specified SCN:
RMAN> FLASHBACK DATABASE TO SCN 46963;
FLASHBACK DATABASE to One Hour Ago: Example The following command uses
Flashback Database to return the database to 1/24 of a day (one hour) in the past:
RMAN> FLASHBACK DATABASE TO TIMESTAMP (SYSDATE-1/24);
The following
command returns the database to immediately before the most recent OPEN
RESETLOGS:
formatSpec
formatSpec
Syntax
formatSpec::=
format_string
Purpose
To specify a filename format or an Automatic Storage Management disk group for a
backup piece or image copy. If you do not specify a value for the FORMAT parameter,
then RMAN either creates the backup in the flash recovery area if it is enabled, or in a
port-specific directory (for example, ?/dbs on UNIX) if a flash recovery area is not
enabled. In either case, RMAN uses the variable %U to name the backup.
The entire format_string is processed in a port-specific manner by the target
instance to derive the final backup piece name. The substitution variables listed in
"Keywords and Parameters" are available in FORMAT strings to aid in generating
unique filenames. The formatting of this information varies by platform.
2.
3.
4.
If specified in more than one of these places, then RMAN searches for the FORMAT
parameter in the order shown.
Description
%a
%c
Specifies the copy number of the backup piece within a set of duplexed
backup pieces. If you did not duplex a backup, then this variable is 1 for
backup sets and 0 for proxy copies. If one of these commands is enabled, then
the variable shows the copy number. The maximum value for %c is 256.
formatSpec
Syntax Element
Description
%d
%D
Specifies the current day of the month from the Gregorian calendar in format
DD.
%e
%f
%F
Combines the DBID, day, month, year, and sequence into a unique and
repeatable generated name. This variable translates into
c-IIIIIIIIII-YYYYMMDD-QQ, where:
IIIIIIIIII stands for the DBID. The DBID is printed in decimal so that
it can be easily associated with the target database.
YYYYMMDD is a time stamp in the Gregorian calendar of the day the
backup is generated
QQ is the sequence in hexadecimal number that starts with 00 and has a
maximum of 'FF' (256)
%h
%I
%M
%N
%n
Specifies the name of the database, padded on the right with x characters to a
total length of eight characters. For example, if the prod1 is the database
name, then the padded name is prod1xxx.
%p
Specifies the piece number within the backup set. This value starts at 1 for
each backup set and is incremented by 1 as each backup piece is created.
Note: If you specify PROXY, then the %p variable must be included in the
FORMAT string either explicitly or implicitly within %U.
%s
Specifies the backup set number. This number is a counter in the control file
that is incremented for each backup set. The counter value starts at 1 and is
unique for the lifetime of the control file. If you restore a backup control file,
then duplicate values can result. Also, CREATE CONTROLFILE initializes the
counter back to 1.
%t
Specifies the backup set time stamp, which is a 4-byte value derived as the
number of seconds elapsed since a fixed reference time. The combination of
%s and %t can be used to form a unique name for the backup set.
%T
Specifies the year, month, and day in the Gregorian calendar in this format:
YYYYMMDD.
%u
formatSpec
Syntax Element
Description
%U
%Y
%%
Specifies the literal '%' character. For example, %%Y translates to the string %Y.
Example
Specifying an ASM Disk Group: Example This example copies the database to ASM
disk group disk1:
BACKUP AS COPY DATABASE FORMAT '+disk1;
This example
creates an image copy of the database to instantiate a physical standby in /stby:
HOST
HOST
Syntax
host::=
command
HOST
Purpose
To invoke an operating system command-line sub-shell from within RMAN.
Description
HOST
Examples
This example shuts
down the database, makes a backup of datafile system01.dbf, then executes the
UNIX ls command to display all backed up datafiles:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP DATAFILE '?/oradata/trgt/system01.dbf'
FORMAT '/tmp/system01.dbf';
HOST 'ls -l /tmp/*dbf';
ALTER DATABASE OPEN;
Hosting to the Operating System Within a Backup: Example This example makes an
image copy of datafile 3, hosts out to the UNIX prompt to check that the copy is in
the directory (the UNIX session output is indented and displayed in bold), then
resumes the RMAN session:
RMAN> BACKUP DATAFILE 3 FORMAT '?/oradata/df3.cpy';
RMAN> HOST;
% ls $ORACLE_HOME/oradata/df3.cpy
/net/oracle/oradata/df3.cpy
% exit
RMAN> LIST COPY;
keepOption
keepOption
Syntax
keepOption::=
FOREVER
KEEP
LOGS
=
UNTIL TIME
date_string
NOLOGS
NOKEEP
Purpose
A subclause specifying the status of a backup or copy in relation to a retention policy.
The KEEP option marks the backup or copy as exempt from the retention policy (that
is, not obsolete), and the NOKEEP option undoes any existing exemptions.
This option cannot be used to override the retention politcy for files stored in the
flash recovery area.
The KEEP UNTIL clause never causes RMAN to consider a backup obsolete, if it is
still required to satisfy the retention policy. KEEP UNTIL can cause backups to be
kept longer than the retention policy would otherwise require, but never causes a
backup to become obsolete sooner than the retention policy requires.
Description
KEEP
Overrides any configured retention policy for this backup or copy so that the
backup is not obsolete. The BACKUP ... KEEP command specifies a new
retention time for this backup. Use this option to create a long-term backup,
that is, a backup that want you to archive.
FOREVER
Specifies that the backup or copy never expires. You must use a recovery
catalog when FOREVER is specified, because the backup records eventually
age out of the control file.
UNTIL TIME = 'date_string' Specifies the date until which the backup or copy must be kept. You can either
specify a specific time by using the current NLS_DATE_FORMAT, or a SQL date
expression, such as 'SYSDATE+365'.
LOGS
Specifies that all of the archived logs required to recover this backup or copy
must remain available as long as this backup or copy is available.
NOLOGS
Specifies that this backup or copy cannot be recovered because the archived
logs needed to recover this backup will not be kept. The only use for this
backup or copy is to restore the database to the point in time that the backup
or copy was taken. This is the only valid recoverability option when the
database operates in NOARCHIVELOG mode. This option is not valid if the
backup or copy is inconsistent.
NOKEEP
Specifies that the backup or copy expires according to the user's retention
policy. This is the default behavior if no KEEP option is specified.
keepOption
Examples
Making a Long-Term Backup: Example This example makes a long-term backup of
the database and specifies that it should never become obsolete and that the logs
required to recover it should not be retained:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP DATABASE
KEEP FOREVER NOLOGS;
ALTER DATABASE OPEN;
Changing the Status of a Copy: Example This example specifies that any long-term
image copies of datafiles and control files should lose their exempt status and so
become eligible to be obsolete according to the existing retention policy:
CHANGE COPY OF DATABASE CONTROLFILE NOKEEP;
LIST
LIST
Syntax
list::=
maintQualifier
untilClause
RECOVERABLE
listObjectSpec
EXPIRED
recordSpec
database_name
OF DATABASE
INCARNATION
maintQualifier
LIST
untilClause
RECOVERABLE
listObjectSpec
recordSpec
ALL
GLOBAL
SCRIPT NAMES
listObjectSpec::=
OF
listObjList
listBackupOption
BACKUP
archivelogRecordSpecifier
OF
listObjList
COPY
listBackupOption::=
BY FILE
SUMMARY
Purpose
To display information about backup sets, proxy copies, and image copies recorded in
the repository. The LIST command displays the files against which you can run
CROSSCHECK and DELETE commands. Use this command to list:
Backups and copies that do not have the status AVAILABLE in the RMAN
repository
Backups and copies of datafiles that are available and can possibly be used in a
restore operation
Specified archived logs, backup sets, backup pieces, control file copies, datafile
copies, and proxy copies
LIST
RMAN records the output to either standard output or the message log, but not to
both at the same time. You can control how the output is organized (BY BACKUP or BY
FILE) as well as the level of detail in the output (VERBOSE or SUMMARY).
See Also: Oracle Database Backup and Recovery Basics to learn how
to make lists and reports, and "cmdLine" on page 2-57
Description
EXPIRED
Displays backup sets, proxy copies, and image copies marked in the
repository as EXPIRED, that is, "not found."
To ensure that LIST EXPIRED shows up-to-date output, issue a
CROSSCHECK command periodically. When you issue a CROSSCHECK
command, RMAN searches on disk and tape for the backups and copies
recorded in the repository. If it does not find them, then it updates their
repository records to status EXPIRED.
RECOVERABLE
untilClause
recordSpec
Specifies the object or objects that you are listing. Refer to "recordSpec" on
page 2-153.
INCARNATION
OF DATABASE
'database_name'
Specifies the name of the database. If you do not specify the OF DATABASE
option, then the command lists all databases registered in the recovery
catalog.
maintQualifier
LIST
Syntax Element
Description
SCRIPT NAMES
ALL
GLOBAL
listObjectSpec
Syntax Element
Description
listObjectSpec
BACKUP
BACKUPSET
Displays only information about backup sets, backup pieces, and proxy
copies. The output displays a unique key for each. The LIST BACKUPSET
command defaults to BY BACKUP.
By default, RMAN lists both usable and unusable backups, even those that
cannot be restored, are expired or unavailable, or are incrementals that cannot
be restored because their parent full backup or copy no longer exists. To see
only backups that can be used for recovery, use the RECOVERABLE option.
See Also: "LIST Output" on page 2-131 for an explanation of the column
headings of the LIST output tables. Use the KEY column of the output to
obtain the primary key usable in the CHANGE and DELETE commands.
COPY
Displays only information about datafile copies, archived redo logs, and
image copies of archived redo logs. By default, LIST COPY displays copies of
all database files and archived redo logs. Both usable and unusable image
copies are included in the output, even those that cannot be restored or are
expired or unavailable.
See Also: Table 216 and Table 218 for an explanation of the column
headings of the LIST COPY output tables
OF listObjList
Restricts the list of objects operated on to the object type specified in the
listObjList clause. If you do not specify an object, then LIST defaults to
OF DATABASE CONTROLFILE ARCHIVELOG ALL.
Note: The LIST BACKUP ... LIKE command is not valid. The only valid
exception is LIST BACKUP OF ARCHIVELOG LIKE.
See Also: "listObjList" on page 2-144
archivelogRecordSpecifier
LIST
listBackupOption
Syntax Element
Description
listBackupOption
BY BACKUP
If you specify the SUMMARY option, then this command is equivalent to LIST
BACKUP SUMMARY.
VERBOSE
SUMMARY
Gives a one-line summary for each datafile (when using BY FILE) or backup
(when using BY BACKUP).
BY FILE
Lists a datafile, then its backup sets, and then proxy copies.
LIST Output
The information that appears in the output is shown in the following tables:
Table 25, "List of Backup Pieces (for sets with only one piece)"
Table 28, "Backup Set Copy ... of backup set ... (only if multiple pieces)"
Table 29, "List of Backup Pieces for backup set ... Copy ... (if multiple pieces)"
Table 214, "List of Archived Log Backups (LIST BACKUP ... BY FILE)"
LIST
Table 24
Column
Indicates
BS Key
Type
LV
Size
Elapsed Time
Completion Time
The date and time that the backup set completed. Note that
the format of this field depends on the NLS_LANG and
NLS_DATE_FORMAT environment settings.
Table 25
Column
Indicates
BP Key
Status
Tag
The tag applied to the backup set; NULL if none. Note that tag
names are not case sensitive and display in all uppercase.
Piece Name
Controlfile Included
LIST
Table 25 (Cont.) List of Backup Pieces (for sets with only one piece)
Column
Indicates
SPFILE Included
Ckp SCN
Ckp time
Table 26
Column
Indicates
File
LV
Type
Ckp SCN
The checkpoint of the datafile at the time it was backed up. All
database changes prior to the SCN have been written to the
file; changes after the specified SCN have not been written to
the file.
Ckp Time
The checkpoint of the datafile at the time it was backed up. All
database changes prior to the time have been written to the
file; changes after the specified time have not been written to
the file.
Name
Table 27
Column
Indicates
Thrd
Seq
Low SCN
Low Time
The time when the database switched into the redo log having
this sequence number.
Next SCN
Next Time
Table 28
Backup Set Copy ... of backup set ... (only if multiple pieces)
Column
Indicates
Device Type
LIST
Table 28 (Cont.) Backup Set Copy ... of backup set ... (only if multiple pieces)
Column
Indicates
Elapsed Time
Completion Time
The date and time that the backup set completed. Note that
the format of this field depends on the NLS_LANG and
NLS_DATE_FORMAT environment settings.
Tag
The tag applied to the backup set; NULL if none. Note that tag
names are not case sensitive and display in all uppercase.
Table 29
List of Backup Pieces for backup set ... Copy ... (if multiple pieces)
Column
Indicates
BP Key
Pc#
Status
Piece Name
Table 210
Column
Indicates
PC Key
File
Status
Completion Time
The date and time that the backup set completed. Note that
the format of this field depends on the NLS_LANG and
NLS_DATE_FORMAT environment settings.
Ckp SCN
LIST
Indicates
Ckp time
Datafile name
Handle
The media manager's handle for the proxy copy. If the object is
on sbt, then the media ID is also displayed.
Tag
The tag applied to the proxy copy; NULL if none. Note that tag
names are not case sensitive and display in all uppercase.
Table 211
Column
Indicates
Key
TY
LV
Device Type
Completion Time
The date and time that the backup set completed. Note that
the format of this field depends on the NLS_LANG and
NLS_DATE_FORMAT environment settings.
#Pieces
#Copies
Tag
The tag applied to the backup set; NULL if none. An asterisk (*)
indicates multiple copies with different tags. Note that tag
names are not case sensitive and display in all uppercase.
LIST
Table 212
Column
Indicates
BP Key
BS Key
Cp#
The copy number of this backup piece in the backup set. The
number is 1 if no duplexing was performed. Otherwise, the
value ranges from 2 to 4.
Status
Device Type
Piece Name
Table 213
Column
Indicates
File
Key
TY
LV
Ckp SCN
The checkpoint of the datafile at the time it was backed up. All
database changes prior to the SCN have been written to the
file; changes after the specified SCN have not been written to
the file.
LIST
Table 213 (Cont.) List of Datafile Backups (LIST BACKUP ... BY FILE)
Column
Indicates
Ckp Time
The checkpoint of the datafile at the time it was backed up. All
database changes prior to the time have been written to the
file; changes after the specified time have not been written to
the file.
#Pieces
#Copies
Tag
The tag applied to the backup set; NULL if none. Note that tag
names are not case sensitive and display in all uppercase.
Table 214
Column
Indicates
Thrd
Seq
Low SCN
Low Time
The time when the database switched into the redo log having
this sequence number.
BS Key
#Pieces
#Copies
Tag
The tag applied to the backup set; NULL if none. Note that tag
names are not case sensitive and display in all uppercase.
Table 215
Column
Indicates
CF Ckp SCN
Ckp Time
BS Key
LIST
Table 215 (Cont.) List of Controlfile Backups (LIST BACKUP ... BY FILE)
Column
Indicates
#Pieces
#Copies
Tag
The tag applied to the backup set; NULL if none. Note that tag
names are not case sensitive and display in all uppercase.
Table 216
Column
Indicates
Key
The unique identifier for the datafile copy. Use this value in a
CHANGE command to alter the status of the datafile copy.
If you are connected to a recovery catalog, then Key is the
primary key of the datafile copy in the catalog. It corresponds
to CDF_KEY in the RC_DATAFILE_COPY view. If you are
connected in NOCATALOG mode, then Key displays the RECID
from V$DATAFILE_COPY.
Note: The values for KEY in the recovery catalog and the
control file are different.
File
The file number of the datafile from which this copy was
made.
Completion Time
The date and time that the copy completed. Note that the
value of this field is sensitive to the NLS_LANG and
NLS_DATE_FORMAT environment variables.
Ckp SCN
Ckp TIME
Name
LIST
Table 217
Column
Indicates
Key
The unique identifier for the control file copy. Use this value in
a CHANGE command to alter the status of the copy.
If you are connected to a recovery catalog, then Key is the
primary key of the control file copy in the catalog. It
corresponds to CCF_KEY in the RC_CONTROLFILE_COPY
view. If you are connected in NOCATALOG mode, then Key
displays the RECID from V$DATAFILE_COPY.
Note: The values for Key in the recovery catalog and the
control file are different.
Completion Time
The date and time that the copy completed. Note that the
value of this field is sensitive to the NLS_LANG and
NLS_DATE_FORMAT environment variables.
Ckp SCN
Ckp TIME
Name
Table 218
Column
Indicates
Key
The unique identifier for this archived redo log copy. Use this
value in a CHANGE command to alter the status of the copy.
If you are connected to a recovery catalog, then Key is the
primary key of the backup set in the catalog. It corresponds to
AL_KEY in the RC_ARCHIVED_LOG view. If you are connected
in NOCATALOG mode, then Key displays the RECID from
V$ARCHIVED_LOG.
Note: The values for Key in the recovery catalog and the
control file are different.
Thrd
Seq
Low Time
The time when the database switched into the redo log having
this sequence number.
Name
LIST
Table 219
Column
Indicates
DB Key
When combined with the Inc Key, the unique key by which
RMAN identifies the database incarnation in the recovery
catalog. Use this key to unregister a database from a recovery
catalog, that is, delete all the rows associated with that
database from the recovery catalog.
Inc Key
DB Name
DB ID
STATUS
Reset SCN
Reset Time
Table 220
Column
Indicates
Script Name
Description
Examples
Listing Backups: Example
LIST BACKUP;
List of Backup Sets
===================
BS Key Device Type
------- ----------236
DISK
BP Key: 237
Piece Name:
List
Thrd
---1
1
Next Time
--------21-SEP-01
21-SEP-01
LIST
AVAILABLE
10/07/2001 03:38:22 78025
10/07/2001 03:38:09
Datafile name: /oracle/oradata/trgt/system01.dbf
Handle: 0lb8la51_1_0
Tag: WKLYBKUP
Device Type
----------SBT_TAPE
SBT_TAPE
Completion Time
-------------------FEB 08 2002 05:37:37
FEB 08 2002 05:38:21
#Pieces
------1
1
#Copies
------1
1
Tag
--TAG20020208T053733
TAG20020208T053744
TY
B
P
P
B
P
LV
-0
F
0
0
0
S
A
X
U
A
U
Ckp SCN
---------37973
78022
78025
37973
78027
Ckp Time
----------------09/28/01 19:28:36
10/07/01 03:05:10
10/07/01 03:38:09
09/28/01 19:28:36
10/07/01 03:38:22
#Pieces
------1
1
2
1
1
#Copies
------3
1
1
2
1
Tag
--*
DF_1
DF_1
*
DF_2
LIST
copies of logs:
LIST COPY OF DATABASE ARCHIVELOG ALL;
List of
Key
------153
154
Archived Log
Thrd Seq
---- ------1
30
1
31
Copies
S Low Time
- --------A 14-SEP-01
A 14-SEP-01
Name
---/oracle/oradata/trgt/arch/archive1_30.dbf
/oracle/oradata/trgt/arch/archive1_31.dbf
Listing Backups of Specific Datafiles: Example The following example lists backups
of datafile 3 in summary mode:
LIST BACKUP OF DATAFILE 3 SUMMARY;
List of Backups
===============
Key
TY LV S Device Type Completion Time #Pieces #Copies Tag
------- -- -- - ----------- --------------- ------- ------- --180
B 0 A DISK
14-SEP-01
1
2
TAG20011114T125431
Database Incarnations
Inc Key DB Name DB ID
------- -------- ---------------1
RDBMS
774627068
2
RDBMS
774627068
STATUS
-----PARENT
CURRENT
Reset SCN
---------1
173832
Reset Time
---------21-OCT-03
21-OCT-03
Global Scripts
LIST
Script Name
Description
----------------------------------------------------------------------purge_backups
General script to enforce retention policy
validate_archived_logs
General script to synchronize archived logs on disk with RMAN.
listObjList
listObjList
Syntax
listObjList::=
archivelogRecordSpecifier
CONTROLFILE
,
tablespace_name
dbObject
SPFILE
dbObject::=
DATABASE
,
DATAFILE
datafileSpec
,
TABLESPACE
tablespace_name
Purpose
A subclause used to specify database files and archived redo logs.
CHANGE
CROSSCHECK
DELETE
LIST
Description
archivelogRecordSpecifier
CONTROLFILE
SPFILE
listObjList
dbObject
Syntax Element
Description
DATABASE
Specifies backup sets or image copies of all files in the current database.
DATAFILE datafileSpec
TABLESPACE
'tablespace_name'
Examples
The following command lists image copies of all
the files in the database, skipping the temp tablespace, which is a dictionary-managed
temporary tablespace:
Listing Datafile Copies: Example
Crosschecking Archived Redo Logs: Example The following example queries the
media manager for the status of server parameter file and archived redo log backups
(either backup sets or image copies) created in the last three months:
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
CROSSCHECK BACKUP OF SPFILE ARCHIVELOG FROM TIME 'SYSDATE-90';
Deleting Expired Control File Backup Sets: Example The following command
deletes expired backups (either backup sets or image copies) of the control file:
DELETE EXPIRED BACKUP OF CONTROLFILE;
maintQualifier
maintQualifier
Syntax
maintQualifier::=
completedTimeSpec
,
=
DEVICE TYPE
LIKE
deviceSpecifier
string_pattern
BACKED UP
integer
TAG
deviceSpecifier
tag_name
Purpose
A subclause used to specify database files and archived redo logs.
LIST
CROSSCHECK
DELETE
SWITCH
The BACKED UP integer TIMES clause applies only to archived redo logs.
Description
completedTimeSpec
Allocates automatic channels for the specified device type only. This option is
valid only if you have configured automatic channels and have not manually
allocated channels. For example, if you configure automatic disk and tape
channels, and issue CHANGE...DEVICE TYPE DISK, then RMAN allocates
only disk channels.
See Also: "deviceSpecifier" on page 2-101
LIKE 'string_pattern'
Restricts the command to archived logs that have been successfully backed up
integer or more times to the specified media.
maintQualifier
Syntax Element
Description
TAG = 'tag_name'
Specifies the datafile copies and backup sets by tag. Tag names are not case
sensitive and display in all uppercase.
See Also: "BACKUP" on page 2-22 for a description of how a tag can be
applied to an individual copy of a duplexed backup set, and also for a
description of the default filename format for tags
Example
Listing Backups on a Specific Device: Example The following command lists all
backups located on tape and copies located in /tmp:
LIST BACKUP DEVICE TYPE sbt;
LIST COPY LIKE '/tmp';
Deleting Archived Logs That Are Already Backed Up: Example The following
command deletes only those archived logs that have been successfully backed up three
or more times to tape:
DELETE ARCHIVELOG ALL BACKED UP 3 TIMES TO DEVICE TYPE sbt;
maintSpec
maintSpec
Syntax
maintSpec::=
OF
listObjList
BACKUP
maintQualifier
archivelogRecordSpecifier
OF
listObjList
COPY
,
=
DEVICE TYPE
deviceSpecifier
recordSpec
Purpose
To specify the backup files operated on by the CHANGE, CROSSCHECK, and DELETE
commands.
Description
BACKUP
BACKUPSET
maintSpec
Syntax Element
Description
COPY
Processes datafile copies, control file copies, archived redo logs, and image
copies of archived redo logs.
If you do not specify an option for CHANGE COPY, then the command
operates on all image copies recorded in the repository.
If you are running CROSSCHECK COPY, then by default the command checks
all image copies of all files in the database with status AVAILABLE or
EXPIRED.
By default, COPY removes copies of all files in the database. Specify the
EXPIRED option to remove only copies that are marked EXPIRED in the
repository.
OF listObjList
Restricts the list of objects operated on to the object type specified in the
listObjList clause. If you do not specify an object, then the command
defaults to all copies. Note that CHANGE COPY OF DATABASE includes datafiles
but not control files.
See Also: "listObjList" on page 2-144
archivelogRecordSpecifier
maintQualifier
recordSpec
Specifies the file that you are performing maintenance on. See "recordSpec" on
page 2-153.
Allocates automatic channels for the specified device type only. This option is
valid only if you have configured automatic channels and have not manually
allocated channels. For example, if you configure automatic disk and tape
channels and run CROSSCHECK...DEVICE TYPE DISK, then RMAN allocates
only disk channels.
See Also: "deviceSpecifier" on page 2-101
Examples
To see the maintSpec clause in use, refer to the commands where it is used:
obsOperandList
obsOperandList
Syntax
obsOperandList::=
RECOVERY WINDOW OF
integer
DAYS
=
REDUNDANCY
integer
Purpose
A subclause used to specify which criteria are used to mark backups and copies as
obsolete.
DELETE
REPORT
Description
RECOVERY WINDOW OF
integer DAYS
Specifies that RMAN should report as obsolete those backups and copies that
are not needed to recover the database to any point within the last integer
days.
See Also: "CONFIGURE" on page 2-63 for an explanation of the recovery
window
REDUNDANCY = integer
Example
Deleting Obsolete Backups: Example The following command deletes all backups
and copies not needed to recover the database to a random point within the last 30
days:
DELETE OBSOLETE RECOVERY WINDOW OF 30 DAYS;
PRINT SCRIPT
PRINT SCRIPT
Syntax
printScript::=
GLOBAL
PRINT
SCRIPT
TO FILE
filename
script_name
Purpose
To print a local or global stored script to standard output or to a file.
For more information about stored scripts, see "CREATE SCRIPT" on page 2-91.
Description
GLOBAL
With the GLOBAL option, PRINT SCRIPT prints the global script named
'script_name' instead of the local script.
If omitted, RMAN looks for a local or global script script_name to print. If a
local script is found, it is printed. If no local script is found, but a global script
script_name is found, the global script is printed.
See "CREATE SCRIPT" on page 2-91 for more details about local and global
stored scripts.
'script_name'
With TO FILE 'filename' option, PRINT SCRIPT sends its output to the
specified file instead of standard output.
Examples
Printing a Script to a File: Example
'/tmp/backup_db.rman':
PRINT SCRIPT backup_db TO FILE '/tmp/backup_db.rman';
Printing a Script to the Screen: Example This example prints a stored script to
standard output (includes sample output):
RMAN> PRINT SCRIPT 'backup_db';
printing stored script: backup_db
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt
BACKUP DATABASE;
}
QUIT
QUIT
Syntax
quit::=
QUIT
Purpose
To shut down the Recovery Manager utility.
Example
Quitting RMAN: Example
% rman
RMAN> QUIT
recordSpec
recordSpec
Syntax
recordSpec::=
,
filename
ARCHIVELOG
,
primaryKey
,
BACKUPSET
primaryKey
,
media_handle
BACKUPPIECE
primaryKey
PROXY
TAG
tag_name
filename
,
primaryKey
CONTROLFILECOPY
DATAFILECOPY
=
TAG
DATAFILECOPY
NODUPLICATES
NODUPLICATES
ALL
LIKE
tag_name
string_pattern
Purpose
A subclause that specifies which objects the CHANGE, CROSSCHECK, DELETE, and
LIST commands should operate on.
Most recordSpec options allow you to specify a primary key. Use the output of the
LIST command to obtain keys.
Description
ARCHIVELOG
BACKUPSET primary_key
BACKUPPIECE
PROXY
CONTROLFILECOPY
DATAFILECOPY
recordSpec
Syntax Element
Description
NODUPLICATES
Examples
Crosschecking Backups: Example
by primary key:
CROSSCHECK BACKUPSET 507, 509;
Deleting Datafile Copies: Example This example deletes a specified datafile copy:
DELETE NOPROMPT DATAFILECOPY '?/oradata/users01.cpy';
RECOVER
RECOVER
Syntax
recover::=
,
=
DEVICE TYPE
deviceSpecifier
RECOVER
recoverOptionList
recoverObject
recoverObject::=
=
WITH TAG
COPY OF
tag_name
dbObject
,
DATAFILECOPY
filename
dbObject
,
FOREVER
SKIP
TABLESPACE
tablespace_name
untilClause
dbObject::=
DATABASE
,
DATAFILE
datafileSpec
,
TABLESPACE
tablespace_name
recoverOptionList::=
RECOVER
,
ALLOW
integer
CORRUPTION
=
ARCHIVELOG TAG
tag_name
=
AUXILIARY DESTINATION
location
CHECK LOGICAL
CHECK READONLY
MAXSIZE
sizeSpec
DELETE ARCHIVELOG
=
FROM TAG
tag_name
NOPARALLEL
NOREDO
integer
PARALLEL
,
UNDO TABLESPACE
tablespace_name
TEST
sizeSpec::=
G
K
M
integer
Purpose
The RECOVER command has three distinct uses:
When performing media recovery, RMAN first looks for archived logs on disk, and if
none are available, then it restores logs from backups to the LOG_ARCHIVE_DEST_1
destination (or the SET ARCHIVELOG DESTINATION) as needed for the recovery.
Complete and point-in-time recovery of a database can use both incremental backups
and archived logs. If RMAN has a choice between applying an incremental backup or
applying redo, then it always chooses the incremental backup. Applying incremental
backups is faster and captures NOLOGGING changes. If overlapping levels of
incremental backup are available, then RMAN automatically chooses the one covering
the longest period of time.
RMAN also applies incremental backups to restored files that were not restored from
an incremental backup.
RECOVER
Note:
See Also:
You cannot arbitrarily recover individual datafiles to different points in time. You
can recover the whole database to a single point in time (DBPITR, in which case
you should useSET UNTIL, followed by RESTORE DATABASE and RECOVER
DATABASE) or recover wholly contained tablespaces to a point in time different
from the rest of the database (TSPITR, in which case you must use RECOVER
TABLESPACE... UNTIL...). For more information on DBPITR, see Oracle
Database Backup and Recovery Advanced User's Guide. For more information on
TSPITR, see the procedure described in Oracle Database Backup and Recovery
Advanced User's Guide .
For whole database recovery, the database must be mounted but not open. For
recovery of datafiles or tablespaces, the target database must be mounted or open,
but if the database is open, then the datafiles or tablespaces to be recovered must
be offline.
The RECOVER DATABASE command does not recover any files that are offline
normal or read-only at the point in time to which the files are being recovered.
RMAN omits offline normal files with no further checking. If CHECK READONLY is
specified, then RMAN checks each read-only file on disk to ensure that it is
already current at the desired point in time. If CHECK READONLY is not specified,
then RMAN skips read-only files completely during the RECOVER command.
You must open the database with the RESETLOGS option after incomplete
recovery or recovery with a backup control file.
If RMAN is unable to restore files needed for the recovery operation from the first
backup it tries, it uses restore failover to try to restore the file from other suitable
backups. See Oracle Database Backup and Recovery Advanced User's Guide for details
on restore failover.
If the recovery operation requires that RMAN restore archived log redo or
incremental backups from backup, then you must either configure channels for the
devices from which files are to be restored (disk or SBT) or use ALLOCATE
CHANNEL commands in a RUN block with your RECOVER command.
You must have already configured a device type with the CONFIGURE DEVICE
TYPE command (except for DISK, which is preconfigured) before specifying the
DEVICE TYPE option.
You cannot manually allocate channels and then run RECOVER with the DEVICE
TYPE option.
RECOVER
Description
Allocates automatic channels for the specified device type only. For example,
if you configure automatic disk and tape channels, and issue
RECOVERDEVICE TYPE DISK..., then RMAN allocates only disk channels.
See Also: "deviceSpecifier" on page 2-101
RECOVER
recoverObject
Syntax Element
Description
COPY OF
At least one copy of each datafile that you are recovering must exist.
Incremental backups taken after the image copy that you are recovering
must exist.
RMAN selects one suitable copy if there are multiple possible copies to which
the incrementals can be applied to carry out the operation.
Note: RMAN issues a warning (not an error) if it cannot recover to the
specified time (or current time if none is specified) because no incrementals
are available.
WITH TAG 'tag_name'
DATAFILECOPY
untilClause
Specifies a past time, SCN, or log sequence number for termination of the
RECOVER command. When used with one or more tablespaces, indicates a
TSPITR operation for the named tablespaces. It cannot be used with RECOVER
DATAFILE. It should not be used for RECOVER DATABASE (see "Restrictions
and Usage Notes" for details). After DBPITR, you must open the database
with the RESETLOGS option.
See Also: "untilClause" on page 2-228
dbObject
Syntax Element
Description
DATABASE
RECOVER
Syntax Element
Description
DATAFILE datafileSpec
TABLESPACE
'tablespace_name'
recoverOptionList
Syntax Element
Description
recoverOptionList
Specifies the tag for an archived log backup to be used during recovery. If the
tagged backup does not contain all the necessary logs for recovery, RMAN
uses logs or incremental backups as needed from whatever is available. Note
that tag names are not case sensitive and display in all uppercase.
AUXILIARY DESTINATION [
= ] 'location'
CHECK LOGICAL
Tests data and index blocks that pass physical corruption checks for logical
corruption, for example, corruption of a row piece or index entry. If RMAN
finds logical corruption, it logs the block in the alert.log and server session
trace file.
The MAXCORRUPT setting represents the total number of physical and logical
corruptions permitted on a file. By default, MAXCORRUPT is 0, so that if there
are any corrupt blocks, media recovery fails. If recovery including corrupt
blocks is permissible, then set MAXCORRUPT to the smallest number of corrupt
blocks that causes media recovery to fail. For example, to tolerate one corrupt
block, set MAXCORRUPT to 1.
If the total number of physical and logical corruptions detected for a file is less
than its MAXCORRUPT setting, then the RMAN command completes and the
database populates V$DATABASE_BLOCK_CORRUPTION with corrupt block
ranges. Otherwise, the command terminates without populating
V$DATABASE_BLOCK_CORRUPTION.
CHECK READONLY
Checks the headers of read-only files to ensure that they are current before
omitting them from the recovery.
RECOVER
Syntax Element
Description
DELETE ARCHIVELOG
[MAXSIZE integer [K|M|G]]
Deletes archived logs restored from backups or copies that are no longer
needed. RMAN does not delete archived logs that were already on disk before
the RESTORE command started.
If you do not specify MAXSIZE, then RMAN deletes restored archived logs as
they are applied. If you specify MAXSIZE, then RMAN will not use more than
integer amount of disk space for restored archived logs. If recovery requires
the restore of a log larger than the MAXSIZE value, then RMAN reports an
error indicating that you should increase the MAXSIZE value. If MAXSIZE is
smaller than the backup set containing the logs, then RMAN must read the
backup set more than once to extract the logs. In this situation, RMAN issues a
warning that MAXSIZE should be increased.
Note: If archived redo logs are restored to the flash recovery area then the
DELETE ARCHIVELOG option is enabled by default.
Specifies the tag for an incremental backup to be used during recovery. If the
tagged backup does not contain all the necessary incrementals for recovery,
then RMAN uses logs or incremental backups as needed from whatever is
available. Note that tag names are not case sensitive and display in all
uppercase.
See Also: "BACKUP" on page 2-22 to learn how a tag can be applied to an
individual copy of a duplexed backup set, and to learn about the default
filename format for backup tags
NOREDO
TEST
Use the TEST clause to conduct a trial recovery. A trial recovery is useful if a
normal recovery procedure has encountered some problem. It lets you look
ahead into the redo stream to detect possible additional problems. The trial
recovery applies redo in a way similar to normal recovery, but it does not
write changes to disk, and it rolls back its changes at the end of the trial
recovery.
Note: You can use this clause only if you have restored a backup taken since
the last RESETLOGS operation. Otherwise, the database returns an error.
UNDO TABLESPACE
RECOVER
Syntax Element
Description
ALLOW integer CORRUPTION The ALLOW integer CORRUPTION clause lets you specify, in the event of
logfile corruption, the number of corrupt blocks that can be tolerated while
allowing recovery to proceed.
When you use this clause during trial recovery (that is, in conjunction with the
TEST clause), integer can exceed 1. When using this clause during normal
recovery, integer can only be 0 or 1.
NOPARALLEL
PARALLEL [integer]
Examples
The following example
takes tablespace tools offline, uses automatic channels to restore and recover it
(deleting the logs that it restored from tape), then brings it back online:
Recovering a Tablespace in an Open Database: Example
Performing DBPITR with a Backup Control File and Recovery Catalog: Example
Assume that all datafiles and control files as well as archived redo log 40 were lost due
to a disk failure. Also assume that you do not have incremental backups. You need to
recover the database with available archived redo logs. You do not need to restore
tablespace history because it has not changed since log 40. After connecting to the
target and recovery catalog, follow the example shown here:
RMAN> STARTUP FORCE NOMOUNT;
RMAN> RUN
{
RECOVER
If the database uses locally-managed temporary tablespaces, and you restore a backup
control file, and you do not have a recovery catalog, then you must add tempfiles to
these tablespaces afterwards, using the SQL ALTER TABLESPACE... ADD TEMPFILE
command:
RMAN> SQL "ALTER TABLESPACE temp ADD TEMPFILE ''?/oradata/trgt/temp01.dbf'' REUSE";
Available incremental backups are applied to the datafile copy to recover it to the
desired point in time. Redo from the archived redo logs is not applied by this
command.
REGISTER
REGISTER
Syntax
register::=
REGISTER DATABASE
Purpose
To register the target database in the recovery catalog so that RMAN can access it.
RMAN obtains all information it needs to register the target database from the target
database itself.
If you perform a RESETLOGS operation on a database and
later register it in the recovery catalog, the catalog records the
DB_NAME for the old incarnations as UNKNOWN because the old
incarnations were not previously registered. You should not try to
remove these records.
Note:
You must be connected to the target database and recovery catalog database.
You can register multiple databases in the same recovery catalog, but the database
identifiers of the databases must be unique.
The REGISTER DATABASE command fails when RMAN detects duplicate DBIDs.
This situation can arise when databases are created by copying files from an
existing database rather than by using the DUPLICATE command.
If this failure occurs, then you can change the DBID of the copied database with
the standalone DBNEWID utility.
If you are using RMAN with different target databases that
have the same database name and DBID, be careful to always
specify the correct recovery catalog schema when invoking RMAN.
Note:
See Also:
REGISTER
Example
Registering a Database: Example The following commands register a new target
database, catalogs an existing datafile copy, then opens the database for use:
% rman TARGET / CATALOG rman/rman@catdb
RMAN> STARTUP FORCE MOUNT;
RMAN> REGISTER DATABASE;
RMAN> CATALOG DATAFILECOPY '?/oradata/system01.cpy';
RMAN> ALTER DATABASE OPEN;
RELEASE CHANNEL
RELEASE CHANNEL
Syntax
release::=
=
RELEASE CHANNEL
channel_id
Purpose
To release a channel while maintaining the connection to the target database instance.
Specify the channel name with the same identifier used in the ALLOCATE CHANNEL
command. This command is optional because RMAN automatically releases all
channels allocated when a RUN block terminates.
Description
channel_id
Examples
This example makes three identical backup sets of
datafiles 1 to 4 to tape with channel ch1, then releases it. RMAN then makes three
identical backups of datafiles 5 to 7 to tape with channel ch2 and then releases it:
RUN {
SET BACKUP COPIES = 3;
ALLOCATE CHANNEL ch1 DEVICE TYPE sbt FORMAT 'bkup_%U';
ALLOCATE CHANNEL ch2 DEVICE TYPE sbt MAXPIECESIZE = 5M;
BACKUP CHANNEL ch1 DATAFILE 1,2,3,4;
RELEASE CHANNEL ch1;
BACKUP DATAFILE 5,6,7;
}
releaseForMaint
releaseForMaint
Syntax
releaseForMaint::=
RELEASE CHANNEL
Purpose
To release a sequential I/O device specified in an ALLOCATE CHANNEL FOR
MAINTENANCE command. Note that maintenance channels are unaffected by
ALLOCATE CHANNEL and RELEASE CHANNEL command issued within a RUN
command.
Requirements
Execute this command only at the RMAN prompt, not within a RUN block.
Examples
This example
allocates and then releases a maintenance channel to the media manager:
REPLACE SCRIPT
REPLACE SCRIPT
Syntax
replaceScript::=
=
GLOBAL
REPLACE
SCRIPT
COMMENT
comment
script_name
backupCommands
{
maintenanceCommands
miscellaneousCommands
restoreCommands
;
FROM FILE
filename
Purpose
To replace an existing script stored in the recovery catalog. If the script does not exist,
then REPLACE SCRIPT creates it.
A stored script is a sequence of RMAN commands, given a name and stored in the
recovery catalog for later execution. A stored script may be local (that is, associated
with one target database) or global (available for use with any database registered in
the recovery catalog).
For more information about stored scripts and commands used to create, update,
delete and execute stored scripts, see "CREATE SCRIPT" on page 2-91.
Description
GLOBAL
'script_name'
REPLACE SCRIPT
Syntax Element
Description
COMMENT ='comment'
The new contents of the script are to be read from this file. The first line of the
file must begin with a "{", the last line must contain a "}" and the commands
must be valid within a RUN block.
{ backupCommands
Commands valid in a stored script. These are the same commands supported
within a RUN block. See "RUN" on page 2-195 for more details about
backupCommands, restoreCommands, maintenanceCommands, and
miscellaneousCommands.
| maintenanceCommands
| miscellaneousCommands
| restoreCommands
}
Example
Replacing a Recovery Catalog Script: Example This example updates a stored script
called backup_full:
REPLACE SCRIPT backup_full
COMMENT 'Run this to back up the database'
{
# uses configured channel for default device type
BACKUP DATABASE;
}
REPORT
REPORT
Syntax
report::=
=
DAYS
integer
INCREMENTAL
RECOVERY WINDOW OF
integer
DAYS
=
REDUNDANCY
integer
NEED BACKUP
reportObject
obsOperandList
REPORT
OBSOLETE
atClause
SCHEMA
UNRECOVERABLE
reportObject
=
DEVICE TYPE
deviceSpecifier
;
reportObject::=
,
SKIP TABLESPACE
tablespace_name
DATABASE
,
DATAFILE
datafileSpec
,
TABLESPACE
tablespace_name
atClause::=
=
AT SCN
integer
=
=
AT SEQUENCE
THREAD
integer
integer
=
AT TIME
date_string
Purpose
To perform detailed analyses of the RMAN repository. The Database writes the output
from the REPORT command to standard output or the message log file.
Use the REPORT command to answer questions such as the following:
REPORT
Description
NEED BACKUP
Lists all datafiles in need of a new backup. The report assumes that you will
use the most recent backup for restore operations. If you do not specify any
option, then RMAN uses the current retention policy configuration. If the
retention policy is disabled (CONFIGURE RETENTION POLICY TO NONE),
RMAN generates an error.
DAYS = integer
Lists all datafiles requiring more than the specified number of days' worth of
archived redo log files for complete recovery. For example, REPORT NEED
BACKUP DAYS 7 DATABASE shows the datafiles whose recovery requires more
than seven days' worth of archived redo logs.
If the target database control file is mounted and current, then RMAN makes
the following optimizations to this report:
INCREMENTAL = integer
Files that are offline and whose most recent backup contains all changes
to the file are not included.
Files that were offline and are now online, and whose most recent backup
contains all changes up to the offline time, are only reported if they have
been online for more than the specified number of days.
RECOVERY WINDOW OF
integer DAYS
Reports datafiles for which there are not sufficient backups to satisfy a
recovery window-based retention policy for the specified number of days,
that is, datafiles without sufficient backups for point-in-time recovery to any
point back to the time SYSDATE - integer.
REDUNDANCY = integer
Specifies the minimum number of backups or copies that must exist for a
datafile to be considered not in need of a backup. In other words, a datafile
needs a backup if there are fewer than integer backups or copies of this file.
For example, REDUNDANCY 2 means that if there are fewer than two copies or
backups of a datafile, then it needs a new backup.
REPORT
Syntax Element
Description
OBSOLETE obsOperandList
Lists full backups, datafile copies, and archived logs recorded in the RMAN
repository that can be deleted because they are no longer needed. The
subclause obsOperandList describes the criteria that RMAN uses to determine
what is obsolete. If you do not specify parameters in obsOperandList, then
RMAN uses the options specified in CONFIGURE RETENTION POLICY. If
you use this option in conjunction with DEVICE TYPE, then RMAN only
considers backups and copies created on the specified device.
Note: Even if you use a KEEP UNTIL clause to specify a time after which a
backup is to be considered obsolete, RMAN does not consider that backup
obsolete if it is needed to satisfy the specified retention policy. A KEEPUNTIL
clause can cause a backup to be kept longer than the retention policy requires,
but never a shorter time.
SCHEMA
Lists the names of all datafiles and tablespaces at the specified point in time.
UNRECOVERABLE
Specifies the type of storage device. RMAN only considers backups and
copies available on the specified device for its report.
reportObject
Syntax Element
Description
reportObject
Specifies the datafiles to be included in the report. The report can include the
entire database (optionally skipping certain tablespaces), a list of tablespaces,
or a list of datafiles.
Note: RMAN includes objects from prior incarnations.
DATAFILE datafileSpec
Lists the specified datafiles. RMAN reports on backups or datafile copies that
contain at least one of the specified datafiles.
TABLESPACE
'tablespace_name'
DATABASE
Lists backups or datafile copies of all files in the current database. Specify
SKIP TABLESPACE tablespace_name to exclude the specified tablespace
from the DATABASE specification.
atClause
Syntax Element
Description
atClause
AT TIME = 'date_string'
AT SCN = integer
Specifies an SCN.
AT SEQUENCE = integer
THREAD = integer
Specifies a log sequence number for a specified redo THREAD number. The
integer indicates the time when the specified log and thread were first opened.
REPORT
Report Output
The information that appears in the output is described in the following tables:
Table 223, " Report of Files that Need Backup Due to Unrecoverable Operations"
Table 224, " Report of Files with Fewer Than n Redundant Backups"
Table 225, " Report of Files Whose Recovery Needs More Than n Days of
Archived Logs"
Table 226, " Report of Files That Need More than n Incrementals During
Recovery"
Table 221
Column
Indicates
File
K-bytes
Tablespace
RB segs
Datafile Name
Tempfile Name
Table 222
Column
Indicates
Type
Key
Completion Time
Filename/handle
Table 223
Column
Indicates
File
Type Of Backup
Required
Name
REPORT
Table 224
Column
Indicates
File
#bkps
Name
Table 225
Report of Files Whose Recovery Needs More Than n Days of Archived Logs
Column
Indicates
File
Days
Name
Table 226
Column
Indicates
File
Incrementals
Name
Examples
Reporting Database Schema: Example This example, which requires a recovery
catalog, reports the names of all datafiles and tablespaces one week ago:
REPORT SCHEMA AT TIME 'SYSDATE-7';
Report of database schema
File K-bytes
Tablespace
---- ---------- -------------------1
307200 SYSTEM
2
20480 UNDOTBS
3
10240 CWMLITE
4
10240 DRSYS
5
10240 EXAMPLE
6
10240 INDX
7
10240 TOOLS
8
10240 USERS
RB segs
------***
***
***
***
***
***
***
***
Datafile Name
------------------/oracle/oradata/trgt/system01.dbf
/oracle/oradata/trgt/undotbs01.dbf
/oracle/oradata/trgt/cwmlite01.dbf
/oracle/oradata/trgt/drsys01.dbf
/oracle/oradata/trgt/example01.dbf
/oracle/oradata/trgt/indx01.dbf
/oracle/oradata/trgt/tools01.dbf
/oracle/oradata/trgt/users01.dbf
REPORT
/oracle/oradata/trgt/drsys01.dbf
Reporting Datafiles Needing Backups: Example The following example reports all
datafiles from tablespace SYSTEM that will need more than two days of archived redo
logs to be applied during recovery after being restored from the most recent backup:
REPORT NEED BACKUP DAYS 2 TABLESPACE SYSTEM;
Report of files whose recovery needs more than 2 days of archived logs
File Days Name
---- ----- ----------------------------------------------------1
3
/oracle/oradata/trgt/drsys01.dbf.f
RESET DATABASE
RESET DATABASE
Syntax
reset::=
RESET DATABASE TO INCARNATION
primaryKey
Purpose
To reset the incarnation of the target database in the RMAN repository, which means
to do either of the following actions:
Inform RMAN that the SQL statement ALTER DATABASE OPEN RESETLOGS has
been executed and that a new incarnation of the target database has been created.
Note that if you run the RMAN command ALTER DATABASE OPEN RESETLOGS
(not the SQL statement with the same keywords), then RMAN resets the target
database automatically so that you do not have to run RESET DATABASE. By
resetting the database, RMAN considers the new incarnation as the current
incarnation of the database.
To reset the database to a previous incarnation. Typically, you would reset the
incarnation when performing incomplete recovery to a point before a RESETLOGS
operation, or when attempting to undo the affects of a RESETLOGS by restoring
backups taken before a RESETLOGS.
RESET DATABASE
Description
TO INCARNATION
primary_key
Examples
Resetting RMAN to a Previous Incarnation in NOCATALOG Mode: Example In
NOCATALOG mode, you must mount a control file that knows about the incarnation
that you want to recover. The following scenario makes an old incarnation of database
trgt current again:
CONNECT TARGET / NOCATALOG
# step 1: start and mount a control file that knows about the incarnation to which
# you want to return. if the current control file does not know about it, then
# you must restore an older control file
STARTUP NOMOUNT;
RESTORE CONTROLFILE UNTIL TIME 'SYSDATE-250';
ALTER DATABASE MOUNT;
# step 2: obtain the primary key of old incarnation
LIST INCARNATION OF DATABASE trgt;
List of
DB Key
------1
1
Database Incarnations
Inc Key DB Name DB ID
------- -------- ------------2
TRGT
1334358386
116
TRGT
1334358386
STATUS
------PARENT
CURRENT
Reset SCN
---------154381
154877
Reset Time
---------OCT 30 2001 16:02:12
OCT 30 2001 16:37:39
Database Incarnations
Inc Key DB Name DB ID
------- -------- ---------------2
TRGT
1334358386
116
TRGT
1334358386
311
TRGT
1334358386
STATUS
------PARENT
PARENT
CURRENT
Reset SCN
---------154381
154877
154877
Reset Time
---------OCT 30 2001 16:02:12
OCT 30 2001 16:37:39
AUG 13 2002 17:17:03
Resetting the Database After Incomplete Recovery: Example This example assumes
that an incomplete recovery or recovery with a backup control file was performed in
NOCATALOG mode. Later, RMAN is started in CATALOG mode, but the RESYNC
command fails because the incarnation has not been reset in the catalog.
% rman target / catalog rman/rman@catdb
Recovery Manager: Release 10.1.0.2.0 - Production
RESET DATABASE
===========================================================
=============== ERROR MESSAGE STACK FOLLOWS ===============
===========================================================
failure of resync command on default channel at 11/01/2001 12:00:43
target database incarnation not found in recovery catalog
RESTORE
RESTORE
Syntax
restore::=
restoreSpecOperand
RESTORE
restoreObject
CHANNEL
channel_id
CHECK LOGICAL
CHECK READONLY
,
=
DEVICE TYPE
deviceSpecifier
FORCE
BACKUPSET
FROM
DATAFILECOPY
=
FROM TAG
tag_name
RECALL
SUMMARY
PREVIEW
untilClause
VALIDATE
;
restoreObject::=
archivelogRecordSpecifier
TO
filename
CONTROLFILE
,
FOREVER
SKIP
TABLESPACE
tablespace_name
DATABASE
,
DATAFILE
datafileSpec
=
PFILE
TO
filename
FOR DB_UNIQUE_NAME
identifier
quoted_string
SPFILE
TO
filename
STANDBY CONTROLFILE
,
TABLESPACE
tablespace_name
restoreSpecOperand::=
RESTORE
CHANNEL
channel_id
autoBackupOptList
AUTOBACKUP
FROM
media_handle
=
FROM TAG
tag_name
autoBackupOptList::=
=
DB_NAME
MAXDAYS
database_name
=
integer
MAXSEQ
DB_NAME
database_name
RECOVERY AREA
DB_RECOVERY_FILE_DEST
quoted_string
=
DB_UNIQUE_NAME
identifier
quoted_string
Purpose
The primary use of RESTORE is to restore files from backups or image copies.
Typically, you restore when a media failure has damaged a current datafile, control
file, or archived log or prior to performing a point-in-time recovery.
There are other uses of RESTORE that do not actually restore files from backup:
RESTORE... VALIDATE causes RMAN to select existing backups that it would use
to perform a RESTORE operation, and scan them all to ensure that they are present
and free of corruption.
RESTORE... PREVIEW identifies the backups which RMAN will use to perform
any RESTORE operation. Output from a RESTORE... PREVIEW is in the same
format as the output of the LIST command.
RESTORE... PREVIEW RECALL is used to request the recall of backups needed for
a RESTORE operation that are stored on remote storage.
RMAN chooses which backups to restore based on the criteria that you specify. For
example, you can limit the restore to backups before a given point of time (within the
current incarnation) with the untilClause.
RESTORE
If you run RESTORE in this configuration, then RMAN allocates three sbt channels
and the two preconfigured DISK channels.
Restore Failover
If a backup piece, image copy or proxy copy is inaccessible (for instance, deleted from
the device) or if a block is corrupted, then the RESTORE command automatically looks
for a another usable copy of this backup piece or image copy on both the same device
and other devices. If no usable copies are available, then RMAN searches for prior
backups. RMAN continously searches for prior usable backups until it has exhaused
all possibilities.
Restore failover also occurs when restoring archivelogs for use in RECOVER,
BLOCKRECOVER and FLASHBACK operations. RMAN records messages about
failover due to block corruption in the alert log and trace files.
See Oracle Database Backup and Recovery Advanced User's Guide for details on restore
failover.
For an overview of the encrypted backups mechanism, a guide to its use and
information on choosing among the different modes of encryption, see "Encryption of
Backup Sets" on page 2-28 and the extended discussion in Oracle Database Backup and
Recovery Advanced User's Guide.
RESTORE
The RMAN CONFIGURE, SET and SHOW commands are used to manage the RMAN
backup encryption settings for your database. See the reference entries for those
commands for more details.
Note:
To restore to a new location, run SET NEWNAME commands to rename the datafiles
and SWITCH commands to make them the current database files. If you do not
use SWITCH, then the repository lists restored datafiles as datafile copies.
If you use the FROM DATAFILECOPY option, then the allocated channels must be
of DEVICE TYPE DISK.
If you use the FROM BACKUPSET clause, then channels for the appropriate type of
storage devices must be allocated for the backup sets that need to be restored. For
example, if needed backups are only available on tape, and no SBT channels have
been allocated, then RMAN cannot find a candidate backup set to restore, and the
RESTORE command fails.
RMAN only restores backups that were created on the same type of channels that
are allocated for the RESTORE command.
For example, if you made some backups of a datafile to DISK channels and others
to sbt channels, and only a DISK channel is allocated for the RESTORE command,
RMAN will not restore backups that were created on sbt channels.
If there are no backups available for a lost datafile, RMAN will create an empty
datafile with the checkpoint change as creation SCN. During recovery, all archived
logs back to the creation of the datafile will be restored, and all changes during the
history of the datafile will be re-applied to re-create its contents.
If datafile names are symbolic links, that is, files pointing to other files, then the
control file stores the filenames of the link files but RMAN performs I/O on the
RESTORE
datafiles pointed to by the link files. If a link file is lost and you RESTORE a datafile
without re-creating the symbolic link, then RMAN restores the datafile to the
location of the link file rather than to the location pointed to by the link.
If the database is started but not mounted in NOCATALOG mode, then the RESTORE
SPFILE command requires the FROM AUTOBACKUP clause.
If you are restoring the server parameter file and the control file in a disaster
recovery situation, you cannot run RESTORE CONTROLFILE FROM AUTOBACKUP,
mount this control file, and then run RESTORE SPFILE without the FROM
AUTOBACKUP clause.
Do not specify a datafile more than once in a restore job. For example, the
following command is illegal because datafile 1 is both specified explicitly and
implied by the SYSTEM tablespace:
RESTORE TABLESPACE SYSTEM DATAFILE 1;
You must have already configured a device type by using CONFIGURE (except for
DISK, which is preconfigured) before specifying the DEVICE TYPE option.
You cannot manually allocate channels and then run RESTORE DEVICE TYPE.
When you run RESTORE with a backup control file while connected to a recovery
catalog, RMAN automatically updates the control file to reflect the structure of the
restored database, based on the information in the recovery catalog.
RMAN can back up and restore dictionary-managed temporary tablespaces, but it
cannot back up locally managed temporary tablespaces. It can, however, re-create
locally managed temporary tablespaces after a database restore.
RMAN does not support backup and recovery of the change tracking file. Note
that database restore and recovery has no user-visible effect on change tracking.
The change tracking file is re-created upon database restore and recovery, and the
next incremental backup after any recovery is able to use the change-tracking file.
If no suitable backups are available in the current incarnation of the database, then
you can force RMAN to use backups from a previous incarnation. Using the
CHANGE... UNAVAILABLE command, you can make all backups since the
RESETLOGS that ended the incarnation unavailable. Run LIST RECOVERABLE to
see valid parent incarnations.
After you restore a backup control file, you must run RECOVER DATABASE and
then open the database with the RESETLOGS option.
Table 227 indicates the restrictions that apply in different situations involving the
RESTORE CONTROLFILE command.
RESTORE
Table 227
RESTORE
CONTROLFILE;
RESTORE
CONTROLFILE
FROM
AUTOBACKUP;
RESTORE
CONTROLFILE ... TO
'filename';
No catalog,
target started in
NOMOUNT
state
No catalog,
target mounted
or open
Restores only to
filename, where
filename is not in
CONTROL_FILES list.
Catalog, target
started in
NOMOUNT
state
Restores to
CONTROL_FILES
locations. Run SET
DBID only if
DB_NAME not unique
in catalog.
Restores only to
filename, where
filename is not in
CONTROL_FILES list.
Catalog, target
mounted or
open
Restores only to
filename, where
filename is not in
CONTROL_FILES list.
RESTORE
Description
CHANNEL 'channel_id'
CHECK LOGICAL
Tests data and index blocks that pass physical corruption checks for logical
corruption, for example, corruption of a row piece or index entry. If RMAN
finds logical corruption, it logs the block in the alert.log and server session
trace file.
If the total number of physical and logical corruptions detected in a file is less
than its MAXCORRUPT setting, the RMAN command completes and the
database populates the V$DATABASE_BLOCK_CORRUPTION view with
corrupt block ranges. If MAXCORRUPT is exceeded, the command terminates
without populating the views.
If the initialization parameter DB_BLOCK_CHECKSUM=TRUE, and if
MAXCORRUPT and NOCHECKSUM are not set, then specifying CHECK LOGICAL
detects all types of corruption that are possible to detect.
Note: The MAXCORRUPT setting represents the total number of physical and
logical corruptions permitted on a file.
CHECK READONLY
Checks the read-only datafiles to make sure they exist, are readable, and have
the appropriate checkpoint. If any of these conditions is not met, then RMAN
restores the fileswhether or not they are read-only. By default, RMAN does
not restore read-only files when you issue the RESTORE DATABASE command.
Allocates automatic channels for the specified device type only. For example,
if you configure automatic disk and tape channels, and issue
RESTORE...DEVICE TYPE DISK, then RMAN allocates only disk channels.
See Also: "deviceSpecifier" on page 2-101
FORCE
Overrides the restartable restore feature and restores all files regardless of
whether they need to be restored. If you do not specify FORCE, then RMAN
restores a file only if its header information does not match the information in
the control file.
FROM [ BACKUPSET |
DATAFILECOPY ]
PREVIEW
[ SUMMARY | RECALL ]
RESTORE
Syntax Element
Description
untilClause
Limits the selection to backup sets or file copies that are suitable for a
point-in-time recovery to the specified time. In the absence of any other
criteria, RMAN selects the most current file copy or backup set to restore.
Note that the time specified in the untilClause must fall within the current
incarnation.
See Also: "untilClause" on page 2-228
Lets RMAN decide which backup sets, datafile copies, and archived logs need
to be restored, and then scans them to verify their contents. No files are
restored. Use VALIDATE to verify that the backups required to restore the
specified files are intact and usable.
VALIDATE
restoreObject
Syntax Element
Description
restoreObject
archivelogRecordSpecifier
Restores the specified range of archived redo logs. The default restore
location is DB_RECOVERY_FILE_DEST (if one of LOG_ARCHIVE_DEST_n is
configured to USE_DB_RECOVERY_FILE_DEST either implicitly or
explicitly). Otherwise, the default restore filenames are constructed with the
LOG_ARCHIVE_FORMAT and LOG_ARCHIVE_DEST_1 parameters of the
target database. These parameters combine in a port-specific fashion to
derive the name of the restored log. You can override the default location
with the SET ARCHIVELOG DESTINATION command.
Because the RECOVER command automatically restores archived logs as
needed, you should seldom need to restore logs manually. Possible reasons
for manually restoring archived logs are to speed up recovery or to stage
the logs to multiple destinations.
See Also: "archivelogRecordSpecifier" on page 2-18
Note: The database can be started, mounted, or open for this operation.
CONTROLFILE
DATABASE
[ SKIP [ FOREVER ]
TABLESPACE
tablespace_name ]
Restores all datafiles in the database except those that are offline or
read-only. Unlike BACKUP DATABASE, RESTORE DATABASE does not
automatically include the control file and the server parameter fileyou
must issue additional RESTORE CONTROLFILE and RESTORE SPFILE
commands to restore these files.
If you specify the CHECK READONLY option, then RMAN examines the
headers of all read-only datafiles and restores any that need restoring.
Use an optional SKIPTABLESPACE 'tablespace_name' argument to
avoid restoring specified tablespaces, which is useful when you want to
avoid restoring tablespaces containing temporary data.
If you specify SKIP FOREVER TABLESPACE, then RMAN specifies the DROP
option of ALTER DATABASE DATAFILE ... OFFLINE when taking the
datafiles that belong to the tablespace offline before the restore. The DROP
option indicates that RMAN does not intend to recover these files and
intends to drop their tablespaces from the database after the database is
opened again. In other words, FOREVER indicates that RMAN never
intends to do anything with the skipped tablespaces again.
RESTORE
Syntax Element
Description
DATAFILE datafileSpec
SPFILE
[TO [PFILE] 'filename']
[FOR DB_UNIQUE_NAME
'DB_UNIQUE_NAME']
STANDBY CONTROLFILE
[ TO 'filename' ]
TABLESPACE
'tablespace_name'
RESTORE
restoreSpecOperand
Syntax Element
Description
restoreSpecOperand
CHANNEL
'channel_id'
FROM AUTOBACKUP
Restores a control file autobackup. You can only specify this option on the
[autoBackupOptionList] RESTORE CONTROLFILE and RESTORE SPFILE commands. When restoring
either type of file in NOCATALOG mode, the FROM AUTOBACKUP clause is
required.
RMAN begins the search on the current day or on the day specified with the
SET UNTIL. On the first day searched, the search begins with sequence
number 256 (or the sequence number specified by MAXSEQ, if provided) and
counts back to sequence 0. If no autobackup is found in the current or SET
UNTIL day, RMAN checks preceding days, starting with sequence 256 and
counting back to 0. The search continues up to MAXDAYS days (default of 7,
maximum of 366) prior to the current or SET UNTIL day. If no autobackup is
found within MAXDAYS days, then RMAN signals an error and the command
stops.
See Also: Table 227 for restrictions and usage notes.
FROM 'media_handle'
Specifies the name of the control file copy or backup piece containing a control
file. The media_handle can be any backup piece that contains a backup of a
control file: the control file backup does not need to be an autobackup.
See Also: Table 227 for restrictions and usage notes.
Overrides the default selection of the most recent backups or file copy
available. The tag restricts the automatic selection to backup sets or file copies
that were created with the specified tag. If multiple backup sets or file copies
have a matching tag, then RMAN selects the most recent one. Note that tag
names are not case sensitive.
See Also: "BACKUP" on page 2-22 for a description of how a tag can be
applied to an individual copy of a duplexed backup set, and for a description
of the default filename format for tags
autoBackupOptList
Syntax Element
Description
autoBackupOptList
DB_NAME =
'database_name'
MAXDAYS = integer
Limits the search for a control file autobackup to within the specified number
of days in the past.
MAXSEQ = integer
Specifies the highest sequence number for the control file autobackup search.
(RECOVERY AREA|
DB_RECOVERY_FILE_DEST)
= password
DB_NAME =
database_name
Provides the DB_NAME of the database in the specified flash recovery area
that is the target of the restore operation.
RESTORE
Syntax Element
Description
DB_UNIQUE_NAME =
{ identifier |
quoted-string }
Examples
Restoring a Tablespace: Example This example takes a tablespace offline, restores it,
then performs media recovery:
SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";
RESTORE TABLESPACE users;
RECOVER TABLESPACE users;
SQL "ALTER TABLESPACE users ONLINE";
Restoring the Control File When Using a Recovery Catalog: Example This example
restores the control file to its default location, replicates it automatically to all
CONTROL_FILES locations, and mounts the database:
RUN
{ # SET DBID is not necessary when connected to a recovery catalog
STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
}
CONNECT TARGET /
STARTUP NOMOUNT;
SET DBID 320066378; # required when restoring control file in NOCATALOG mode
RESTORE CONTROLFILE FROM TAG 'monday_cf_backup';
ALTER DATABASE MOUNT;
Restoring the Database with a Backup Control File: Example This example restores
the control file to a temporary location, replicates it to all control file locations specified
in the CONTROL_FILES initialization parameter, and then restores and recovers the
database:
CONNECT TARGET /
STARTUP NOMOUNT;
SET DBID 320066378; # required when restoring control file in NOCATALOG mode
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;
}
ALTER DATABASE OPEN RESETLOGS;
RESTORE
Restoring the Server Parameter File to Current Location: Example The following
series of commands restores the current server parameter file in NOCATALOG mode:
rman TARGET /
RMAN> SET DBID 1447326980 # set dbid to dbid of target database
RMAN> STARTUP FORCE NOMOUNT; # start instance with dummy SPFILE
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
RESTORE SPFILE FROM AUTOBACKUP; # FROM AUTOBACKUP needed in NOCATALOG mode
}
RMAN> STARTUP FORCE; # start with restored SPFILE and open database
Next Time
--------06-JUN-05
06-JUN-05
06-JUN-05
07-JUN-05
10-JUN-05
BS Key Size
Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------32
256.00K
SBT_TAPE
00:00:01
10-JUN-05
BP Key: 34
Status: AVAILABLE Compressed: NO Tag: TAG20050610T153105
RESTORE
Handle: 17gmknhp_1_1
List
Thrd
---1
1
Media: /v1,17gmknhp_1_1
Next Time
--------10-JUN-05
10-JUN-05
remote storage of backups and supports recalling vaulted backups, the following
command requests that any media needed in the restore of archivelogs from backup be
recalled from remote storage:
RMAN> RESTORE ARCHIVELOG ALL PREVIEW RECALL;
Starting restore at 10-JUN-05
using channel ORA_DISK_1
using channel ORA_SBT_TAPE_1
Next Time
--------06-JUN-05
06-JUN-05
06-JUN-05
07-JUN-05
10-JUN-05
BS Key Size
Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------32
256.00K
SBT_TAPE
00:00:01
10-JUN-05
BP Key: 34
Status: AVAILABLE Compressed: NO Tag: TAG20050610T153105
Handle: 17gmknhp_1_1
Media: /v1,17gmknhp_1_1
List
Thrd
---1
1
Next Time
--------10-JUN-05
10-JUN-05
RESTORE
RESYNC
RESYNC
Syntax
resync::=
FROM CONTROLFILECOPY
RESYNC CATALOG
filename
Purpose
To perform a full resynchronization of the recovery catalog. You can also use RESYNC
CONTROLFILE to resynchronize the current control file with the RMAN repository in a
control file copy.
Resynchronizations can be full or partial. When full, RMAN updates all changed
records for the physical schema: datafiles, tablespaces, redo threads, and online redo
logs. If the database is open, RMAN also obtains data about rollback segments. When
partial, RMAN reads the current control file to update data, but does not
resynchronize metadata about the physical schema or rollback segments.
When you run RESYNC CATALOG, RMAN creates a snapshot control file in order to
obtain a read-consistent view of the control file, then updates the recovery catalog with
any new information from the snapshot. The RESYNC CATALOG command updates the
classes or records described in the following table.
Record Type
Description
Log history
Records that are created whenever a log switch occurs. Note that log
history records describe an online log switch, not a log archival.
Backups
Physical schema
The recovery catalog is unavailable when you issue any of the commands that
automatically perform a resynchronization.
You are running in ARCHIVELOG mode, because the catalog is not updated
automatically when a log switch occurs or when an online redo log is archived.
You have made changes to the physical structure of the target database such as
adding or dropping a tablespace. As with archive operations, the recovery catalog
is not updated automatically when the physical schema changes.
RESYNC
The primary use for RESYNC CONTROLFILE occurs when you re-create the control file
(for example, to change the database name), which causes you to lose RMAN records.
You can then resynchronize the newly created control file with an old copy.
You must be connected to a recovery catalog when running RESYNC CATALOG, but
a catalog connection is not required for RESYNC CONTROLFILE.
RMAN updates physical schema information in the recovery catalog only when
the target database has the current control file mounted. If the target database has
mounted a backup control file, a freshly created control file, or a control file that is
less current than a control file that was used previously, then RMAN does not
update physical schema information in the recovery catalog.
Description
CATALOG
Updates the recovery recovery catalog with RMAN metadata in the current
control file (default) or a control file copy.
CONTROLFILE
Updates the current control file (and recovery catalog, if RMAN is connected
to one) with RMAN metadata from a control file copy.
FROM CONTROLFILECOPY
'filename'
Specifies the name of the control file copy to use for resynchronization.
Physical schema information is not updated when you use this option.
Note: The control file copy can either be in the current database incarnation,
or created in a prior incarnation (that is, prior to the most recent OPEN
RESETLOGS).
Examples
This
example performs a full resynchronization after archiving all unarchived redo logs:
Resynchronizing the Current Control File from a Backup: Example This example
updates the RMAN repository in the current control file with metadata from a backup
control file:
CONNECT TARGET / NOCATALOG
RESYNC CONTROLFILE FROM CONTROLFILECOPY '/tmp/cfile.dbf';
RUN
RUN
Syntax
run::=
backupCommands
RUN
maintenanceCommands
miscellaneousCommands
restoreCommands
backupCommands::=
backup
convert
restoreCommands::=
blockrecover
duplicate
flashback
recover
restore
switchFile
transpt_tbs
maintenanceCommands::=
catalog
change
configure
crosscheck
delete
report
show
validate
miscellaneousCommands::=
RUN
allocate
alterDatabase
executeScript
host
release
resync
send
set
shutdown
sql
startup
Purpose
The RUN command lets you group a series RMAN commands into a block to be
executed sequentially. It also creates a scope within which a script can override
default configured channels for a task using the ALLOCATE CHANNEL and
RELEASE CHANNEL commands, and other parameters using the SET command with
appropriate arguments. On completing the execution of the commands listed in the
RUN block, the channels allocated within the RUN block are released and settings
returned to their values.
Upon reading the closing brace of the RUN block, RMAN compiles the list of job
commands into one or more job steps and then executes the steps immediately.
Examples
Making a Backup: Example This example backs up a database by using a single
manually allocated channel to perform the backup:
RUN
{
ALLOCATE CHANNEL c1 TYPE sbt;
BACKUP DATABASE;
}
RUN
Executing an RMAN Script: Example This example executes the stored script
backup_db:
RUN { EXECUTE SCRIPT backup_db; }
SEND
SEND
Syntax
send::=
,
=
CHANNEL
channel_id
SEND
=
DEVICE TYPE
command
deviceSpecifier
=
PARMS
channel_parms
Purpose
To send a vendor-specific string to one or more channels supported by a media
manager. Refer to your media management documentation to determine which
commands are supported.
You must only SEND commands supported by the media manager. The contents of
the string are not interpreted by the databasethe database, but are passed
unaltered to the media management subsystem.
Description
CHANNEL 'channel_id'
Specifies the type of storage device and sends the command to all channels of
the specified type.
See Also: "deviceSpecifier" on page 2-101
Specifies a vendor-specific media management command.
'command'
Example
Sending a String to the Media Manager: Example
SET
SET
Syntax
set::=
;
SET
setRmanOption
setRunOption
setRmanOption::=
AUXILIARY INSTANCE PARAMETER FILE TO
filename
string
deviceSpecifier
TO
formatSpec
deviceSpecifier
TO
formatSpec
=
DBID
integer
,
DECRYPTION IDENTIFIED BY
ECHO
quoted_string
OFF
ON
ALGORITHM
quoted_string
ONLY
ENCRYPTION
quoted_string
IDENTIFIED BY
DATABASE
FORCE
OFF
ON
setRunOption::=
ARCHIVELOG DESTINATION TO
log_archive_dest
=
BACKUP COPIES
integer
=
string
datafileSpec
DATAFILE
datafileSpec
TEMPFILE
tempfileSpec
TO
TO
NEWNAME FOR
TO
integer
filename
NEW
quoted_string
NEW
untilClause
Purpose
You can use the SET command either at the RMAN prompt or within a RUN block.
When used outside a RUN block, attributes changed by SET remain in effect until you
exit the RMAN client.
SET
Outside of a RUN block, the SET command supports the attributes shown in
"setRmanOption" on page 2-201. Use this form of the SET command to:
Within a RUN block, the SET command supports the attributes shown in
"setRunOption" on page 2-203. Changes made with SET within a RUN block persist
until the end of the RUN block, or the next SET command that changes the value of the
same attribute.
Use SET specified within a RUN block to:
Specify that backup sets should be duplexed, that is, multiple copies should be
created of each backup piece in the backup set.
Override the default format for control file autobackups at the session level.
The SET BACKUP COPIES command affects all backups in the RUN block after
issuing the command and is in effect until explicitly disabled or changed. The SET
BACKUP COPIES command does not affect previous backups.
SET BACKUP COPIES does not apply to the BACKUP AS COPY command.
You cannot use SET NEWNAME TO NEW when creating a duplicate or standby
database or performing RMAN TSPITR.
SET
You are not connected to a recovery catalog and want to restore the control file or
server parameter file.
You are connected to a recovery catalog and want to restore the control file, but the
database name is not unique in the recovery catalog.
The server parameter file is lost and you want to restore it.
See Also:
Description
AUXILIARY INSTANCE
PARAMETER FILE TO
'filename'
COMMAND ID TO 'string'
id=string
id=string, ch=channel_id
The first form appears in the RMAN target database connection. The second
form appears in all allocated channels. When the current job is complete, the
V$SESSION.CLIENT_INFO column will be cleared.
See Also: Oracle Database Reference for more on V$SESSION.CLIENT_INFO
CONTROLFILE AUTOBACKUP
FORMAT FOR DEVICE TYPE
deviceSpecifier TO formatSpec
Overrides the default filename format for the control file autobackup on the
specified device type. The override occurs at the session level only. You can
run this command either in RUN or at the RMAN prompt. The order of
precedence is as follows:
1.
2.
3.
SET
Syntax Element
Description
DECRYPTION IDENTIFIED BY
password [, password... ]
Controls whether RMAN commands are displayed in the message log. When
reading commands from a command file, RMAN automatically echoes those
commands to the message log. When reading commands from standard input,
RMAN does not echo those commands to the message log. To force RMAN to
echo the commands, run the SET ECHO ON command before running your
command file.
The command is useful when stdin and stdout have been redirected. For
example, in UNIX you can redirect RMAN's input and output in this manner:
% rman TARGET sys/pwd@prod1 CATALOG rman/rman@rcat < in_file > out_file
By running SET ECHO ON, you enable the commands contained in in_file to
be visible in out_file.
ENCRYPTION
ALGORITHM
algorithm_name
IDENTIFIED BY
password
Specifies the algorithm used during this RMAN session. Overrides the
configured default encryption algorithm. Possible values are listed in
V$RMAN_ENCRYPTION_ALGORITHMS.
Specifies whether to use a user-specified password in encryption.
[ ONLY ]
See "Encryption of Backup Sets" on page 2-28 for details on the different
encryption modes.
Note: If the password provided is not surrounded by quotes, then it is
translated internally into upper case. Thus, the following are all synonyms for
IDENTIFIED BY "FOO":
{ OFF | ON }
[ FOR ALL TABLESPACES ]
IDENTIFIED BY foo
IDENTIFIED BY Foo
IDENTIFIED BY fOo
SET
setRunOption
Syntax Element
Description
Sets the default name for all subsequent RESTORE or SWITCH commands
that affect the specified datafile. If you do not issue this command before the
datafile restore operation, then RMAN restores the file to its default location.
After you restore a datafile to a new location, then you can run SWITCH to
rename the file in the control file to the NEWNAME. If you do not run SWITCH,
then the restored file functions as a datafile copy and is recorded as such in
the repository.
Note: The SET NEWNAME command supports Automatic Storage Management
disk groups.
See Also: "datafileSpec" on page 2-95
Sets the new tempfile name for a subsequent SWITCH command that renames
the specified tempfile to the specified name. If a filename is passed, that will
be the new name of the tempfile after the database is recovered and opened. If
NEW is passed the new name will be an OMF filename. The tempfile is
created in DB_CREATE_FILE_DEST when the database is opened.
Note: The SET NEWNAME command supports Automatic Storage Management
disk groups.
See Also: "tempfileSpec" on page 2-220
'filename'
NEW
Sets a limit on the number of previously undetected block corruptions that the
database will allow in a specified datafile or group of datafiles. If a BACKUP
or CREATE CATALOG command detects more than the specified number of
corruptions, then the command terminates. The default limit is zero, meaning
that RMAN tolerates no corrupt blocks.
Note: If you specify CHECK LOGICAL, then the MAXCORRUPT limit applies to
the sum of logical and physical corruptions detected. Otherwise,
MAXCORRUPT only applies to the number of physical block corruptions.
See Also: "datafileSpec" on page 2-95
ARCHIVELOG DESTINATION
TO 'log_archive_dest'
SET
Syntax Element
Description
untilClause
Specifies the number of copies of each backup piece that the channels should
create: 1, 2, 3, or 4. The SET BACKUP COPIES command, which affects only the
BACKUP command, affects all channels allocated in the session. The order of
precedence is as follows, with settings higher on the list overriding settings
lower on the list:
BACKUP COPIES
The names of the backup pieces are dependent on the FORMAT clause in the
BACKUP command. You can specify up to four FORMAT strings. RMAN uses
the second, third, and fourth values only when BACKUP COPIES, SET
BACKUP COPIES, or CONFIGURE ... BACKUP COPIES is in effect. When
choosing which format to use for each backup piece, RMAN uses the first
format value for copy 1, the second format value for copy 2, and so on. If the
number of format values exceeds the number of copies, then the extra formats
are not used. If the number of format values is less than the number of copies,
RMAN reuses the format values, starting with the first one.
Note: BACKUP COPIES option is not valid when files are created in flash
recovery area. Backups to the flash recovery area cannot be duplexed..
Note: Control file autobackups on disk are a special case and are never
duplexed: RMAN always writes one and only copy.
COMMAND ID TO 'string'
id=string
id=string, ch=channel_id
The first form appears in the RMAN target database connection. The second
form appears in all allocated channels. When the current job is complete, the
V$SESSION.CLIENT_INFO column will be cleared.
See Also: Oracle Database Reference for more on V$SESSION.CLIENT_INFO
CONTROLFILE AUTOBACKUP
FORMAT FOR DEVICE TYPE
deviceSpecifier TO formatSpec
Overrides the default filename format for the control file autobackup on the
specified device type. The override occurs at the session level only. You can
run this command either in RUN or at the RMAN prompt. The order of
precedence is as follows:
1.
2.
3.
SET
Examples
The
following example uses the DBID to restore the control file because multiple target
databases share the same DB_NAME in the catalog. After you have restored the target
control file, you can mount the database to restore the rest of the database:
Restoring the Control File When Databases Share the Same Name: Example
Setting the Command ID: Example This example sets the command ID, backs up the
users tablespace, then archives the online redo logs:
RUN
{
ALLOCATE CHANNEL t1 DEVICE TYPE DISK FORMAT '/disk1/%U';
ALLOCATE CHANNEL t2 DEVICE TYPE DISK FORMAT '/disk2/%U';
SET COMMAND ID TO 'rman';
BACKUP INCREMENTAL LEVEL 0 MAXSETSIZE 5M TABLESPACE users;
SQL 'ALTER SYSTEM ARCHIVE LOG ALL';
}
Assume that you have used the CONFIGURE
command to set duplexing as follows:
The following example overrides these configurations and makes two copies of each
datafile and archived log in the backup:
RUN
{
ALLOCATE CHANNEL dev1 DEVICE TYPE sbt;
SET BACKUP COPIES = 2;
BACKUP DATAFILE 1,2,3,4,5;
BACKUP ARCHIVELOG ALL;
}
Restoring the Server Parameter File: Example This example restores a lost server
parameter file:
CONNECT TARGET / CATALOG rman/rman@catdb
SET DBID 676549873; # set dbid so rman knows the database name
SET
STARTUP FORCE NOMOUNT # rman starts database with a dummy server parameter file
RESTORE SPFILE;
STARTUP FORCE; # needed so that RMAN restarts database with restored server parameter file
SHOW
SHOW
Syntax
show::=
ALL
ARCHIVELOG
BACKUP COPIES
DELETION POLICY
AUXNAME
BACKUP OPTIMIZATION
=
AUXILIARY
deviceSpecifier
CHANNEL
FORMAT
CONTROLFILE AUTOBACKUP
SHOW
DATABASE
TABLESPACE
EXCLUDE
MAXSETSIZE
RETENTION POLICY
SNAPSHOT CONTROLFILE NAME
Purpose
To display the current CONFIGURE command settings. The output of SHOW consists of
the CONFIGURE commands used to set the configuration. RMAN default
configurations are suffixed with #default.
Description
ALL
ARCHIVELOG BACKUP COPIES Shows the currently configured degree of duplexing for archived redo log
backups.
SHOW
Syntax Element
Description
ARCHIVELOG DELETION
POLICY
AUXNAME
BACKUP OPTIMIZATION
[AUXILIARY] CHANNEL
Displays the CONFIGURE CHANNEL settings. You can specify a normal channel
or an AUXILIARY channel.
Specifies the device type of the channel. For example, SHOW CHANNEL FOR
DEVICE TYPE DISK displays only channel settings for disk channels.
CONTROLFILE AUTOBACKUP
FORMAT
Displays the format for the control file autobackup file for configured devices.
{DATAFILE | ARCHIVELOG}
BACKUP COPIES
Displays the CONFIGURE ... BACKUP COPIES setting for datafiles and
archived redo logs: 1, 2, 3, or 4.
ENCRYPTION
ALGORITHM
Displays the configured default algorithm to use for encryption, when writing
encrypted backup sets. Possible values are listed in
V$RMAN_ENCRYPTION_ALGORITHMS.
FOR
Displays current encryption settings for the database or for each tablespace.
{ DATABASE |TABLESPACE }
EXCLUDE
Displays only the tablespaces that you have specified should be excluded.
MAXSETSIZE
RETENTION POLICY
Displays the settings for CONFIGURE RETENTION POLICY for the current
target database.
Examples
This example shows commands relevant
for displaying automatic channel configurations:
SHOW
SHOW
SHOW
SHOW
CHANNEL;
DEVICE TYPE;
DEFAULT DEVICE TYPE;
MAXSETSIZE;
SHOW
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
SHUTDOWN
SHUTDOWN
Syntax
shutdown::=
ABORT
IMMEDIATE
NORMAL
TRANSACTIONAL
SHUTDOWN
Purpose
To shut down the target database without exiting RMAN. This command is equivalent
to using the SQL*Plus SHUTDOWN statement.
See Also: Oracle Database Administrator's Guide for information on
how to start up and shut down a database, and SQL*Plus User's
Guide and Reference for SHUTDOWN syntax
You cannot use the RMAN SHUTDOWN command to shut down the recovery
catalog database. To shut down this database, start a SQL*Plus session and issue a
SHUTDOWN statement.
The NORMAL, TRANSACTIONAL, and IMMEDIATE options all perform a clean close
of the database. The ABORT option does not cleanly close the database; the
database will perform instance recovery at startup.
If the database operates in NOARCHIVELOG mode, then you must shut down the
database cleanly and then issue a STARTUP MOUNT before a making a backup.
Description
ABORT
IMMEDIATE
SHUTDOWN
Syntax Element
Description
NORMAL
Shuts down the database with normal priority (default option), which means:
TRANSACTIONAL
Shuts down the target database while minimizing interruption to clients, with
the following consequences:
Examples
Shutting Down a Database by Using the Immediate Option: Example This example
waits for current SQL transactions to be processed before shutting down, then mounts
the database:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
SPOOL
SPOOL
Syntax
spool::=
APPEND
OFF
SPOOL LOG
TO
filename
Purpose
To write RMAN output to a log file.
If the file does not already exist, then RMAN creates it. If the file does exist, then
RMAN overwrites the file by default. If you specify APPEND, RMAN will append its
output to the end of the file.
If the specified file cannot be opened for writing. Instead, RMAN turns SPOOL to OFF
and continues execution.
See Also:
Description
OFF
TO filename
Specifies the name of the log file to which RMAN directs its output. RMAN
creates the file if it does not exist, or overwrites the file if it does exist.
APPEND
Specifies that RMAN should append its output to the end of the existing log.
Examples
This example directs RMAN output to
standard output for the backup of datafile 1, then directs output to a log file for the
backup of datafile 2, then directs output to a different log file for the whole database
backup:
BACKUP DATAFILE 1;
SPOOL LOG TO '/tmp/df2log.f';
BACKUP DATAFILE 2;
SPOOL LOG OFF;
SPOOL LOG TO '/tmp/dblog.f';
BACKUP DATABASE;
SPOOL LOG OFF;
SQL
SQL
Syntax
sql::=
SQL
command
Purpose
To execute a SQL statement or a PL/SQL stored procedure from within Recovery
Manager.
If the string that RMAN passes to PL/SQL contains a filename, then the filename
must be enclosed in duplicate single quotes and the entire string following the SQL
keyword must be enclosed in double quotes. For example, use the following syntax:
SQL "CREATE TABLESPACE temp1 DATAFILE ''?/oradata/trgt/temp1.dbf''
SIZE 10M TEMPORARY";
If you attempt to use single quotes for the string following the SQL keyword or use
only one set of single quotes for the filename, then the command fails.
Description
'command'
Specifies a SQL statement for execution. For example, issue the following at
the RMAN prompt to archive the online redo logs:
SQL 'ALTER SYSTEM ARCHIVE LOG ALL';
Examples
Archiving the Unarchived Online Logs: Example This example backs up a tablespace
SQL
Executing a PL/SQL Stored Procedure Within RMAN: Example This example issues
a PL/SQL stored procedure called scott.update_log:
RUN
{
SQL ' BEGIN scott.update_log; END; ';
}
STARTUP
STARTUP
Syntax
startup::=
DBA
FORCE
MOUNT
NOMOUNT
=
PFILE
filename
STARTUP
Purpose
To start the target database from within the RMAN environment. This command is
equivalent to using the SQL*Plus STARTUP command. You can:
Start the instance and mount the database, but leave it closed.
Start the instance, and mount and open the database in:
Additionally, the RMAN STARTUP command can start an instance in NOMOUNT mode
even if no server parameter file or initialization parameter file exists. This feature is
useful when you need to restore a lost server parameter file.
See Also: Oracle Database Administrator's Guide to learn how to
start up and shut down a database, and SQL*Plus User's Guide and
Reference for SQL*Plus STARTUP syntax
You cannot use the RMAN STARTUP command to open the recovery catalog
database: execute a STARTUP statement in a SQL*Plus session instead.
Description
STARTUP
If you specify only STARTUP with no other options, then the instance starts,
then mounts and open the database.
DBA
FORCE
If the database is open, then FORCE shuts down the database with a
SHUTDOWN ABORT statement before re-opening it.If the database is closed,
then FORCE opens the database.
MOUNT
STARTUP
Syntax Element
Description
NOMOUNT
Starts the instance without mounting the database. If no parameter file exists,
then RMAN starts the instance with a "dummy" parameter file. You can then
run RESTORE SPFILE to restore a backup server parameter file.
PFILE = 'filename'
Specifies the filename of the init.ora file for the target database. If this
parameter is not specified, then the default init.ora filename is used.
Examples
Opening the Database by Using the Default Parameter File: Example
This example
This example
forces a SHUTDOWN ABORT and then mounts the database with restricted access,
specifying a nondefault parameter file location:
SWITCH
SWITCH
Syntax
switch::=
DATABASE
,
SWITCH
DATAFILE
datafileSpec
TO COPY
TABLESPACE
tablespace_name
switchFile::=
DATAFILE ALL
filename
TO DATAFILECOPY
SWITCH
=
TAG
DATAFILE
tag_name
datafileSpec
TEMPFILE ALL
TO
TEMPFILE
filename
tempfileSpec
Purpose
To specify that a datafile copy is now the current datafile, that is, the datafile pointed
to by the control file. A SWITCH is equivalent to using the PL/SQL ALTER DATABASE
RENAME FILE statement: the names of the files in the RMAN repository are updated,
but the database does not actually rename the files at the operating system level. Note
that this command deletes the RMAN repository records for the datafile copy from the
recovery catalog and updates the control file records to status DELETED.
Execute the forms of SWITCH in the switch syntax diagram outside of a RUN
block. Execute the forms of SWITCH in the switchFile syntax diagram within a
RUN block.
If RMAN is connected to a recovery catalog, and the database is using a control
file restored from backup, SWITCH updates the control file with records of any
datafiles known to the recovery catalog but missing from the control file.
Description
DATABASE TO COPY
Renames the datafiles and control files to use the filenames of image copies of
these files. RMAN switches to the latest image copy of each file.
After a database switch, RMAN considers the previous database files as
datafile copies.
SWITCH
Syntax Element
Description
DATAFILE datafileSpec
TO COPY
Specifies the datafile that you wish to rename. As with DATABASE TO COPY,
specifies to switch this datafile to the latest image copy.
After the switch, the control file no longer considers the specified file as
current.
TABLESPACE
'tablespace_name'
TO COPY
Switches all datafiles within the tablespace, as with SWITCH DATAFILE ...
TO COPY.
switchFile
Syntax Element
Description
DATAFILE ALL
Specifies that all datafiles for which a SET NEWNAME FOR DATAFILE command
has been issued in this job are switched to their new name.
DATAFILE datafileSpec
TO DATAFILECOPY
{'filename'
| TAG = 'tag_name'
}
Specifies the datafile that you wish to rename. After the switch, the control file
no longer considers the specified file as current. For example, this command
points the control file from tbs_1.f to cp1.f:
SWITCH DATAFILE '?/dbs/tbs_1.f' TO DATAFILECOPY '?/dbs/copies/cp1.f';
If you do not specify a TO option, then RMAN uses the filename specified on a
prior SET NEWNAME command in the RUN block for this file number as the
switch target.
The filename or tag provided in the TO DATAFILECOPY clause specifies the
input copy file for the switch, that is, the datafile copy that you wish to
rename. Specify the file by filename or tag. For example, the following
command sets df2.copy as the filename for datafile 2:
SWITCH DATAFILE 2 TO DATAFILECOPY '?/dbs/df2.copy';
Note that if you specify a tag and more than one copy uses this tag name, then
RMAN uses the most current copy, that is, the one needing the least recovery.
The following command switches datafile 3 to the most recently created
datafile copy tagged mondayPMcopy:
SWITCH DATAFILE 3 TO DATAFILECOPY TAG mondayPMcopy;
TEMPFILE ALL
Specifies that all tempfiles for which a SET NEWNAME FOR TEMPFILE
command has been issued in this job are switched to their new name.
TEMPFILE tempFileSpec TO {
quoted_string | NEW
Examples
Switching Datafile Filenames After a Restore: Example This example allocates one
disk device and one tape device to allow RMAN to restore from disk and tape.
RUN
{
ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
ALLOCATE CHANNEL dev2 DEVICE TYPE sbt;
SQL "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE";
SET NEWNAME FOR DATAFILE '/disk7/oracle/tbs11.f'
TO '/disk9/oracle/tbs11.f';
RESTORE TABLESPACE tbs_1;
SWITCH DATAFILE ALL;
RECOVER TABLESPACE tbs_1;
SQL "ALTER TABLESPACE tbs_1 ONLINE";
}
SWITCH
Renaming a Tempfile Using SET NEWNAME and SWITCH TEMPFILE: Example This
example demonstrates using SET NEWNAME to specify a new name for a tempfile, and
SWITCH to actually rename the tempfile to the specified name. Note that the database
is not open at the start of this procedure. The tempfile is re-created when the database
is opened.
RUN
{
SET NEWNAME FOR TEMPFILE 1 TO '/newdisk/dbs/temp1.f';
SWITCH TEMPFILE 1;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;
}
Renaming Tempfiles Using SET NEWNAME and SWITCH TEMPFILE ALL: Example
This example demonstrates using SET NEWNAME to specify new names for several
tempfiles, and SWITCH TEMPFILE ALL to actually rename the tempfiles to the
specified names. The database must be offline at the beginning of this procedure. The
tempfiles are re-created at the new locations when the database is opened.
RUN
{
SET NEWNAME FOR TEMPFILE 1 TO '/newdisk/dbs/temp1.f';
SET NEWNAME FOR TEMPFILE 2 TO '/newdisk/dbs/temp2.f';
SET NEWNAME FOR TEMPFILE 3 TO NEW; #use OMF for this one
SWITCH TEMPFILE ALL;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;
}
Renaming Tempfiles Using SET NEWNAME and SWITCH TEMPFILE ALL: Example
This example illustrates specifying names for tempfiles when duplicating a database
for standby.
RUN
{
SET NEWNAME FOR TEMPFILE 1 TO '/newdisk/dbs/temp1.f';
SET NEWNAME FOR TEMPFILE 2 TO '/newdisk/dbs/temp2.f';
SET NEWNAME FOR TEMPFILE 3 TO '/newdisk/dbs/temp3.f';
DUPLICATE DATABASE FOR STANDBY;
}
tempfileSpec
tempfileSpec
Syntax
tempFileSpec::=
filename
integer
Purpose
A subclause that specifies a tempfile by name or absolute file number.
You can specify an absolute path name, or a path name relative to the Oracle
home.
Double and single quotes are both legal (although only single quotes are shown in
the diagram).
Use ? to represent the Oracle home and @ for the Oracle SID.
See Also: "Placeholders" on page 1-2 to learn about the difference
between single and double quotes, as well as the behavior of
environment variables in RMAN quoted strings
You can use the REPORT SCHEMA command or the V$TEMPFILE control file view
to get information about the current tempfiles.
Description
'filename'
Specifies the datafile by using either the full path or a relative filename. If you
specify a relative filename, the filename is qualified in a platform-specific
manner by the target database.
integer
Specifies the datafile by absolute file number. Obtain the file number from the
V$TEMPFILE view or REPORT SCHEMA.
Examples
Specifying a Tempfile by Filename: Example This example renames tempfile
?/oradata/trgt/tmp1.f to /newdisk/tmp1.f, specifying it by filename:
RUN {
SWITCH TEMPFILE ?/oradata/trgt/tmp1.f TO /newdisk/tmp1.f;
}
Note that the database must not be open when performing this example.
Specifying a Tempfile by Absolute File Number: Example This example renames
tempfileSpec
Note that the database must not be open when performing this example.
TRANSPORT TABLESPACE
TRANSPORT TABLESPACE
Syntax
transpt_tbs::=
,
TRANSPORT TABLESPACE
transpt_tbs_optList
tablespace_name
transpt_tbs_optlist::=
=
AUXILIARY DESTINATION
location
DATAPUMP DIRECTORY
DUMP FILE
datapump_directory
=
EXPORT LOG
filename
IMPORT SCRIPT
=
TABLESPACE DESTINATION
tablespace_destination
untilClause
Purpose
To create transportable tablespace sets from RMAN backups, instead of the live
datafiles of the source database. Also, to create transportable tablespace sets that are
recovered to a point in time in the past instead of the present time.
There are also limitations specific to creating a transportable tablespace set using
RMAN:
You must have a backup of all needed tablespaces (including those in the auxiliary
set) and archived redo log files available for use by RMAN that can be recovered
to the target point in time for the TRANSPORT TABLESPACE operation.
TRANSPORT TABLESPACE
Note: If RMAN is not part of the backup strategy for your database,
you can still use RMAN TRANSPORT TABLESPACE, as long as the
needed datafile copies and archived redo logs are available on disk.
Use the RMAN CATALOG command to record the datafile copies and
archived logs in the RMAN repository. You can then use TRANSPORT
TABLESPACE. See Oracle Database Backup and Recovery Basics for details
on using CATALOG.
You also have the option of using RMAN to back up your database
specifically to create backups for use in creating a transportable
tablespace set from backup.
Because the RMAN process for creating transportable tablespaces from backup
uses the Data Pump Export and Import utilities, you cannot use this process if the
tablespaces to be transported use XMLTypes. In such a case, you must use the
process documented in Oracle Database Administrator's Guide.
Because RMAN creates the automatic auxiliary instance used for restore and
recovery on the same node as the source instance, there is some performance
overhead during the operation of the TRANSPORT TABLESPACE command.
If you drop a tablespace, then you cannot later use TRANSPORT TABLESPACE to
include that tablespace in a transportable tablespace set, even if the SCN for
TRANSPORT TABLESPACE is earlier than the SCN at which the table was dropped.
If you renname a tablespace, you cannot use TRANSPORT TABLESPACE to create a
transportable tablespace set as of a point in time before the tablespace was
renamed. (RMAN has no information about the previous name of the tablespace.)
You cannot TRANSPORT tables without their associated constraints, or constraints
without their associated tables.
Neither the transportable set nor the auxiliary set datafiles can contain any of the
following:
Partial tables
TRANSPORT TABLESPACE
If the database has re-used the control file records for the RMAN repository that
contained information about backups required for the TRANSPORT TABLESPACE
process, then the process fails because RMAN cannot locate the required backups.
You may be able to use CATALOG to add the needed backups to the RMAN
repository if they are still available, but if the database is already overwriting
control file records you may lose records of other needed backups.
Description
tablespace_name
transpt_tbs_oplist
Syntax Element
Description
AUXILIARY DESTINATION
Optional argument that specifies the location for files for the auxiliary
instance. The SET NEWNAME and CONFIGURE AUXNAME can be used to
override this argument for individual files, and the
DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT initialization
parameters can be used instead of AUXILIARY DESTINATION, if using your
own initialization parameter file to customize the auxiliary instance. See
Oracle Database Backup and Recovery Advanced User's Guide for details on the
interactions among the different methods of naming the auxiliary instance
files.
DATAPUMP DIRECTORY
DUMP FILE
Optional argument that specifies where to create the export dump file. If not
specified, the export dump file is named dmpfile.dmp and stored in the
location specified by the DATAPUMP DIRECTORY clause or in the tablespace
destination.
EXPORT LOG
Optional argument that specifies the location of the log generated by Data
Pump Export. If omitted, the export log is named explog.log and stored in
the location specified by the DATAPUMP DIRECTORY clause or in the
tablespace destination.
IMPORT SCRIPT
Optional argument that specifies the filename for the sample input script
generated by RMAN for use in plugging in the transported tablespace at the
destination database. If omitted, the import script is named impscript.sql.
The script is stored in the tablespace destination.
TABLESPACE DESTINATION
Argument that specifies the directory where the datafiles for the transported
tablespaces are left at the end of the tablespace transport operation.
untilClause
Examples
Creating Transporable Tablespaces from Backup with TRANSPORT TABLESPACE:
Example In this example, the tablespaces for the transportable set are tbs_2 and
TRANSPORT TABLESPACE
In this
example, the tablespaces for the transportable set are tbs_2 and tbs_3, the
transportable set files are to be stored at /disk1/transport_dest, and the
transportable tablespaces are to be recovered to a specific SCN:
UNREGISTER DATABASE
UNREGISTER DATABASE
Syntax
unregister::=
database_name
NOPROMPT
UNREGISTER DATABASE
Purpose
To unregister a database from the recovery catalog.
See Also: "DROP DATABASE" on page 2-103 to learn how to
delete a database and unregister it with one command.
Description
database_name
Specifies the name of the target database that you are unregistering. You do
not have to specify db_name if RMAN is connected to the target database.
NOPROMPT
Specifies that RMAN should not prompt for confirmation before unregistering
the database.
Example
Unregistering a Database: Example In this example, you connect to the target
database test1 and then unregister it:
rman TARGET SYS/oracle@test1 CATALOG rman/rman@catdb
RMAN> UNREGISTER DATABASE NOPROMPT;
UNREGISTER DATABASE
{
SET DBID 1334531173;
# specifies test database by DBID
UNREGISTER DATABASE testdb NOPROMPT;
}
untilClause
untilClause
Syntax
untilClause::=
=
UNTIL SCN
integer
=
=
THREAD
UNTIL SEQUENCE
integer
integer
restore_point_name
=
UNTIL TIME
date_string
Purpose
A subclause that specifies an upper limit by time, SCN, restore point or log sequence
number for various RMAN operations.
See Also: Oracle Database Backup and Recovery Basics to learn how
to set the date format used by RMAN
When specifying dates in RMAN commands, the date string must be either:
SET UNTIL RESTORE POINT can only be used when the database is mounted,
because the defined restore points are recorded in the control file. For example,
you cannot use SET UNTIL RESTORE POINT to specify the target point in time for
a RESTORE CONTROLFILE operation.
Description
Specifies an SCN as an upper limit. RMAN selects only files that can be used
to restore or recover up to but not including the specified SCN. For example,
RESTORE DATABASE UNTIL SCN 1000 chooses only backups that could be
used to recover to SCN 1000.
Specifies a restore point, so that the SCN at which the restore point was
created is the upper limit. RMAN selects only files that can be used to restore
or recover up to but not including the corresponding SCN.
Note: The database must be mounted when using SET UNTIL RESTORE
POINT.
untilClause
Syntax Element
Description
Specifies a redo log sequence number and thread as an upper limit. RMAN
selects only files that can be used to restore or recover up to but not including
the specified sequence number. For example, REPORT OBSOLETE UNTIL
SEQUENCE 8000 THREAD 1 reports only backups that could be used to
recover through log sequence 7999.
UNTIL TIME =
'date_string'
Specifies a time as an upper limit. RMAN selects only files that can be used to
restore and recover up to but not including the specified time. For example,
LIST BACKUP UNTIL TIME 'SYSDATE-7' lists all backups that could be used
to recover to a point one week ago.
Examples
This
example assumes that log sequence 1234 was lost due to a disk failure and the
database needs to be recovered by using available archived redo logs.
RUN
{
SET UNTIL SEQUENCE 1234 THREAD 1;
RESTORE CONTROLFILE ;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE; # recovers through log 1233
ALTER DATABASE OPEN RESETLOGS;
}
STARTUP MOUNT;
RUN
{
SET UNTIL RESTORE POINT before_batch;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
}
UPGRADE CATALOG
UPGRADE CATALOG
Syntax
upgradeCatalog::=
;
UPGRADE CATALOG
Purpose
To upgrade the recovery catalog schema from an older version to the version required
by the RMAN executable. For example, if you use a release 8.0 recovery catalog with a
release 8.1 version of RMAN, then you must upgrade the catalog.
Note that UPGRADE CATALOG does not run scripts to perform the upgrade. Instead,
RMAN sends various SQL DDL statements to the recovery catalog to update the
recovery catalog schema with new tables, views, columns, and so forth.
You must be connected to the catalog database, and the catalog database must be
open. You do not have to be connected to the target database.
You must enter the UPGRADE command twice in a row to confirm the upgrade.
You will receive an error if the recovery catalog is already at a version greater than
needed by the RMAN executable. RMAN permits the command to be run if the
recovery catalog is already current, however, so that the packages can be
re-created if necessary. RMAN displays all error messages generated during the
upgrade in the message log.
Example
Upgrading a Recovery Catalog: Example This example connects to recovery catalog
database recdb at the operating system command line and then upgrades it to a more
current version:
% rman CATALOG rcat/rcat@recdb
connected to recovery catalog database
PL/SQL package rcat.DBMS_RCVCAT version 08.00.04 in RCVCAT database is too old
RMAN> UPGRADE CATALOG
recovery catalog owner is rcat
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> UPGRADE CATALOG
recovery catalog upgraded to version 09.00.01
DBMS_RCVMAN package upgraded to version 09.00.01
DBMS_RCVCAT package upgraded to version 09.00.01
VALIDATE
VALIDATE
Syntax
validate::=
CHECK LOGICAL
,
VALIDATE BACKUPSET
=
DEVICE TYPE
primaryKey
,
deviceSpecifier
;
Purpose
To examine a backup set and report whether it can be restored. RMAN scans all of the
backup pieces in the specified backup sets and looks at the checksums to verify that
the contents are intact so that the backup can be successfully restored if necessary.
The VALIDATE BACKUPSET command tests whether the
backup sets can be restored, whereas CROSSCHECK examines the
headers of the specified files if they are on disk or queries the media
management catalog if they are on tape.
Note:
Use this command when you suspect that one or more backup pieces in a backup set
are missing or have been damaged. Use VALIDATE BACKUPSET to specify which
backups to test; use the VALIDATE option of the RESTORE command to let RMAN
choose which backups to validate. For validating image copies, run RESTORE
VALIDATE FROM DATAFILECOPY.
If you do not have automatic channels configured, manually allocate at least one
channel before executing a VALIDATE BACKUPSET statement.
The target instance must be started.
Description
primary_key
CHECK LOGICAL
Tests data and index blocks in the backup set that pass physical corruption
checks for logical corruption, for example, corruption of a row piece or index
entry. If RMAN finds logical corruption, then it logs the block in the
alert.log and server session trace file. The RMAN command completes
and V$DATABASE_BLOCK_CORRUPTION is populated with corrupt block
ranges.
Note: VALIDATE does not use MAXCORRUPT.
VALIDATE
Syntax Element
Description
Allocates automatic channels for the specified device type only. This option is
valid only if you have configured automatic channels and have not manually
allocated channels. For example, if you configure automatic disk and tape
channels, and run VALIDATE ...DEVICE TYPE DISK, RMAN allocates only
disk channels.
See Also: "deviceSpecifier" on page 2-101
Example
Validating a Backup Set: Example
3
Recovery Catalog Views
This chapter contains descriptions of recovery catalog views. You can only access these
views if you have created a recovery catalog. For a summary of the recovery catalog
views, refer to "Summary of RMAN Recovery Catalog Views" on page 3-1.
These views are not normalized, but are optimized for
RMAN and Enterprise Manager usage. Hence, most catalog views
have redundant values that result from joining of several
underlying tables.
Note:
Corresponding V$ View
RC_ARCHIVED_LOG
V$ARCHIVED_LOG
RC_BACKUP_ARCHIVELOG_DETAILS
V$BACKUP_ARCHIVELOG_
DETAILS
RC_BACKUP_ARCHIVELOG_
SUMMARY
V$BACKUP_ARCHIVELOG_
SUMMARY
RC_BACKUP_CONTROLFILE
V$BACKUP_CONTROLFILE
RC_BACKUP_CONTROLFILE_DETAILS V$BACKUP_CONTROLFILE_
DETAILS
RC_BACKUP_CONTROLFILE_
SUMMARY
V$BACKUP_CONTROLFILE_
SUMMARY
RC_BACKUP_COPY_DETAILS
V$BACKUP_COPY_DETAILS
RC_BACKUP_COPY_SUMMARY
V$BACKUP_COPY_SUMMARY
RC_BACKUP_CORRUPTION
V$BACKUP_CORRUPTION
Corresponding V$ View
RC_BACKUP_DATAFILE
V$BACKUP_DATAFILE
RC_BACKUP_DATAFILE_DETAILS
V$BACKUP_DATAFILE_
DETAILS
RC_BACKUP_DATAFILE_SUMMARY
V$BACKUP_DATAFILE_
SUMMARY
RC_BACKUP_FILES
V$BACKUP_FILES
RC_BACKUP_PIECE
V$BACKUP_PIECE
Backup pieces
RC_BACKUP_PIECE_DETAILS
V$BACKUP_PIECE_DETAILS
RC_BACKUP_REDOLOG
V$BACKUP_REDOLOG
RC_BACKUP_SET
V$BACKUP_SET
RC_BACKUP_SET_DETAILS
V$BACKUP_SET_DETAILS
RC_BACKUP_SET_SUMMARY
V$BACKUP_SET_SUMMARY
RC_BACKUP_SPFILE
V$BACKUP_SPFILE
RC_BACKUP_SPFILE_DETAILS
RC_BACKUP_SPFILE_SUMMARY
RC_CHECKPOINT
n/a
RC_CONTROLFILE_COPY
V$CONTROLFILE_COPY
RC_COPY_CORRUPTION
V$COPY_CORRUPTION
RC_DATABASE
V$DATABASE
RC_DATABASE_BLOCK_CORRUPTION V$DATABASE_BLOCK_
CORRUPTION
RC_DATABASE_INCARNATION
V$DATABASE_INCARNATION
RC_DATAFILE
V$DATAFILE
RC_DATAFILE_COPY
V$DATAFILE_COPY
RC_LOG_HISTORY
V$LOG_HISTORY
RC_OFFLINE_RANGE
V$OFFLINE_RANGE
RC_RMAN_OUTPUT
V$RMAN_OUTPUT
RC_PROXY_ARCHIVEDLOG
V$PROXY_ARCHIVEDLOG
Corresponding V$ View
RC_PROXY_ARCHIVELOG_DETAILS
V$PROXY_ARCHIVELOG_
DETAILS
RC_PROXY_ARCHIVELOG_SUMMARY V$PROXY_ARCHIVELOG_
SUMMARY
RC_PROXY_CONTROLFILE
V$PROXY_CONTROLFILE
RC_PROXY_COPY_DETAILS
V$PROXY_COPY_DETAILS
RC_PROXY_COPY_SUMMARY
V$PROXY_COPY_SUMMARY
RC_PROXY_DATAFILE
V$PROXY_DATAFILE
RC_REDO_LOG
RC_REDO_THREAD
V$THREAD
RC_RESYNC
n/a
Recovery catalog
resynchronizations
RC_RMAN_BACKUP_JOB_DETAILS
V$RMAN_BACKUP_JOB_
DETAILS
RC_RMAN_BACKUP_SUBJOB_DETAILS V$RMAN_BACKUP_SUBJOB_
DETAILS
RC_RMAN_BACKUP_TYPE
V$BACKUP_TYPE
RC_RMAN_CONFIGURATION
V$RMAN_CONFIGURATION
RC_RMAN_STATUS
V$RMAN_STATUS
RC_STORED_SCRIPT
n/a
RC_STORED_SCRIPT_LINE
n/a
RC_TABLESPACE
V$TABLESPACE
RC_TEMPFILE
V$TEMPFILE
RC_UNUSABLE_BACKUPFILE_
DETAILS
V$UNUSABLE_BACKUPFILE_
DETAILS
RC_ARCHIVED_LOG
RC_ARCHIVED_LOG
This view contains historical information about archived and unarchived redo logs. It
corresponds to the V$ARCHIVED_LOG view in the target database control file.
Oracle inserts an archived redo log record after the online redo log is successfully
archived. If a log that has not been archived is cleared, a record is inserted with the
NAME column set to NULL.
If the log is archived multiple times, then the view will contain multiple archived log
records with the same THREAD#, SEQUENCE#, and RESETLOGS_CHANGE#, but with a
different name.
An archived log record is also inserted when an archived log is restored from a backup
set or a copy.
Note that an archived log can have no record if the record ages out of the control file.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database to which this
record belongs. Use this column to form a join with RC_DATABASE_
INCARNATION.
DB_NAME
VARCHAR2(8)
AL_KEY
NUMBER
The primary key of the archived redo log in the recovery catalog. If you
issue the LIST command while connected to the recovery catalog, this
value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
NAME
VARCHAR2(1024)
THREAD#
NUMBER
SEQUENCE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
The SCN of the most recent RESETLOGS when the record was created.
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS when the record was
created.
FIRST_CHANGE#
NUMBER
FIRST_TIME
DATE
NEXT_CHANGE#
NUMBER
NEXT_TIME
DATE
The first time stamp of the next redo log in the thread.
BLOCKS
NUMBER
BLOCK_SIZE
NUMBER
COMPLETION_TIME
DATE
ARCHIVED
VARCHAR2(3)
Indicates whether the log was archived: YES (archived redo log) or NO
(inspected file header of online redo log and added record to
V$ARCHIVED_LOG). Inspecting the online logs creates archived log
records for them, which allows them to be applied during RMAN
recovery. Oracle sets ARCHIVED to NO to prevent online logs from being
backed up.
RC_ARCHIVED_LOG
Column
Datatype
Description
STATUS
VARCHAR2(1)
IS_STANDBY
VARCHAR2(3)
DICTIONARY_BEGIN
VARCHAR2(3)
DICTIONARY_END
VARCHAR2(3)
IS_RECOVERY_DEST_FILE VARCHAR2(3)
RC_BACKUP_ARCHIVELOG_DETAILS
RC_BACKUP_ARCHIVELOG_DETAILS
RC_BACKUP_ARCHIVELOG_DETAILS provides detailed information about backups of
archived redo log files.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
BTYPE
CHAR(9)
BTYPE_KEY
NUMBER
A unique identifier for the backup type. For backupsets, it is VS_KEY; for
image copies, it is COPY_KEY; for proxy copies it is XAL_KEY.
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
The RECID from the control file for the target database which corresponds
to this RMAN session.
SESSION_STAMP
NUMBER
The STAMP from the control file for the target database which
corresponds to this RMAN session.
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
ID1
NUMBER
For archived logs in backup sets, this column contains SET_STAMP. For
proxy copy or image copy backups, this column contains the RECID from
the control file.
ID2
NUMBER
For archived logs in backup sets, this column contains SET_COUNT. For
image copy or proxy copy backups, this column contains STAMP.
THREAD#
NUMBER
SEQUENCE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
FIRST_CHANGE#
NUMBER
FIRST_TIME
DATE
Time corresponding to starting SCN for this archived redo log file.
NEXT_CHANGE#
NUMBER
NEXT_TIME
DATE
Time corresponding to the ending SCN for this archived redo log file.
FILESIZE
NUMBER
COMPRESSION_RATIO
NUMBER
FILESIZE_DISPLAY
VARCHAR2(4000)
RC_BACKUP_ARCHIVELOG_SUMMARY
RC_BACKUP_ARCHIVELOG_SUMMARY
RC_BACKUP_ARCHIVELOG_SUMMARY contains summary information about backups
of archived redo log files.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
NUM_FILES_BACKED
NUMBER
NUM_DISTINCT_FILES_
BACKED
NUMBER
The number of distinct archived redo log files backed up, where redo logs
are distinguished by unique log sequence number, thread number, and
resetlogs branch.
MIN_FIRST_CHANGE#
NUMBER
The lowest SCN in the range of archived redo log files that have been
backed up.
MAX_NEXT_CHANGE#
NUMBER
The highest SCN in the range of archived redo log files that have been
backed up.
MIN_FIRST_TIME
DATE
The earliest point in time covered by the archived redo log files that have
been backed up.
MAX_NEXT_TIME
DATE
The latest point in time covered by the archived redo log files that have
been backed up.
INPUT_BYTES
NUMBER
The total size in bytes of all archived redo log files that have been backed
up.
OUTPUT_BYTES
NUMBER
COMPRESSION_RATIO
NUMBER
INPUT_BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_BACKUP_CONTROLFILE
RC_BACKUP_CONTROLFILE
This view lists information about control files in backup sets. Note that the
V$BACKUP_DATAFILE view contains both datafile and control file records: a backup
datafile record with file number 0 represents the backup control file. In the recovery
catalog, the RC_BACKUP_CONTROLFILE view contains only control file records, while
the RC_BACKUP_DATAFILE view contains only datafile records.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
BCF_KEY
NUMBER
The primary key of the control file backup in the recovery catalog. If you
issue the LIST command while connected to the recovery catalog, this
value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
RESETLOGS_CHANGE#
NUMBER
The SCN of the most recent RESETLOGS when the record was created.
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS when the record was
created.
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
CREATION_TIME
DATE
BLOCK_SIZE
NUMBER
OLDEST_OFFLINE_RANGE
NUMBER
STATUS
VARCHAR2(1)
BS_RECID
NUMBER
The control file RECID of the backup set that contains this backup
control file.
BS_STAMP
NUMBER
The control file stamp of the backup set that contains this backup control
file.
BS_LEVEL
NUMBER
The incremental level (NULL, 0, 1) of the backup set that contains this
backup control file. Although an incremental backup set can contain the
control file, it is always contains a complete copy of the control file.
There is no such thing as an incremental control file backup.
COMPLETION_TIME
DATE
CONTROLFILE_TYPE
VARCHAR2(1)
BLOCKS
NUMBER
RC_BACKUP_CONTROLFILE
Column
Datatype
Description
AUTOBACKUP_DATE
DATE
AUTOBACKUP_SEQUENCE
NUMBER
RC_BACKUP_CONTROLFILE_DETAILS
RC_BACKUP_CONTROLFILE_DETAILS
RC_BACKUP_CONTROLFILE_DETAILS provides detailed information about control
file backups that can be restored, including backups in control file image copies,
backup sets, and proxy copies.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
BTYPE
CHAR(9)
The type of this control file backup. Possible values are BACKUPSET,
IMAGECOPY or PROXYCOPY.
BTYPE_KEY
NUMBER
Unique identifier for the backup type. If BTYPE is BACKUPSET, this value
is the BS_KEY value for the backup set. If BTYPE is IMAGECOPY, this
value is the value of COPY_KEY for the copy. If BTYPE is PROXYCOPY,
this is the value of XCF_KEY for the proxy copy.
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
The RECID from the control file for the target database which corresponds
to this RMAN session.
SESSION_STAMP
NUMBER
The STAMP from the control file for the target database which
corresponds to this RMAN session.
DB_KEY
NUMBER
DB_NAME
VARCHAR2(8)
ID1
NUMBER
For backups taken as backup sets, this column contains SET_STAMP. For
proxy copy or image copy backups, this column contains the RECID from
the control file.
ID2
NUMBER
For backups taken as backup sets, this column contains SET_COUNT. For
proxy copy or image copy backups, this column contains the value of
STAMP.
CREATION_TIME
DATE
File creation time for the control file that was backed up.
RESETLOGS_CHANGE#
NUMBER
SCN of the resetlogs branch where this control file was backed up.
RESETLOGS_TIME
DATE
Time of the resetlogs branch where this control file was backed up.
CHECKPOINT_CHANGE#
NUMBER
Most recent checkpoint change SCN for the control file that was backed
up.
CHECKPOINT_TIME
DATE
Most recent checkpoint time for the control file that was backed up.
FILESIZE
NUMBER
File size, in bytes, for the output of backing up this control file.
COMPRESSION_RATIO
NUMBER
FILESIZE_DISPLAY
VARCHAR2(4000)
RC_BACKUP_CONTROLFILE_SUMMARY
RC_BACKUP_CONTROLFILE_SUMMARY
RC_BACKUP_CONTROLFILE_SUMMARY provides summary information about control
file backups that can be restored, including backups in control file image copies,
backup sets, and proxy copies.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
NUM_FILES_BACKED
NUMBER
NUM_DISTINCT_FILES_
BACKED
NUMBER
MIN_CHECKPOINT_
CHANGE#
NUMBER
MAX_CHECKPOINT_
CHANGE#
NUMBER
MIN_CHECKPOINT_TIME
DATE
MAX_CHECKPOINT_TIME
DATE
INPUT_BYTES
NUMBER
OUTPUT_BYTES
NUMBER
COMPRESSION_RATIO
NUMBER
INPUT_BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_BACKUP_COPY_DETAILS
RC_BACKUP_COPY_DETAILS
RC_BACKUP_COPY_DETAILS contains detailed information all AVAILABLE control
file and datafile copies. Columns SESSION_KEY, SESSION_RECID, SESSION_STAMP,
and COPY_KEY uniquely identify an RMAN session and datafile copy. Other columns
for this view have the same semantics as in RC_DATAFILE_COPY.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
RSR_KEY
NUMBER
COPY_KEY
NUMBER
FILE#
NUMBER
The absolute file number for the datafile, for datafile copies.
NAME
VARCHAR2(1024)
TAG
VARCHAR2(32)
CREATION_CHANGE#
NUMBER
CREATION_TIME
DATE
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
MARKED_CORRUPT
NUMBER
Number of blocks in the datafile that are marked corrupt, based on RC_
DATABASE_BLOCK_CORRUPTION view.
OUTPUT_BYTES
NUMBER
COMPLETION_TIME
DATE
CONTROLFILE_TYPE
VARCHAR2(1)
The type of control file backed up, for control file copies: B (normal copy)
or S (standby copy). Otherwise, NULL.
KEEP
VARCHAR2(3)
YES, if this copy has a retention policy different from the value for
CONFIGURE RETENTION POLICY. Otherwise, NO.
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the COPY command was specified,
then this column shows the data after which this file copy becomes
obsolete. If the column is NULL and KEEP_OPTIONS is not null, then this
copy never becomes obsolete.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this datafile copy. Possible values are
LOGS (RMAN keeps the logs needed to recover this backup), NOLOGS
(RMAN does not keep the logs needed to recover this backup), or NULL
(this backup has no KEEP options, and becomes obsolete based on the
retention policy.)
IS_RECOVERY_DEST_FILE
VARCHAR2(3)
YES if this copy is located in the flash recovery area. Otherwise, NO.
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_BACKUP_COPY_SUMMARY
RC_BACKUP_COPY_SUMMARY
RC_BACKUP_COPY_SUMMARY contains summary information all AVAILABLE control
file and datafile copies.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
NUM_COPIES
NUMBER
NUM_DISTINCT_COPIES
NUMBER
MIN_CHECKPOINT_
CHANGE#
NUMBER
MAX_CHECKPOINT_
CHANGE#
NUMBER
MIN_CHECKPOINT_TIME
DATE
MAX_CHECKPOINT_TIME
DATE
OUTPUT_BYTES
NUMBER
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_BACKUP_CORRUPTION
RC_BACKUP_CORRUPTION
This view lists corrupt block ranges in datafile backups. It corresponds to the
V$BACKUP_CORRUPTION view in the control file. Note that corruptions are not
tolerated in control file and archived redo log backups.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
PIECE#
NUMBER
BDF_KEY
NUMBER
The primary key for the datafile backup or copy in the recovery catalog.
Use this key to join with RC_BACKUP_DATAFILE. If you issue the list
command while connected to the recovery catalog, this value appears in
the KEY column of the output.
BDF_RECID
NUMBER
BDF_STAMP
NUMBER
FILE#
NUMBER
The absolute file number for the datafile that contains the corrupt blocks.
CREATION_CHANGE#
NUMBER
BLOCK#
NUMBER
The block number of the first corrupted block in this range of corrupted
blocks.
BLOCKS
NUMBER
CORRUPTION_CHANGE#
NUMBER
For media corrupt blocks, this value is zero. For logically corrupt blocks,
this value is the lowest SCN in the blocks in this corrupt range.
MARKED_CORRUPT
VARCHAR2(3)
CORRUPTION_TYPE
VARCHAR2(9)
Same as RC_DATABASE_BLOCK_CORRUPTION.CORRUPTION_TYPE.
RC_BACKUP_DATAFILE
RC_BACKUP_DATAFILE
This view lists information about datafiles in backup sets. It corresponds to the
V$BACKUP_DATAFILE view. A backup datafile is uniquely identified by BDF_KEY.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
BDF_KEY
NUMBER
The primary key of the datafile backup in the recovery catalog. If you
issue the LIST command while connected to the recovery catalog, this
value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
BS_RECID
NUMBER
BS_STAMP
NUMBER
BACKUP_TYPE
VARCHAR2(1)
INCREMENTAL_LEVEL
NUMBER
COMPLETION_TIME
DATE
FILE#
NUMBER
The absolute file number of the datafile. Note that when FILE#=0, the
record refers to the control file. See the note following this table for
special semantics of other columns when FILE#=0.
CREATION_CHANGE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS in the datafile header.
INCREMENTAL_CHANGE#
NUMBER
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
ABSOLUTE_FUZZY_
CHANGE#
NUMBER
The absolute fuzzy SCN. See the note following this table for special
semantics when FILE#=0.
DATAFILE_BLOCKS
NUMBER
RC_BACKUP_DATAFILE
Column
Datatype
Description
BLOCKS
NUMBER
The number of data blocks written to the backup. This value is often less
than DATAFILE_BLOCKS because for full backups, blocks that have
never been used are not included in the backup, and for incremental
backups, blocks that have not changed are not included in the backup.
This value is never greater than DATAFILE_BLOCKS.
BLOCK_SIZE
NUMBER
STATUS
VARCHAR2(1)
The status of the backup set: A (all pieces available), D (all pieces
deleted), O (some pieces are available but others are not, so the backup
set is unusable).
BS_LEVEL
NUMBER
PIECES
NUMBER
The number of backup pieces in the backup set that contains this backup
datafile.
RC_BACKUP_DATAFILE_DETAILS
RC_BACKUP_DATAFILE_DETAILS
RC_BACKUP_DATAFILE_DETAILS provides detailed information about available
datafile backups for databases registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
BTYPE
CHAR(9)
BTYPE_KEY
NUMBER
Unique identifier for the backup type. If BTYPE is BACKUPSET, this value
is the BS_KEY value for the backup set. If BTYPE is IMAGECOPY, this
value is the value of COPY_KEY for the copy.
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_KEY
NUMBER
DB_NAME
VARCHAR2(8)
ID1
NUMBER
For backups taken as backup sets, this column contains SET_STAMP. For
proxy copy or image copy backups, this column contains the RECID from
the control file.
ID2
NUMBER
For backups taken as backup sets, this column contains SET_COUNT. For
proxy copy or image copy backups, this column contains STAMP.
FILE#
NUMBER
CREATION_CHANGE#
NUMBER
The checkpoint SCN at the time that this datafile was created.
CREATION_TIME
DATE
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
The time of the most recent RESETLOGS operation affecting this datafile
INCREMENTAL_LEVEL
NUMBER
INCREMENTAL_CHANGE#
NUMBER
CHECKPOINT_CHANGE#
NUMBER
The current checkpoint SCN for the datafile at the time it was backed up.
CHECKPOINT_TIME
DATE
The time corresponding to the current checkpoint SCN for the datafile at
the time it was backed up.
MARKED_CORRUPT
NUMBER
FILESIZE
NUMBER
COMPRESSION_RATIO
NUMBER
TS#
NUMBER
Tablespace number.
TSNAME
VARCHAR2(30)
FILESIZE_DISPLAY
VARCHAR2(4000)
RC_BACKUP_DATAFILE_SUMMARY
RC_BACKUP_DATAFILE_SUMMARY
RC_BACKUP_DATAFILE_SUMMARY provides summary information about available
backups of datafiles.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_KEY
NUMBER
DB_NAME
VARCHAR2(8)
NUM_FILES_BACKED
NUMBER
NUM_DISTINCT_FILES_
BACKED
NUMBER
Number of distinct files backed up for this value of DB_KEY and DB_
NAME.
NUM_DISTINCT_TS_
BACKED
NUMBER
MIN_CHECKPOINT_
CHANGE#
NUMBER
MAX_CHECKPOINT_
CHANGE#
NUMBER
MIN_CHECKPOINT_TIME
DATE
Minimum checkpoint time for any datafile backed up for this value of DB_
KEY and DB_NAME.
MAX_CHECKPOINT_TIME
DATE
Maximum checkpoint time for any datafile backed up for this value of
DB_KEY and DB_NAME.
INPUT_BYTES
NUMBER
Total input bytes read for all files backed up for this value of DB_KEY and
DB_NAME.
OUTPUT_BYTES
NUMBER
Sum of sizes of all output pieces generated by backups for this value of
DB_KEY and DB_NAME.
COMPRESSION_RATIO
NUMBER
INPUT_BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_BACKUP_FILES
RC_BACKUP_FILES
This view lists backups known to the RMAN repository as reflected in the recovery
catalog. This view corresponds to the V$BACKUP_FILES control file view.
It is usually more convenient to access this information using
the LIST BACKUP and LIST COPY commands from within
RMAN.
Note:
Column
Datatype
Description
PKEY
NUMBER
BACKUP_TYPE
VARCHAR2(32)
FILE_TYPE
VARCHAR2(32)
KEEP
VARCHAR2(3)
Whether this backup has KEEP attributes set that override the retention
policy. Values are YES or NO.
KEEP_UNTIL
DATE
KEEP_OPTIONS
VARCHAR2(13)
"Keep attributes" affecting retention for this backup. Possible values are:
LOGS (retain all redo logs needed to recover this backup as long as
the backup is retained),
NOLOGS (redo logs may be considered obsolete even if this backup
must be retained), and
NULL (let the configured retention policy apply to this backup).
STATUS
VARCHAR2(16)
FNAME
VARCHAR2(1024)
TAG
VARCHAR2(32)
The tag for this backup piece or image copy. (Valid only if FILE_TYPE is
PIECE or COPY.)
MEDIA
VARCHAR2(80)
Media ID for the media on which the backup is stored. Valid only if
BACKUP_TYPE is "BACKUP SET" and FILE_TYPE is "PIECE".
RECID
NUMBER
STAMP
NUMBER
DEVICE_TYPE
VARCHAR2(255)
BLOCK_SIZE
NUMBER
COMPLETION_TIME
NUMBER
COMPRESSED
VARCHAR2(3)
OBSOLETE
VARCHAR2(3)
Whether this backup piece or copy is obsolete. Possible value: YES, NO.
Valid only if FILE_TYPE is PIECE or COPY
RC_BACKUP_FILES
Column
Datatype
Description
BYTES
NUMBER
BS_KEY
NUMBER
BS_COUNT
NUMBER
BS_STAMP
NUMBER
BS_TYPE
VARCHAR2(32)
Type of backup set contents (datafiles or archived redo logs). Valid only
if FILE_TYPE is BACKUP SET.
BS_INCR_TYPE
VARCHAR(32)
BS_PIECES
NUMBER
BS_COPIES
NUMBER
BS_COMPLETION_TIME
DATE
BS_STATUS
VARCHAR2(16)
BS_BYTES
NUMBER
Sum of the sizes of all backup pieces in the backup set. Valid only if
FILE_TYPE is BACKUP SET.
BS_COMPRESSED
VARCHAR2(3)
Whether the backup pieces of this backup set are compressed. Valid
only if FILE_TYPE is BACKUP SET.
BS_TAG
VARCHAR2(1024)
Tag or tags of the backup pieces of this backup set. If pieces have
different tags, BS_TAGS will contain a comma-separated list of all tags
for pieces in the backup set. Valid only if FILE_TYPE is BACKUP SET.
BS_DEVICE_TYPE
VARCHAR2(255)
BP_PIECE#
NUMBER
Number of backup pieces that make up this backup set. Valid only if
FILE_TYPE is BACKUP SET.
BP_COPY#
NUMBER
DF_FILE#
NUMBER
File number of the datafile described by this row. Valid only if FILE_
TYPE is DATAFILE.
DF_TABLESPACE
VARCHAR2(30)
Tablespace name for the datafile described by this row. Valid only if
FILE_TYPE is DATAFILE.
DF_RESETLOGS_CHANGE#
NUMBER
DF_CREATION_CHANGE#
NUMBER
Creation change number of the datafile described by this row. Valid only
if FILE_TYPE is "DATAFILE".
DF_CHECKPOINT_CHANGE# NUMBER
DF_CKP_MOD_TIME
DATE
Checkpoint time of the datafile described by this row. Valid only if FILE_
TYPE is "DATAFILE".
RL_THREAD#
NUMBER
Redo log thread number of the archived redo log described by this row.
Valid only if FILE_TYPE is "ARCHIVED LOG".
RC_BACKUP_FILES
Column
Datatype
Description
RL_SEQUENCE#
NUMBER
Redo log sequence number of the archived redo log described by this
row. Valid only if FILE_TYPE is "ARCHIVED LOG".
RL_RESETLOGS_CHANGE#
NUMBER
Resetlogs change number of the archived redo log described by this row.
Valid only if FILE_TYPE is "ARCHIVED LOG".
RL_FIRST_CHANGE#
NUMBER
First change number in the archived redo log described by this row.
Valid only if FILE_TYPE is "ARCHIVED LOG".
RL_FIRST_TIME
DATE
Time of the first change in the archived redo log described by this row.
Valid only if FILE_TYPE is "ARCHIVED LOG".
RL_NEXT_CHANGE#
NUMBER
Change number after the archived log described by this row. Valid only
if FILE_TYPE is "ARCHIVED LOG".
RL_NEXT_TIME
DATE
Time of the first change after the archived log described by this row.
Valid only if FILE_TYPE is "ARCHIVED LOG".
RC_BACKUP_PIECE
RC_BACKUP_PIECE
This view lists information about backup pieces. This view corresponds to the
V$BACKUP_PIECE view. Each backup set contains one or more backup pieces.
Multiple copies of the same backup piece can exist, but each copy has its own record in
the control file and its own row in the view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DB_ID
NUMBER
BP_KEY
NUMBER
The primary key for the backup piece in the recovery catalog. If you
issue the LIST command while connected to the recovery catalog, this
value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
BACKUP_TYPE
VARCHAR2(1)
INCREMENTAL_LEVEL
NUMBER
PIECE#
NUMBER
The number of the backup piece. The first piece has the value of 1.
COPY#
NUMBER
DEVICE_TYPE
VARCHAR2(255)
HANDLE
VARCHAR2(1024)
COMMENTS
VARCHAR2(255)
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
CONCUR
VARCHAR2(3)
TAG
VARCHAR2(32)
The tag for the backup piece. Refer to description in BACKUP for default
format for tag names.
START_TIME
DATE
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
STATUS
VARCHAR2(1)
BYTES
NUMBER
IS_RECOVERY_DEST_FILE VARCHAR2(3)
This backup piece is located in the flash recovery area: YES or NO.
RC_BACKUP_PIECE_DETAILS
RC_BACKUP_PIECE_DETAILS
RC_BACKUP_PIECE_DETAILS contains detailed information about all available
backup pieces recorded in the recovery catalog. The semantics of most columns are the
same as for the RC_BACKUP_PIECE recovery catalog view.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DBID
NUMBER
BP_KEY
NUMBER
The primary key for the backup piece in the recovery catalog. If you issue
the LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
BACKUP_TYPE
VARCHAR2(1)
The type of backup. Possible values are D for datafile or control file
backups, I for incremental backups, and L for archived log file backups.
INCREMENTAL_LEVEL
NUMBER
PIECE#
NUMBER
The number of the backup piece. The first piece has the value of 1.
COPY#
NUMBER
Indicates the copy number for backup pieces created with duplex enabled.
1 if the backup piece is not duplexed.
DEVICE_TYPE
VARCHAR2(255)
Type of the device on which the backup piece resides. Set to DISK for
backup sets on disk. See also: V$BACKUP_DEVICE
HANDLE
VARCHAR2(1024)
COMMENTS
VARCHAR2(255)
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
CONCUR
VARCHAR2(3)
TAG
VARCHAR2(32)
START_TIME
DATE
RC_BACKUP_PIECE_DETAILS
Column
Datatype
Description
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
STATUS
VARCHAR2(1)
The status of the backup piece. A for backup pieces that are AVAILABLE.
(The value is always A, because this view shows only available backup
pieces.)
BYTES
NUMBER
IS_RECOVERY_DEST_FILE
VARCHAR2(3)
RSR_KEY
NUMBER
COMPRESSED
VARCHAR2(3)
PIECES_PER_SET
NUMBER
Number of backup pieces in the backup set containing this backup piece.
SIZE_BYTES_DISPLAY
VARCHAR2(4000)
RC_BACKUP_REDOLOG
RC_BACKUP_REDOLOG
This view lists information about archived redo logs in backup sets. It corresponds to
the V$BACKUP_REDOLOG view.
You cannot back up online logs directly: you must first archive them to disk and then
back them up. An archived log backup set contains one or more archived logs.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
BRL_KEY
NUMBER
The primary key of the archived redo log in the recovery catalog. If you
issue the LIST command while connected to the recovery catalog, this
value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
BACKUP_TYPE
VARCHAR2(1)
COMPLETION_TIME
DATE
THREAD#
NUMBER
SEQUENCE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
The SCN of the most recent RESETLOGS when the record was created.
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS when the record was
created.
FIRST_CHANGE#
NUMBER
The SCN generated when Oracle switched into the redo log.
FIRST_TIME
DATE
NEXT_CHANGE#
NUMBER
NEXT_TIME
DATE
The first time stamp of the next redo log in the thread.
BLOCKS
NUMBER
BLOCK_SIZE
NUMBER
STATUS
VARCHAR2(1)
The status of the backup set: A (all pieces available), D (all pieces
deleted), O (some pieces are available but others are not, so the backup
set is unusable).
BS_RECID
NUMBER
BS_STAMP
NUMBER
RC_BACKUP_REDOLOG
Column
Datatype
Description
PIECES
NUMBER
RC_BACKUP_SET
RC_BACKUP_SET
This view lists information about backup sets for all incarnations of the database. It
corresponds to the V$BACKUP_SET view. A backup set record is inserted after the
backup has successfully completed.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DB_ID
NUMBER
BS_KEY
NUMBER
The primary key of the backup set in the recovery catalog. If you issue
the LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output.
RECID
NUMBER
The backup set RECID from V$BACKUP_SET. RECID and STAMP form a
concatenated primary key that uniquely identifies this record in the
target database control file. Use either RECID and STAMP or SET_STAMP
and SET_COUNT to access V$BACKUP_SET.
STAMP
NUMBER
The backup set STAMP from V$BACKUP_SET. RECID and STAMP form a
concatenated primary key that uniquely identifies this record in the
target database control file. Use either RECID and STAMP or SET_STAMP
and SET_COUNT to access V$BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
BACKUP_TYPE
VARCHAR2(1)
INCREMENTAL_LEVEL
NUMBER
PIECES
NUMBER
START_TIME
DATE
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
STATUS
VARCHAR2(1)
The status of the backup set: A (all backup pieces available), D (all
backup pieces deleted), O (some backup pieces are available but others
are not, so the backup set is unusable).
CONTROLFILE_INCLUDED
VARCHAR2(7)
Possible values are NONE (backup set does not include a backup control
file), BACKUP (backup set includes a normal backup control file), and
STANDBY (backup set includes a standby control file).
INPUT_FILE_SCAN_ONLY
VARCHAR2(3)
KEEP
VARCHAR2(3)
Indicates whether this backup set has a retention policy different from
the value for CONFIGURE RETENTION POLICY. Possible values are YES
and NO.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this backup set. Options can be LOGS
(RMAN keeps the logs needed to recover this backup), NOLOGS (RMAN
does not keep the logs needed to recover this backup), or NULL (the
backup has no KEEP options and is subject to the default retention
policy).
RC_BACKUP_SET
Column
Datatype
Description
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the BACKUP command was specified,
then this column shows the date after which this backup becomes
obsolete. If the column is NULL and KEEP OPTIONS is not NULL, the
backup never becomes obsolete.
RC_BACKUP_SET_DETAILS
RC_BACKUP_SET_DETAILS
RC_BACKUP_SET_DETAILS provides details about currently available backup sets,
including backup sets created by the use of the BACKUP BACKUPSET command.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog.
RECID
NUMBER
The backup set RECID and STAMP form a concatenated primary key that
uniquely identifies this record in the target database control file.
STAMP
NUMBER
The backup set RECID and STAMP form a concatenated primary key that
uniquely identifies this record in the target database control file.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
BACKUP_TYPE
VARCHAR2(1)
CONTROLFILE_INCLUDED
VARCHAR2(7)
Possible values are NONE (backup set does not include a backup control
file), BACKUP (backup set includes a normal backup control file), and
STANDBY (backup set includes a standby control file).
INCREMENTAL_LEVEL
NUMBER
PIECES
NUMBER
START_TIME
DATE
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
BLOCK_SIZE
NUMBER
The block size used when creating the backup pieces in the backup set.
KEEP
VARCHAR2(3)
Indicates whether this backup set has a retention policy different from the
value for CONFIGURE RETENTION POLICY. Possible values are YES
and NO.
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the BACKUP command was specified,
then this column shows the date after which this backup becomes
obsolete. If the column is NULL and KEEP OPTIONS is not NULL, the
backup never becomes obsolete.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this backup set. Options can be LOGS
(RMAN keeps the logs needed to recover this backup), NOLOGS (RMAN
does not keep the logs needed to recover this backup), or NULL (the
backup has no KEEP options and is subject to the default retention policy).
RC_BACKUP_SET_DETAILS
Column
Datatype
Description
DEVICE_TYPE
VARCHAR2(255)
Device type on which the backup is stored. If the backup set is stored on
more than one type of device (for example, if a backup set created on disk
and still present on disk has also been backed up to tape using BACKUP
BACKUPSET), this column contains "*". For backups on disk, DISK.
Otherwise...
COMPRESSED
VARCHAR2(3)
YES if RMAN's binary compression was used in creating the backup set.
NO, otherwise.
NUM_COPIES
NUMBER
Number of identical copies of this backup set created during the backup,
for example if duplexing was used.
OUTPUT_BYTES
NUMBER
ORIGINAL_INPUT_BYTES
NUMBER
COMPRESSION_RATIO
NUMBER
STATUS
CHAR(1)
The status of the backup set: always A (all backup pieces available),
because this view only reflects available backup sets.
ORIGINAL_INPRATE_
BYTES
NUMBER
Number of bytes read each second when the backup set was initially
created.
OUTPUT_RATE_BYTES
NUMBER
Number of bytes written each second when the backup set was initially
created.
ORIGINAL_INPUT_BYTES_
DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
ORIGINAL_INPRATE_
BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_RATE_BYTES_
DISPLAY
VARCHAR2(4000)
TIME_TAKEN_DISPLAY
VARCHAR2(4000)
RC_BACKUP_SET_SUMMARY
RC_BACKUP_SET_SUMMARY
RC_BACKUP_SET_SUMMARY provides aggregate information about available backup
sets for each database registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
NUM_BACKUPSETS
NUMBER
Total number of available backup sets recorded in the recovery catalog for
this database.
OLDEST_BACKUP_TIME
DATE
Creation time of the oldest available backup set recorded in the recovery
catalog for this database.
NEWEST_BACKUP_TIME
DATE
Creation time of the newest available backup set recorded in the recovery
catalog for this database.
OUTPUT_BYTES
NUMBER
Sum of sizes of all backup pieces for all available backup sets recorded in
the recovery catalog for this database.
ORIGINAL_INPUT_BYTES
NUMBER
Sum of sizes of all input files for all available backup sets recorded in the
recovery catalog forthis database.
ORIGINAL_INPRATE_
BYTES
NUMBER
Average input rate in bytes forthe creation of all available backup sets
recorded in the recovery catalog for this database.
OUTPUT_RATE_BYTES
NUMBER
Average output rate in bytes forthe creation of all available backup sets
recorded in the recovery catalog for this database.
COMPRESSION_RATIO
NUMBER
Aggregate compression ratio for all available backup sets recorded in the
recovery catalog for this database.
ORIGINAL_INPUT_BYTES_
DISPLAY
VARCHAR2(4000)
Total size of all input files stored in all available backup sets recorded in
the recovery catalog for this database.
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
ORIGINAL_INPRATE_
BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_RATE_BYTES_
DISPLAY
VARCHAR2(4000)
RC_BACKUP_SPFILE
RC_BACKUP_SPFILE
This view lists information about server parameter files in backup sets.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
BSF_KEY
NUMBER
The primary key of the server parameter file in the recovery catalog. If
you issue the LIST command while connected to the recovery catalog,
this value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
BS_KEY
NUMBER
The primary key of the backup set to which this record belongs in the
recovery catalog. Use this column to form a join with RC_BACKUP_SET.
SET_STAMP
NUMBER
SET_COUNT
NUMBER
MODIFICATION_TIME
DATE
The time when the server parameter file was last modified.
STATUS
VARCHAR2(1)
The status of the backup set: A (all backup pieces available), D (all
backup pieces deleted), O (some backup pieces are available but others
are not, so the backup set is unusable).
BS_RECID
NUMBER
BS_STAMP
NUMBER
COMPLETION_TIME
DATE
BYTES
NUMBER
RC_BACKUP_SPFILE_DETAILS
RC_BACKUP_SPFILE_DETAILS
RC_BACKUP_SPFILE_DETAILS provides detailed information about SPFILE backups
for each database registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
BS_KEY
NUMBER
SET_STAMP
NUMBER
Set stamp.
SET_COUNT
NUMBER
Set count.
MODIFICATION_TIME
DATE
Modification time.
FILESIZE
NUMBER
FILESIZE_DISPLAY
VARCHAR2(4000)
RC_BACKUP_SPFILE_SUMMARY
RC_BACKUP_SPFILE_SUMMARY
RC_BACKUP_SPFILE_SUMMARY provides summary information about SPFILE
backups for databases registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
NUM_FILES_BACKED
NUMBER
NUM_DISTINCT_FILES_
BACKED
NUMBER
MIN_MODIFICATION_TIME
DATE
MAX_MODIFICATION_TIME
DATE
INPUT_BYTES
NUMBER
INPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_CHECKPOINT
RC_CHECKPOINT
This view is deprecated. See RC_RESYNC on page 3-58 instead.
RC_CONTROLFILE_COPY
RC_CONTROLFILE_COPY
This view lists information about control file copies on disk. A datafile copy record
with a file number of 0 represents the control file copy in V$DATAFILE_COPY.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
CCF_KEY
NUMBER
The primary key of the control file copy in the recovery catalog. If you
issue the LIST command while connected to the recovery catalog, this
value appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
NAME
VARCHAR2(1024)
TAG
VARCHAR2(32)
RESETLOGS_CHANGE#
NUMBER
The SCN of the most recent RESETLOGS when the record was created.
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS when the record was
created.
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
CREATION_TIME
DATE
BLOCK_SIZE
NUMBER
MIN_OFFR_RECID
NUMBER
OLDEST_OFFLINE_RANGE
NUMBER
COMPLETION_TIME
DATE
STATUS
VARCHAR2(1)
CONTROLFILE_TYPE
VARCHAR2(1)
KEEP
VARCHAR2(3)
Indicates whether this copy has a retention policy different from the
value for CONFIGURE RETENTION POLICY. Possible values are YES and
NO.
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the COPY command was specified,
then this column shows the date after which this file becomes obsolete. If
the column is NULL and KEEP OPTIONS is not NULL, the file never
becomes obsolete.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this control file copy. Options can be
LOGS (RMAN keeps the logs needed to recover this backup), NOLOGS
(RMAN does not keep the logs needed to recover this backup), or NULL
(the backup has no KEEP options and is subject to the default retention
policy).
IS_RECOVERY_DEST_FILE VARCHAR2(3)
RC_COPY_CORRUPTION
RC_COPY_CORRUPTION
This view lists corrupt block ranges in datafile copies. It corresponds to the V$COPY_
CORRUPTION view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
RECID
NUMBER
STAMP
NUMBER
CDF_KEY
NUMBER
The primary key of the datafile copy in the recovery catalog. If you issue
the LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output. Use this column to form a join
with RC_DATAFILE_COPY.
COPY_RECID
NUMBER
COPY_STAMP
NUMBER
FILE#
NUMBER
CREATION_CHANGE#
NUMBER
The creation SCN of this data file. Because file numbers can be reused,
FILE# and CREATION_CHANGE# are both required to uniquely identify
a specified file over the life of the database.
BLOCK#
NUMBER
BLOCKS
NUMBER
CORRUPTION_CHANGE#
NUMBER
For media corrupt blocks, this value is zero. For logically corrupt blocks,
this value is the lowest SCN in the blocks in this corrupt range.
MARKED_CORRUPT
VARCHAR2(3)
CORRUPTION_TYPE
VARCHAR2(9)
Same as RC_DATABASE_BLOCK_CORRUPTION.CORRUPTION_TYPE.
RC_DATABASE
RC_DATABASE
This view gives information about the databases registered in the recovery catalog. It
corresponds to the V$DATABASE view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the database. Use this column to form a join with
almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the current incarnation. Use this column to form a
join with RC_DATABASE_INCARNATION.
DBID
NUMBER
NAME
VARCHAR2(8)
RESETLOGS_CHANGE#
NUMBER
The SCN of the most recent RESETLOGS operation when the record was
created.
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS operation when the
record was created.
RC_DATABASE_BLOCK_CORRUPTION
RC_DATABASE_BLOCK_CORRUPTION
This view gives information about database blocks that were corrupted after the last
backup. It corresponds to the V$DATABASE_BLOCK_CORRUPTION view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the database. Use this column to form a join with
almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the current incarnation. Use this column to form a
join with RC_DATABASE_INCARNATION.
FILE#
NUMBER
BLOCK#
NUMBER
The block number of the first corrupted block in this range of corrupted
blocks.
BLOCKS
NUMBER
CORRUPTION_CHANGE#
NUMBER
For media corrupt blocks, this value is zero. For logically corrupt blocks,
this value is the lowest SCN in the blocks in this corrupt range.
CORRUPTION_TYPE
VARCHAR2(9)
ALL ZERO. The block header on disk contained only zeros. The
block may be valid if it was never filled and if it is in an Oracle7
file. The buffer will be reformatted to the Oracle8 standard for an
empty block.
FRACTURED. The block header looks reasonable, but the front and
back of the block are different versions.
CHECKSUM. The optional check value shows that the block is not
self-consistent. It is impossible to determine exactly why the check
value fails, but it probably fails because sectors in the middle of the
block are from different versions.
CORRUPT. The block is wrongly identified or is not a data block (for
example, the data block address is missing)
LOGICAL. Specifies the range is for logically corrupt blocks.
CORRUPTION_CHANGE# will have a nonzero value.
RC_DATABASE_INCARNATION
RC_DATABASE_INCARNATION
This view lists information about all database incarnations registered in the recovery
catalog. Oracle creates a new incarnation whenever you open a database with the
RESETLOGS option. Records about the current and immediately previous incarnation
are also contained in the V$DATABASE view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the database. Use this column to form a join
with almost any other catalog view.
DBID
NUMBER
DBINC_KEY
NUMBER
DB_NAME
VARCHAR2(8)
The DB_NAME for the database at the time of the RESETLOGS. The
value is UNKNOWN if you have done at least one RESETLOGS before
registering the target database with RMAN, because RMAN does
not know the DB_NAME prior to the RESETLOGS.
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
CURRENT_INCARNATION
VARCHAR2(8)
PARENT_DBINC_KEY
NUMBER
PRIOR_RESETLOGS_CHANGE#
NUMBER
The SCN of the RESETLOGS operation that created the parent of this
incarnation.
PRIOR_RESETLOGS_TIME
DATE
The time stamp of the RESETLOGS operation that created the parent
of this incarnation.
RC_DATAFILE
RC_DATAFILE
This view lists information about all datafiles registered in the recovery catalog. It
corresponds to the V$DATAFILE view. A datafile is shown as dropped if its tablespace
was dropped.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this
column to form a join with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
TS#
NUMBER
The number of the tablespace to which the datafile belongs. The TS#
may exist multiple times in the same incarnation if the tablespace is
dropped and re-created.
TABLESPACE_NAME
VARCHAR2(30)
The tablespace name. The name may exist multiple times in the same
incarnation if the tablespace is dropped and re-created.
FILE#
NUMBER
The absolute file number of the datafile. The same datafile number may
exist multiple times in the same incarnation if the datafile is dropped
and re-created.
CREATION_CHANGE#
NUMBER
CREATION_TIME
DATE
DROP_CHANGE#
NUMBER
The SCN recorded when the datafile was dropped. If a new datafile with
the same file number is discovered then the DROP_CHANGE# is set to
CREATION_CHANGE# for the datafile; otherwise the value is set to RC_
CHECKPOINT.CKP_SCN.
DROP_TIME
DATE
The time when the datafile was dropped. If a new datafile with the same
file number is discovered then the DROP_TIME is set to CREATION_
TIME for the datafile; otherwise the value is set to RC_
CHECKPOINT.CKP_TIME.
BYTES
NUMBER
BLOCKS
NUMBER
BLOCK_SIZE
NUMBER
NAME
VARCHAR2(1024)
STOP_CHANGE#
NUMBER
For offline or read-only datafiles, the SCN value such that no changes in
the redo stream at an equal or greater SCN apply to this file.
STOP_TIME
DATE
For offline normal or read-only datafiles, the time beyond which there
are no changes in the redo stream that apply to this datafile.
READ_ONLY
NUMBER
RFILE#
NUMBER
INCLUDED_IN_DATABASE_ VARCHAR2(3)
BACKUP
AUX_NAME
VARCHAR2(1024)
RC_DATAFILE_COPY
RC_DATAFILE_COPY
This view lists information about datafile copies on disk. It corresponds to the
V$DATAFILE_COPY view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
CDF_KEY
NUMBER
The primary key of the datafile copy in the recovery catalog. If you issue
the LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
NAME
VARCHAR2(1024)
TAG
VARCHAR2(32)
FILE#
NUMBER
CREATION_CHANGE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
The SCN of the most recent RESETLOGS when the datafile was created.
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS in the datafile header.
INCREMENTAL_LEVEL
NUMBER
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
ABSOLUTE_FUZZY_
CHANGE#
NUMBER
The highest SCN in any block of the file, if known. Recovery must
proceed to at least this SCN for the file to become not fuzzy.
RECOVERY_FUZZY_
CHANGE#
NUMBER
The SCN to which recovery must proceed for the file to become not
fuzzy. If not NULL, this file must be recovered at least to the specified
SCN before the database can be opened with this file.
RECOVERY_FUZZY_TIME
DATE
ONLINE_FUZZY
VARCHAR2(3)
YES/NO. If set to YES, this copy was made after an instance failure or
OFFLINE IMMEDATE (or is a copy that was taken improperly while the
database was open). Recovery will need to apply all redo up to the next
crash recovery marker to make the file consistent.
BACKUP_FUZZY
VARCHAR2(3)
YES/NO. If set to YES, this is a copy taken using the BEGIN BACKUP/END
BACKUP technique. To make this copy consistent, the recovery process
needs to apply all redo up to the marker that is placed in the redo stream
when the ALTER TABLESPACE END BACKUP command is used.
BLOCKS
NUMBER
The number of blocks in the datafile copy (also the size of the datafile
when the copy was made).
BLOCK_SIZE
NUMBER
COMPLETION_TIME
DATE
STATUS
VARCHAR2(1)
KEEP
VARCHAR2(3)
Indicates whether this copy has a retention policy different from the
value for CONFIGURE RETENTION POLICY. Possible values are YES and
NO.
RC_DATAFILE_COPY
Column
Datatype
Description
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the COPY command was specified,
then this column shows the date after which this datafile copy becomes
obsolete. If the column is NULL and KEEP OPTIONS is not NULL, the
copy never becomes obsolete.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this datafile copy. Options can be LOGS
(RMAN keeps the logs needed to recover this backup), NOLOGS (RMAN
does not keep the logs needed to recover this backup), or NULL (the
backup has no KEEP options and will be made obsolete based on the
retention policy).
SCANNED
VARCHAR2(3)
Whether RMAN scanned the file (YES or NO). If YES, then this copy was
created by a server process that examined every block in the file, for
example, by the RMAN COPY or RESTORE command. If NO, then RMAN
did not examine every block in the file, as when RMAN inspects a
non-RMAN generated image copy or restores by proxy copy.
Whenever RMAN creates or restores a datafile copy, it adds rows to the
V$DATABASE_BLOCK_CORRUPTION view and RC_DATABASE_BLOCK_
CORRUPTION view if it discovers corrupt blocks in the file. If RMAN has
scanned the entire file, then the absence of corruption records for this
copy means that no corrupt blocks exist in the file. If RMAN did not scan
the file, then the absence of corruption records means that corrupt blocks
may or may not exist in the file.
IS_RECOVERY_DEST_FILE VARCHAR2(3)
This datafile copy is located in the flash recovery area: YES or NO.
RC_LOG_HISTORY
RC_LOG_HISTORY
This view lists historical information about the online redo logs. RMAN adds a new
row during a catalog resynchronization whenever Oracle has switched out of the
online redo log. This catalog view corresponds to the V$LOG_HISTORY view.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
RECID
NUMBER
The redo log history RECID from V$LOG_HISTORY. RECID and STAMP
form a concatenated primary key that uniquely identifies this record in
the target database control file.
STAMP
NUMBER
The redo log history stamp from V$LOG_HISTORY. RECID and STAMP
form a concatenated primary key that uniquely identifies this record in
the target database control file.
THREAD#
NUMBER
SEQUENCE#
NUMBER
FIRST_CHANGE#
NUMBER
FIRST_TIME
DATE
NEXT_CHANGE#
NUMBER
CLEARED
VARCHAR2(3)
YES if the redo log was cleared with the ALTER DATABASE CLEAR
LOGFILE statement; otherwise, NULL. This statement allows a log to be
dropped without archiving it first.
RC_OFFLINE_RANGE
RC_OFFLINE_RANGE
This view lists the offline ranges for datafiles. It corresponds to the V$OFFLINE_
RANGE view.
An offline range is created for a datafile when its tablespace is first altered to be offline
normal or read-only, and then subsequently altered to be online or read/write. Note
that no offline range is created if the datafile itself is altered to be offline or if the
tablespace is altered to be offline immediate.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
RECID
NUMBER
STAMP
NUMBER
The stamp for the offline range from V$OFFLINE_RANGE. RECID and
STAMP form a concatenated primary key that uniquely identifies this
record in the target database control file.
FILE#
NUMBER
CREATION_CHANGE#
NUMBER
OFFLINE_CHANGE#
NUMBER
ONLINE_CHANGE#
NUMBER
ONLINE_TIME
DATE
CF_CREATE_TIME
DATE
RC_RMAN_OUTPUT
RC_RMAN_OUTPUT
RC_RMAN_OUTPUT corresponds to the control file view V$RMAN_OUTPUT.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
RSR_KEY
NUMBER
SESSION_KEY
NUMBER
RECID
NUMBER
STAMP
NUMBER
Stamp (used for ordering) of when the row for this line out output was
added.
OUTPUT
VARCHAR2(129)
RC_PROXY_ARCHIVEDLOG
RC_PROXY_ARCHIVEDLOG
This view contains descriptions of archived log backups that were taken using the
proxy copy functionality. It corresponds to the V$PROXY_ARCHIVEDLOG view.
In a proxy copy, the media manager takes over the operations of backing up and
restoring data. Each row represents a backup of one control file.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
XAL_KEY
NUMBER
The proxy copy primary key in the recovery catalog. If you issue the
LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
TAG
VARCHAR2(32)
DEVICE_TYPE
VARCHAR2(255)
HANDLE
VARCHAR2(1024)
The name or "handle" for the proxy copy. RMAN passes this value to the
operating system-dependent layer that identifies the file.
COMMENTS
VARCHAR2(255)
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
The number of the media pool in which the proxy copy is stored.
STATUS
VARCHAR2(1)
THREAD#
NUMBER
SEQUENCE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
FIRST_CHANGE#
NUMBER
FIRST_TIME
DATE
NEXT_CHANGE#
NUMBER
NEXT_TIME
DATE
The first time stamp of the next redo log in the thread.
BLOCKS
NUMBER
BLOCK_SIZE
NUMBER
DEVICE_TYPE
VARCHAR2(255)
START_TIME
DATE
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
RC_PROXY_ARCHIVELOG_DETAILS
RC_PROXY_ARCHIVELOG_DETAILS
RC_PROXY_ARCHIVELOG_DETAILS provides detailed information about proxy copy
backups of archived redo log for each database registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
COPY_KEY
NUMBER
THREAD#
NUMBER
Redo thread number for the archived redo log file that was backed up.
SEQUENCE#
NUMBER
Log sequence number for the archived redo log file that was backed up.
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
HANDLE
VARCHAR2(1024)
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
TAG
VARCHAR2(32)
FIRST_CHANGE#
NUMBER
NEXT_CHANGE#
NUMBER
FIRST_TIME
DATE
NEXT_TIME
DATE
OUTPUT_BYTES
NUMBER
COMPLETION_TIME
DATE
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_PROXY_ARCHIVELOG_SUMMARY
RC_PROXY_ARCHIVELOG_SUMMARY
RC_PROXY_ARCHIVELOG_SUMMARY contains a summary of proxy copy backups of
archived redo logs.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
NUM_FILES_BACKED
NUMBER
NUM_DISTINCT_FILES_
BACKED
NUMBER
MIN_FIRST_CHANGE#
NUMBER
Minimum value for the first SCN of any redo log file in this summary.
MAX_NEXT_CHANGE#
NUMBER
Maximum value for the "next change#" SCN of any redo log file in this
summary.
MIN_FIRST_TIME
DATE
Minimum value for the time of the first change in any redo log. Along
with MAX_NEXT_TIME, forms the redo range.
MAX_NEXT_TIME
DATE
Maximum value for the time of the next change after any redo logs in this
session.
OUTPUT_BYTES
NUMBER
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_PROXY_CONTROLFILE
RC_PROXY_CONTROLFILE
This view contains descriptions of control file backups that were taken using the proxy
copy functionality. It corresponds to the V$PROXY_DATAFILE view.
In a proxy copy, the media manager takes over the operations of backing up and
restoring data. Each row represents a backup of one control file.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
XCF_KEY
NUMBER
The proxy copy primary key in the recovery catalog. If you issue the
LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
TAG
VARCHAR2(32)
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
CREATION_TIME
DATE
BLOCK_SIZE
NUMBER
MIN_OFFR_RECID
NUMBER
OLDEST_OFFLINE_RANGE
NUMBER
DEVICE_TYPE
VARCHAR2(255)
HANDLE
VARCHAR2(1024)
The name or "handle" for the proxy copy. RMAN passes this value to the
operating system-dependent layer that identifies the file.
COMMENTS
VARCHAR2(255)
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
The number of the media pool in which the proxy copy is stored.
START_TIME
DATE
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
STATUS
VARCHAR2(1)
KEEP
VARCHAR2(3)
Indicates whether this proxy copy has a retention policy different from
the value for CONFIGURE RETENTION POLICY. Possible values are YES
and NO.
RC_PROXY_CONTROLFILE
Column
Datatype
Description
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this control file backup. Options can be
LOGS (RMAN keeps the logs needed to recover this backup), NOLOGS
(RMAN does not keep the logs needed to recover this backup), or NULL
(the backup has no KEEP options and will be made obsolete based on the
retention policy).
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the BACKUP command was specified,
then this column shows the date after which this control file backup
becomes obsolete. If the column is NULL and KEEP OPTIONS is not
NULL, the backup never becomes obsolete.
CONTROLFILE_TYPE
VARCHAR2(1)
RC_PROXY_COPY_DETAILS
RC_PROXY_COPY_DETAILS
RC_PROXY_COPY_DETAILS contains detailed information about proxy copy backups
for databases registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
RSR_KEY
NUMBER
COPY_KEY
NUMBER
FILE#
NUMBER
HANDLE
VARCHAR2(1024)
The proxy copy handle identifies the copy for purposes of restore
operations.
COMMENTS
VARCHAR2(255)
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
The number of the media pool in which the copy is stored. This is the
same value that was entered in the POOL operand of the Recovery
Manager BACKUP command.
TAG
VARCHAR2(32)
CREATION_CHANGE#
NUMBER
CREATION_TIME
DATE
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
OUTPUT_BYTES
NUMBER
Sum of sizes of all output pieces generated by this proxy copy operation.
COMPLETION_TIME
DATE
CONTROLFILE_TYPE
VARCHAR2(1)
Possible values are: B for a normal control file, and S for a standby control
file.
KEEP
VARCHAR2(3)
Indicates whether this backup has a retention policy different from the
value for CONFIGURE RETENTION POLICY. Possible values are YES
and NO.
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause was specified, then this column shows
the date after which this backup becomes obsolete. If the column is NULL
and KEEP OPTIONS is not NULL, the backup never becomes obsolete.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this backup. Options can be LOGS (RMAN
keeps the logs needed to recover this backup), NOLOGS (RMAN does not
keep the logs needed to recover this backup), or NULL (the backup has no
KEEP options and will be made obsolete based on the retention policy).
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_PROXY_COPY_SUMMARY
RC_PROXY_COPY_SUMMARY
RC_PROXY_COPY_SUMMARY contains aggregate information about all available proxy
copy backups for databases registered in the recovery catalog.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_KEY
NUMBER
DB_NAME
VARCHAR2(8)
NUM_COPIES
NUMBER
Number of copies created by all proxy copy operations for this database.
NUM_DISTINCT_COPIES
NUMBER
Number of distinct copies created by all proxy copy operations for this
database.
MIN_CHECKPOINT_
CHANGE#
NUMBER
Minimum checkpoint SCN among any proxy copies for this database.
MAX_CHECKPOINT_
CHANGE#
NUMBER
Maximum checkpoint SCN among any proxy copies for this database.
MIN_CHECKPOINT_TIME
DATE
The oldest checkpoint time among any proxy copies for this database.
MAX_CHECKPOINT_TIME
DATE
The most recent checkpoint time among any proxy copies for this
database.
OUTPUT_BYTES
NUMBER
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_PROXY_DATAFILE
RC_PROXY_DATAFILE
This view contains descriptions of datafile backups that were taken using the proxy
copy functionality. It corresponds to the V$PROXY_DATAFILE view.
In a proxy copy, the media manager takes over the operations of backing up and
restoring data. Each row represents a backup of one database file.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
XDF_KEY
NUMBER
The proxy copy primary key in the recovery catalog. If you issue the
LIST command while connected to the recovery catalog, this value
appears in the KEY column of the output.
RECID
NUMBER
STAMP
NUMBER
TAG
VARCHAR2(32)
FILE#
NUMBER
CREATION_CHANGE#
NUMBER
RESETLOGS_CHANGE#
NUMBER
RESETLOGS_TIME
DATE
The time stamp of the most recent RESETLOGS in the datafile header.
INCREMENTAL_LEVEL
NUMBER
CHECKPOINT_CHANGE#
NUMBER
CHECKPOINT_TIME
DATE
ABSOLUTE_FUZZY_
CHANGE#
NUMBER
The highest SCN in any block of the file, if known. Recovery must
proceed to at least this SCN for the file to become not fuzzy.
RECOVERY_FUZZY_
CHANGE#
NUMBER
The SCN to which recovery must proceed for the file to become not
fuzzy. If not NULL, this file must be recovered at least to the specified
SCN before the database can be opened with this file.
RECOVERY_FUZZY_TIME
DATE
ONLINE_FUZZY
VARCHAR2(3)
YES/NO. If set to YES, this copy was made after an instance failure or
OFFLINE IMMEDIATE (or is a copy of a copy which was taken
improperly while the database was open). Recovery will need to apply
all redo up to the next crash recovery marker to make the file consistent.
BACKUP_FUZZY
VARCHAR2(3)
YES/NO. If set to YES, this is a copy taken using the BEGIN BACKUP/END
BACKUP backup method. To make this copy consistent, recovery must
apply all redo up to the marker that is placed in the redo stream when
the ALTER TABLESPACE END BACKUP statement is issued.
BLOCKS
NUMBER
Size of the datafile copy in blocks (also the size of the datafile when the
copy was made).
BLOCK_SIZE
NUMBER
DEVICE_TYPE
VARCHAR2(255)
HANDLE
VARCHAR2(1024)
The name or "handle" for the proxy copy. RMAN passes this value to the
operating system-dependent layer that identifies the file.
COMMENTS
VARCHAR2(255)
RC_PROXY_DATAFILE
Column
Datatype
Description
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
The number of the media pool in which the proxy copy is stored.
START_TIME
DATE
COMPLETION_TIME
DATE
ELAPSED_SECONDS
NUMBER
STATUS
VARCHAR2(1)
KEEP
VARCHAR2(3)
Indicates whether this proxy copy has a retention policy different from
the value for CONFIGURE RETENTION POLICY (YES or NO).
KEEP_UNTIL
DATE
If the KEEP UNTIL TIME clause of the BACKUP command was specified,
then this column shows the date after which this datafile backup
becomes obsolete. If the column is NULL and KEEP OPTIONS is not
NULL, the backup never becomes obsolete.
KEEP_OPTIONS
VARCHAR2(10)
The KEEP options specified for this backup. Options can be LOGS
(RMAN keeps logs needed to recover this backup), NOLOGS (RMAN
does not keep logs needed to recover this backup), or NULL (the backup
has no KEEP options and will be obsolete based on retention policy).
RC_REDO_LOG
RC_REDO_LOG
This view lists information about the online redo logs for all incarnations of the
database since the last catalog resynchronization. This view corresponds to a
combination of the V$LOG and V$LOGFILE views.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
THREAD#
NUMBER
GROUP#
NUMBER
NAME
VARCHAR2(1024)
RC_REDO_THREAD
RC_REDO_THREAD
This view lists data about all redo threads for all incarnations of the database since the
last catalog resynchronization. This view corresponds to V$THREAD.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
THREAD#
NUMBER
STATUS
VARCHAR2(1)
SEQUENCE#
NUMBER
ENABLE_CHANGE#
NUMBER
ENABLE_TIME
DATE
DISABLE_CHANGE#
NUMBER
The most recent SCN at which this thread was disabled. If the thread is
still disabled, then no redo at or beyond this SCN exists for this thread. If
the thread is now enabled, then no redo exists between the DISABLE_
CHANGE# and the ENABLE_CHANGE# for this thread.
DISABLE_TIME
DATE
RC_RESYNC
RC_RESYNC
This view lists information about recovery catalog resynchronizations. Every full
resynchronization takes a snapshot of the target database control file and
resynchronizes the recovery catalog from the snapshot.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
RESYNC_KEY
NUMBER
CONTROLFILE_CHANGE#
NUMBER
The control file checkpoint SCN from which the catalog was
resynchronized.
CONTROLFILE_TIME
DATE
The control file checkpoint time stamp from which the catalog was
resynchronized.
CONTROLFILE_SEQUENCE# NUMBER
CONTROLFILE_VERSION
DATE
The creation time for the version of the control file from which the
catalog was resynchronized.
RESYNC_TYPE
VARCHAR2(7)
DB_STATUS
VARCHAR2(7)
RESYNC_TIME
DATE
RC_RMAN_BACKUP_JOB_DETAILS
RC_RMAN_BACKUP_JOB_DETAILS
RC_RMAN_BACKUP_JOB_DETAILS provides detailed information on individual
RMAN backup sessions, combining all operations within the session. Details for
individual types of operation performed during the session are available in the RC_
RMAN_BACKUP_SUBJOB_DETAILS view.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_KEY
NUMBER
DB_NAME
VARCHAR2(8)
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
COMMAND_ID
VARCHAR2(33)
START_TIME
DATE
END_TIME
DATE
INPUT_BYTES
NUMBER
OUTPUT_BYTES
NUMBER
STATUS_WEIGHT
NUMBER
OPTIMIZED_WEIGHT
NUMBER
INPUT_TYPE_WEIGHT
NUMBER
OUTPUT_DEVICE_TYPE
VARCHAR2(17)
'DISK', 'SBT_TAPE' or '*'. A '*' indicates a backup job that wrote its output
to more than one device type.
AUTOBACKUP_COUNT
NUMBER
AUTOBACKUP_DONE
VARCHAR2(3)
STATUS
VARCHAR2(23)
INPUT_TYPE
VARCHAR2(13)
Contains a value indicating the type of input for this backup. For possible
values, see the RC_RMAN_BACKUP_TYPE view.
When a job includes backups corresponding to more than one of these
values, multiple rows will appear in the view, corresponding to the
different INPUT_TYPE values for each type of input, with corresponding
values for the INPUT_BYTES, OUTPUT_BYTES, INPUT_BYTES_
DISPLAY, OUTPUT_BYTES_DISPLAY fields.
OPTIMIZED
VARCHAR2(3)
ELAPSED_SECONDS
NUMBER
COMPRESSION_RATIO
NUMBER
INPUT_BYTES_PER_SEC
NUMBER
OUTPUT_BYTES_PER_SEC
NUMBER
INPUT_BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_RMAN_BACKUP_JOB_DETAILS
Column
Datatype
Description
INPUT_BYTES_PER_SEC_
DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_PER_SEC_
DISPLAY
VARCHAR2(4000)
TIME_TAKEN_DISPLAY
VARCHAR2(4000)
RC_RMAN_BACKUP_SUBJOB_DETAILS
RC_RMAN_BACKUP_SUBJOB_DETAILS
RC_RMAN_BACKUP_SUBJOB_DETAILS provides details for groups of similar
operations within an RMAN session.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_KEY
NUMBER
DB_NAME
VARCHAR2(8)
SESSION_KEY
NUMBER
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
OPERATION
VARCHAR2(33)
COMMAND_ID
VARCHAR2(33)
START_TIME
DATE
END_TIME
DATE
INPUT_BYTES
NUMBER
OUTPUT_BYTES
NUMBER
STATUS_WEIGHT
NUMBER
OBJECT_TYPE_WEIGHT
NUMBER
OPTIMIZED_WEIGHT
NUMBER
OUTPUT_DEVICE_TYPE
VARCHAR2(17)
'DISK', 'SBT_TAPE' or '*'. A '*' indicates a backup job that wrote its output
to more than one device type.
AUTOBACKUP_DONE
VARCHAR2(3)
STATUS
VARCHAR2(23)
INPUT_TYPE
VARCHAR2(13)
OPTIMIZED
VARCHAR2(3)
AUTOBACKUP_COUNT
NUMBER
COMPRESSION_RATIO
NUMBER
INPUT_BYTES_DISPLAY
VARCHAR2(4000)
OUTPUT_BYTES_DISPLAY
VARCHAR2(4000)
RC_RMAN_BACKUP_TYPE
RC_RMAN_BACKUP_TYPE
This view is used internally by Enterprise Manager.
It contains information used in filtering the other Enterprise Manager views when
generating reports on specific backup types.
Column
Datatype
Description
WEIGHT
NUMBER
INPUT_TYPE
VARCHAR2(13)
RC_RMAN_CONFIGURATION
RC_RMAN_CONFIGURATION
This view lists information about RMAN persistent configuration settings. It
corresponds to the V$RMAN_CONFIGURATION view.
Column
Datatype
Description
DB_KEY
NUMBER
CONF#
NUMBER
NAME
VARCHAR2(65)
VALUE
VARCHAR2(1025)
RC_RMAN_STATUS
RC_RMAN_STATUS
This view contains information about the history of RMAN operations on all databases
associated with this recovery catalog. It contains essentially the same information as
V$RMAN_STATUS, except that it does not contain information about current sessions.
All RMAN operations such as backups, restores, deletion of backups, and so on are
logged in this table. The table is organized to show the status of each RMAN session
(the invocation of an RMAN client, including all actions taken until the RMAN client
exits), operations executed during the session, and recursive operations.
RC_RMAN_STATUS also contains the RSR_KEY, PARENT_KEY and SESSION_KEY
columns, which do not appear in V$RMAN_STATUS.
Column
Datatype
Description
SID
NUMBER
RECID
NUMBER
STAMP
NUMBER
The timestamp of the row in the control file. (Because control file records
are reused, you must combine the timestamp and recid to get a value
unique across all records in RC_RMAN_STATUS.)
PARENT_RECID
VARCHAR2(40)
PARENT_STAMP
VARCHAR2(40)
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
ROW_LEVEL
NUMBER
ROW_TYPE
VARCHAR2(19)
COMMAND_ID
VARCHAR2(33)
The user-specified ID of the operation. The user can change this using
the SET COMMAND ID syntax in RMAN. By default, the command ID
is set to the time at which RMAN is invoked, in ISO standard format.
OPERATION
VARCHAR2(33)
This is the name of the operation presented by this row. For SESSION
operations, this column is set to 'RMAN'. For COMMAND operations, it
describes the command executed, such as "BACKUP", "RESTORE",
"CONFIGURE", "REPORT" and so on.
RC_RMAN_STATUS
Column
Datatype
Description
STATUS
VARCHAR2(23)
The status of the operation described by this row. Possible values are:
COMPLETED, COMPLETED WITH WARNINGS, COMPLETED WITH
ERRORS, and FAILED.
MBYTES_PROCESSED
NUMBER
START_TIME
DATE
END_TIME
DATE
RSR_KEY
NUMBER
PARENT_KEY
NUMBER
SESSION_KEY
NUMBER
The value of RSR_KEY for the session row associated with this row.
INPUT_MBYTES
NUMBER
Sum of sizes of all all input files backed up by this job, in megabytes.
OUTPUT_MBYTES
NUMBER
OPTIMIZED_ID
NUMBER
OBJECT_TYPE_ID
OUTPUT_DEVICE_TYPE_ID
NUMBER
NUMBER
OPTIMIZED
VARCHAR2(3)
OBJECT_TYPE
VARCHAR2(50)
OUTPUT_DEVICE_TYPE
VARCHAR2(4)
'DISK', 'SBT_TAPE' or '*'. A '*' indicates that output was written to more
than one device type.
SESSION_RECID
NUMBER
SESSION_STAMP
NUMBER
RC_STORED_SCRIPT
RC_STORED_SCRIPT
This view lists information about scripts stored in the recovery catalog. The view
contains one row for each stored script. (Note that RMAN's commands for script
management such as LIST SCRIPT NAMES and LIST SCRIPT provide more
convenient ways of viewing this information.)
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the database that owns this stored script. Use this
column to form a join with almost any other catalog view.
DB_NAME
VARCHAR2(8)
SCRIPT_NAME
VARCHAR2(100)
RC_STORED_SCRIPT_LINE
RC_STORED_SCRIPT_LINE
This view lists information about individual lines of stored scripts in the recovery
catalog. The view contains one row for each line of each stored script.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the database that owns this stored script. Use this
column to form a join with almost any other catalog view.
SCRIPT_NAME
VARCHAR2(100)
LINE
NUMBER
The number of the line in the stored script. Each line of a stored script is
uniquely identified by SCRIPT_NAME and LINE.
TEXT
VARCHAR2(1024)
RC_TABLESPACE
RC_TABLESPACE
This view lists all tablespaces registered in the recovery catalog, all dropped
tablespaces, and tablespaces that belong to old incarnations. It corresponds to the
V$TABLESPACE view. The current value is shown for tablespace attributes.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
TS#
NUMBER
The tablespace ID in the target database. The TS# may exist multiple
times in the same incarnation if the tablespace is dropped and re-created.
NAME
VARCHAR2(30)
The tablespace name. The name may exist multiple times in the same
incarnation if the tablespace is dropped and re-created.
CREATION_CHANGE#
NUMBER
CREATION_TIME
DATE
The creation time of the tablespace. NULL for offline tablespaces after
creating the control file.
DROP_CHANGE#
NUMBER
DROP_TIME
DATE
INCLUDED_IN_DATABASE_ VARCHAR2(3)
BACKUP
BIGFILE
VARCHAR2(3)
TEMPORARY
VARCHAR2(3)
RC_TEMPFILE
RC_TEMPFILE
This view lists information about all tempfiles registered in the recovery catalog. It
corresponds to the V$TEMPFILE view. A tempfile is shown as dropped if its tablespace
is dropped.
Column
Datatype
Description
DB_KEY
NUMBER
The primary key for the target database. Use this column to form a join
with almost any other catalog view.
DBINC_KEY
NUMBER
The primary key for the incarnation of the target database. Use this
column to form a join with RC_DATABASE_INCARNATION.
DB_NAME
VARCHAR2(8)
TS#
NUMBER
The tablespace ID in the target database. The TS# may exist multiple
times in the same incarnation if the tablespace is dropped and re-created.
TABLESPACE_NAME
VARCHAR2(30)
The tablespace name. The name may exist multiple times in the same
incarnation if the tablespace is dropped and re-created.
FILE#
NUMBER
The absolute file number of the tempfile. The same tempfile number
may exist in the same incarnation of the tempfile is dropped and
re-created.
CREATION_CHANGE#
NUMBER
CREATION_TIME
DATE
DROP_CHANGE#
NUMBER
The SCN recorded when the tempfile was dropped. If a new tempfile
with the same FILE# is discovered then the DROP_CHANGE# is set to
CREATION_CHANGE# for the tempfile; otherwise, the value is set to RC_
CHECKPOINT.CKP_SCN.
DROP_TIME
DATE
The time when the tempfile was dropped. If a new tempfile with the
same FILE# is discovered, then the DROP_TIME is set to CREATION_
TIME for the tempfile; otherwise the value is RC_CHECKPOINT.CKP_
TIME.
BYTES
NUMBER
BLOCK_SIZE
NUMBER
NAME
VARCHAR2(1024)
RFILE#
NUMBER
AUTOEXTEND
VARCHAR2(3)
MAXSIZE
NUMBER
Maximum file size in blocks to which the file can be extended. Valid only
when AUTOEXTEND is ON. Always 0 when AUTOEXTEND is OFF.
NEXTSIZE
NUMBER
Amount of incremental size for file extensible in blocks. Valid only when
AUTOEXTEND is ON. Always 0 when AUTOEXTEND is OFF.
RC_UNUSABLE_BACKUPFILE_DETAILS
RC_UNUSABLE_BACKUPFILE_DETAILS
This view lists all backup files (backup pieces, proxy copies or image copies) that are
marked UNAVAILABLE or EXPIRED. You can select one of the rows and, using
BTYPE_KEY or FILETYPE_KEY, change the status of a backup set or specific file to
AVAILABLE.
This view is primarily intended to be used internally by Enterprise Manager.
Column
Datatype
Description
DB_NAME
VARCHAR2(8)
DB_KEY
NUMBER
The primary key for this database in the recovery catalog. Use this column
to form a join with almost any other catalog view.
SESSION_KEY
NUMBER
RSR_KEY
NUMBER
BTYPE
CHAR(9)
BTYPE_KEY
NUMBER
ID1
NUMBER
For backups taken as backup sets, this column contains SET_STAMP. For
proxy copy or image copy backups, this column contains the RECID from
the control file.
ID2
NUMBER
For backups taken as backup sets, ID2 contains SET_COUNT. For image
copy and proxy copy backups ID2 contains STAMP.
FILETYPE
VARCHAR2(15)
FILETYPE_KEY
NUMBER
Backup piece key if the file is a backup piece, other wise COPY_KEY. This
key can be used to directly change the status of the file to available.
STATUS
VARCHAR2(1)
Can be either 'U' (for unavailable backups) or 'X' (for expired backups).
FILESIZE
NUMBER
DEVICE_TYPE
VARCHAR2(255)
Device type storing this unusuable backup file. Possible values are DISK
and SBT_TAPE.
FILENAME
VARCHAR2(1024)
File name.
MEDIA
VARCHAR2(80)
MEDIA_POOL
NUMBER
A
Deprecated RMAN Commands
This appendix describes Recovery Manager syntax that is deprecated and describes
preferred syntax if any exists.
Deprecated RMAN syntax continues to be supported in subsequent releases for
backward compatibility. For example, the SET AUXNAME command replaced the SET
CLONENAME command in Oracle8i, and the CONFIGURE AUXNAME command replaced
the SET AUXNAME command in Oracle9i, but you can continue to run both SET
CLONENAME and SET AUXNAME in all subsequent RMAN releases.
Table A1
Deprecated
in Release
Deprecated Syntax
10.0.1
10.0.1
10.0.1
10.0.1
COPY
BACKUP AS COPY
10.0.1
10.0.1
9.2
REPLICATE
9.2
SET AUTOLOCATE
9.0.1
n/a
9.0.1
9.0.1
9.0.1
9.0.1
9.0.1
9.0.1
CROSSCHECK
9.0.1
DELETE
9.0.1
9.0.1
SET AUXNAME
CONFIGURE AUXNAME
9.0.1
SET DUPLEX
A-1
Deprecated Syntax
9.0.1
9.0.1
SET SNAPSHOT
CONFIGURE SNAPSHOT
9.0.1
8.1.7
CONFIGURE COMPATIBLE
n/a
8.1.5
8.1.5
CROSSCHECK
8.1.5
8.1.5
CONFIGURE CLONE
CONFIGURE AUXILIARY
8.1.5
8.1.5
B
RMAN Compatibility
This appendix describes the requirements for compatibility among the different
components of the Recovery Manager (RMAN) environment. This appendix contains
these topics:
RMAN client
Target database
Auxiliary database
For example, you can use a release 9.0.1 RMAN client with:
A release 8.1.7 recovery catalog database whose catalog tables were created with
RMAN release 9.0.1
Use SQL*Plus to connect to the recovery catalog database as the catalog owner. For
example, enter:
% sqlplus rman/rman@catdb
2.
Query the rcver catalog table. For example, run this query:
If multiple versions are listed, then the last row is the current version, and the
rows before it are prior versions. In the preceding example, the current catalog
schema version is 09.00.01.00 and the previous version was 08.01.05.00.
Note that for releases 10.2 and later, the last two digits indicate patch level. For
earlier releases, they are always zeros.
You can create 8.X or 9.X RMAN catalog schema in any Oracle database release
8.1.X (or higher) and Release 10g RMAN catalog schema in any Oracle database
release 9.0.1 (or higher).
The recovery catalog schema version must be greater than or equal to the RMAN
client version.
Ideally, the versions of the RMAN client and the target database should be the
same (although there are other legal combinations, listed in Table B1). The RMAN
client cannot be of a greater version than the target or auxiliary database.
While backing up a Release 10g database using the 9.X RMAN client, you cannot
include a control file that was created using compatible=10.0.0 in a datafile
backupset. The workaround is to turn control file autobackup ON.
Table B1 shows version requirements for RMAN components. Note the following
conventions when interpreting this table:
">=8.1.7" means 8.1.7, 9.0.1, 9.2.0 and 10.1.0 and their patches
">=8.0.6" means 8.0.6, 8.1.7, 9.0.1, 9.2.0 and 10.1.0 and their patches
When using an older version of the RMAN client with a newer version of the
database, you do not get the features of the newer version. For example, when using
the Oracle9i RMAN client to back up an Oracle Release 10g database, you will not
have access to features like the flash recovery area, flashback database, TSPITR with an
RMAN-managed auxiliary instance, or recovery through resetlogs.
Table B1
Target/Auxiliary
Database
RMAN client
Catalog
Database
Catalog Schema
8.0.6
8.0.6
>=8.1.7
>=8.0.6
8.1.7
8.0.6.1
>=8.1.7
>=8.1.7
8.1.7
8.1.7
>=8.1.7
>=RMAN client
8.1.7.4
8.1.7.4
>=8.1.7
8.1.7.4
8.1.7.4
8.1.7.4
>=8.1.7
>= 9.0.1.4
9.0.1
9.0.1
>=8.1.7
RMAN client
Catalog
Database
Catalog Schema
9.2.0
>=8.1.7
10.1.0
>=9.0.1.3 and
<=target database
executable
>=9.0.1
10.2.0
>=9.0.1.3 and
<=target database
executable
>=9.0.1
8.1.7
9.0.1
9.2.0
10.1.0
10.2.0
You want to record RMAN repository data about these databases in a single recovery
catalog database. According to Table B1 on page B-2, you can use a single 9.2.0
recovery catalog database with a 10.2.0 catalog schema for all target databases.
The solution for this combination of target databases is to do the following:
Ensure that the version of the RMAN client used to back up each target database
meets the requirements specified in Table B1 on page B-2.
Index
Symbols
? symbol
in RMAN quoted strings, 1-3
@ command, 2-5
in RMAN quoted strings, 1-3
@@ command, 2-6
A
ALLOCATE CHANNEL command, 2-7, 2-13
and shared server, 2-7, 2-10
FOR MAINTENANCE option, 2-10
ALTER DATABASE command, 2-16
archivelogRecordSpecifier clause, 2-18
autobackups
control file, 2-70
B
BACKUP
INCREMENTAL
FROM SCN, 2-27
BACKUP command, 2-22
backup sets
and Backup Unused Space Compression, 2-28
and unused block compression, 2-28
binary compression, 2-28
Backup Unused Space Compression, 2-28
backups
binary compression, 2-28
datafiles
Backup Unused Space compression, 2-28
unused block compression, 2-28
backups,vaulted, 2-184
binary compression of backup sets, 2-28
BLOCKRECOVER command, 2-48
C
CATALOG command, 2-51
CHANGE command, 2-54
channels
allocating to shared server sessions, 2-7, 2-10
code examples
description of RMAN, 1-5
command line
Index-1
SET, 2-199
SHOW, 2-207
SHUTDOWN, 2-210
SPOOL, 2-212
SQL, 2-213
STARTUP, 2-215
summary, 2-1, 3-1
SWITCH, 2-217
TRANSPORT TABLESPACE, 2-222
UNREGISTER DATABASE, 2-226
untilClause, 2-228
UPGRADE CATALOG, 2-230
VALIDATE, 2-231
comments in RMAN commands, 1-1
compatibility
recovery catalog, B-1
Recovery Manager, B-1
completedTimeSpec clause, 2-61
CONFIGURE command, 2-63
CONNECT command, 2-75
connectStringSpec clause, 2-77
control files
automatic backups, 2-70
corrupt datafile blocks
maximum acceptable number, 2-203
corruption detection
using SET MAXCORRUPT command, 2-203
CREATE CATALOG command, 2-89
CREATE SCRIPT command, 2-91
CROSSCHECK command, 2-93
D
datafiles
backing up
Backup Unused Space Compression, 2-28
unused block compression, 2-28
dates
specifying in RMAN commands, 2-228
DELETE command, 2-96
DELETE SCRIPT command, 2-100
deprecated commands
Recovery Manager, A-1
DROP CATALOG command, 2-102
DROP DATABASE command, 2-103
DUPLICATE command, 2-104
duplicate database
synchronizing
using incremental backups, 2-27
E
environment variables
in RMAN strings, 1-3
EXECUTE SCRIPT command, 2-112
EXIT command, 2-113
F
fileNameConversionSpec clause, 2-114
FLASHBACK command, 2-117
Index-2
H
HOST command, 2-125
I
Incremental Roll Forward of Database Copy, 2-27
K
keywords
in syntax diagrams, 1-2
L
LIST command, 2-128
listObjList clause, 2-144
M
MAXCORRUPT parameter
SET command, 2-203
MAXSETSIZE parameter
BACKUP command, 2-35
P
parameters
in syntax diagrams, 1-2
PL/SQL stored procedures
executing within RMAN, 2-214
PRINT SCRIPT command, 2-151
Q
QUIT command, 2-152
quoted strings
environment variables, 1-3
R
RC_ARCHIVED_LOG view, 2-18, 3-4
RC_BACKUP_CONTROLFILE view, 3-8
RC_BACKUP_CORRUPTION view, 3-14
RC_BACKUP_DATAFILE view, 3-15
RC_BACKUP_PIECE view, 3-22
RC_BACKUP_REDOLOG view, 3-25
RC_BACKUP_SET view, 3-27
RC_BACKUP_SPFILE view, 3-32
RC_CHECKPOINT view, 3-35
RC_CONTROLFILE_COPY view, 3-36
RC_COPY_CORRUPTION view, 3-37
RC_DATABASE recovery catalog view, 3-38
RC_DATABASE view, 2-201
RC_DATABASE_BLOCK_CORRUPTION
view, 3-39
RC_DATABASE_INCARNATION view, 2-201, 3-40
RC_DATAFILE view, 3-41
RC_DATAFILE_COPY view, 3-42
RC_LOG_HISTORY view, 3-44
RC_OFFLINE_RANGE view, 3-45
RC_PROXY_CONTROLFILE view, 3-50
SET, 2-199
SHOW, 2-207
SHUTDOWN, 2-210
SPOOL, 2-212
SQL, 2-213
STARTUP, 2-215
SWITCH, 2-217
TRANSPORT TABLESPACE, 2-222
UNREGISTER DATABASE, 2-226
untilClause, 2-228
UPGRADE CATALOG, 2-230
VALIDATE, 2-231
compatibility, B-1
dates in commands, 2-228
symbolic links for filenames, 2-182
syntax conventions, 1-1
REGISTER command, 2-164
RELEASE CHANNEL command (RMAN), 2-166
releasing a maintenance channel, 2-167
REPLACE SCRIPT command, 2-168
REPORT command, 2-170
RESET DATABASE command, 2-176
RESTORE command, 2-179
RESTORE... PREVIEW
RECALL, 2-184
RESYNC CATALOG command, 2-193
RUN command, 2-195
S
SEND command, 2-198
SET command, 2-199
shared server
allocating channels, 2-7, 2-10
SHOW command, 2-207
SHUTDOWN command, 2-210
SPOOL command, 2-212
SQL command, 2-213
STARTUP command, 2-215
stored procedures
executing within RMAN, 2-214
SWITCH command, 2-217
symbolic links
and RMAN, 2-182
synchronizing duplicate database
uising incremental backups, 2-27
syntax conventions
Recovery Manager, 1-1
syntax diagrams
explanation of, 1-1
keywords, 1-2
parameters, 1-2
T
TRANSPORT TABLESPACE command,
2-222
U
UNREGISTER DATABASE command, 2-226
untilClause, 2-228
Index-3
V
V$ARCHIVED_LOG view, 2-18, 2-20, 2-139
V$BACKUP_CORRUPTION view, 2-32
V$BACKUP_DEVICE view, 2-8, 2-11
V$BACKUP_PIECE view, 2-132, 2-134, 2-136
V$BACKUP_SET view, 2-132, 2-135, 2-136, 2-137
V$DATABASE view, 2-201
V$DATABASE_BLOCK_CORRUPTION view, 2-48,
2-49, 2-50, 2-160, 2-185, 2-231
V$DATAFILE view, 2-95, 2-220
V$DATAFILE_COPY view, 2-95, 2-138, 2-139
V$DATAFILE_HEADER view, 2-95
V$PROXY_DATAFILE view, 2-134
V$SESSION view, 2-201, 2-204
VALIDATE command, 2-231
vaulted backups, 2-184
views
recovery catalog, 3-1
Index-4