PK HiUIoaę,mimetypeapplication/epub+zipPKHiUIOEBPS/rcviews011.htmÍOį 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the incarnation of the target database. Use this column to join with RC_DATABASE_INCARNATION.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
BDF_KEYNUMBERThe primary key of the datafile backup in the recovery catalog. If you issue the LIST command while RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output.
RECIDNUMBERThe backup datafile RECID from V$BACKUP_DATAFILE. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe backup datafile stamp from V$BACKUP_DATAFILE. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
BS_KEYNUMBERThe primary key of the backup set to which this record belongs in the recovery catalog. Use this column to join with RC_BACKUP_SET or RC_BACKUP_PIECE.
SET_STAMPNUMBERThe SET_STAMP value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
SET_COUNTNUMBERThe SET_COUNT value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
BS_RECIDNUMBERThe RECID from V$BACKUP_SET.
BS_STAMPNUMBERThe STAMP from V$BACKUP_SET.
BACKUP_TYPEVARCHAR2(1)The type of the backup: D (full or level 0 incremental) or I (incremental level 1).
INCREMENTAL_LEVELNUMBERThe level of the incremental backup: NULL, 0, or 1.
COMPLETION_TIMEDATEThe completion time of the backup.
FILE#NUMBERThe 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#NUMBERThe creation SCN of the datafile.
RESETLOGS_CHANGE#NUMBERThe SCN of the most recent RESETLOGS in the datafile header.
RESETLOGS_TIMEDATEThe time stamp of the most recent RESETLOGS in the datafile header.
INCREMENTAL_CHANGE#NUMBERThe SCN that determines whether a block will be included in the incremental backup. A block is only included if the SCN in the block header is greater than or equal to INCREMENTAL_CHANGE#.

The range of redo covered by the incremental backup begins with INCREMENTAL_CHANGE# and ends with CHECKPOINT_CHANGE#.

CHECKPOINT_CHANGE#NUMBERThe checkpoint SCN of this datafile in this backup set.
CHECKPOINT_TIMEDATEThe time associated with CHECKPOINT_CHANGE#.
ABSOLUTE_FUZZY_CHANGE#NUMBERThe absolute fuzzy SCN. See the note following this table for special semantics when FILE#=0.
DATAFILE_BLOCKSNUMBERThe number of data blocks in the datafile.
BLOCKSNUMBERThe 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_SIZENUMBERThe size of the data blocks in bytes.
STATUSVARCHAR2(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_LEVELNUMBERThe incremental level (NULL, 0, or 1) specified when this backup was created. This value can be different from the INCREMENTAL_LEVEL column because if you run, for example, a level 1 incremental backup, but no previous level 0 backup exists for some files, a level 0 backup is automatically taken for these files. In this case, BS_LEVEL is 1 and INCREMENTAL_LEVEL is 0.
PIECESNUMBERThe number of backup pieces in the backup set that contains this backup datafile.
BLOCKS_READNUMBERNumber of blocks that were scanned while taking this backup. If this was an incremental backup, and change tracking was used to optimize the backup, then the value of this column will be smaller than DATAFILE_BLOCKS. Otherwise, the value of this column will be the same as DATAFILE_BLOCKS. Even when change tracking data is used, the value of this column may be larger than BLOCKS, because the data read by change tracking is further refined during the process of creating an incremental backup.
CREATION_TIMEDATECreation timestamp of the datafile.
MARKED_CORRUPTNUMBERNumber of blocks marked corrupt.
USED_CHANGE_TRACKINGVARCHAR2(3)Whether change tracking data was used to accelerate this incremental backup (YES) or was not used (NO).
USED_OPTIMIZATIONVARCHAR2(3)Whether backup optimization was applied (YES) or not (NO).
PCT_NOTREADNUMBERThe percentage of the file that was skipped during this backup. For incremental backups, this value indicates the efficiency of the block change tracking file.
FOREIGN_DBIDNUMBERForeign DBID of the database from which this datafile was transported. The value is 0 if the file backed up is not a foreign database file.
PLUGGED_READONLYVARCHAR2(3)YES if this is a backup of a transported read-only foreign file; otherwise NO.
PLUGIN_CHANGE#NUMBERSCN at which the foreign datafile was transported into the database. The value is 0 if this file is not a foreign database file.
PLUGIN_RESETLOGS_CHANGE#NUMBERThe SCN of the RESETLOGS operation for the incarnation into which this foreign file was transported. The value is 0 if this file is not a foreign database file.
PLUGIN_RESETLOGS_TIMEDATEThe time of the RESETLOGS operation for the incarnation into which this foreign file was transported. The value is 0 if this file is not a foreign database file.
SECTION_SIZENUMBERSpecifies the number of blocks in each section of a multisection backup. Value is 0 for whole file backups.

PK◊{ņÖÔOÍOPKHiUIOEBPS/rcmsynta001.htm›"Á @ (at sign)

@ (at sign)

Purpose

Use the @ command to execute a series of RMAN commands stored in an operating system file with the specified path name.


Note:

The file must contain complete RMAN commands. Partial commands generate syntax errors.

Prerequisites

The command file must contain complete RMAN commands.

If you use the @ command within a RUN command, then the @ command must be on its own line (see Example 2-2).

Usage Notes

RMAN processes the file as if its contents had appeared in place of the @ command. As shown in Example 2-3, you can specify substitution variables in a command file and then pass values to the command file during execution.


See Also:

RMAN to learn more about using substitution variables in RMAN

Syntax

@::=

Description of at.gif follows

Semantics

Syntax ElementDescription
filenameSpecifies the name of a command file, for example, @/oracle/dbs/cmd/cmd1.rman. If you do not specify the absolute path name, then the current working directory is assumed, for example, @cmd1.rman.

Any file extension (or no file extension) is valid. Do not use quotes around the string or leave whitespace between the @ keyword and the file name.


Examples

Example 2-1 Running a Command File from the Operating System Command Line

This example creates an RMAN command file and then executes it from the operating system command line.

% echo "BACKUP DATABASE;" > backup_db.rman
% rman TARGET / @backup_db.rman

Example 2-2 Running a Command File Within RMAN

This example shows how you can execute a command file from the RMAN prompt and from within a RUN command. User-entered text appears in bold.

RMAN> @backup_db.rman
RMAN> RUN {
2> @backup_db.rman
3> backup database;
4> **end-of-file**
5> }

Example 2-3 Specifying Substitution Variables

Suppose that you use a text editor to create command file whole_db.rman with the following contents:

# name: whole_db.rman
BACKUP TAG &1 COPIES &2 DATABASE;
EXIT;

The following example starts RMAN from the operating system prompt and connects to the target database. The example then runs the @ command, passing variables to the command file to create two database backups with tag Q106:

% rman TARGET /
RMAN> @/tmp/whole_db.rman Q106 2
PKl≥X‚›PKHiUIOEBPS/rcviews016.htmEťļ 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.

ColumnDatatypeDescription
SESSION_KEYNUMBERSession identifier. Use in joins with RC_RMAN_OUTPUT and RC_RMAN_BACKUP_JOB_DETAILS.
SESSION_RECIDNUMBERTogether with SESSION_STAMP, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
SESSION_STAMPNUMBERTogether with SESSION_RECID, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DB_IDNUMBERThe DBID of the database incarnation to which this record belongs.
BP_KEYNUMBERThe primary key for the backup piece in the recovery catalog. If you issue the LIST command while RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output.
RECIDNUMBERThe backup piece RECID from RC_BACKUP_PIECE. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe backup piece stamp propagated from V$BACKUP_PIECE. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
BS_KEYNUMBERThe primary key of the backup set to which this record belongs in the recovery catalog. Use this column to join with RC_BACKUP_SET or RC_BACKUP_PIECE.
SET_STAMPNUMBERThe SET_STAMP value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
SET_COUNTNUMBERThe SET_COUNT value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
BACKUP_TYPEVARCHAR2(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_LEVELNUMBERFor incremental backups, indicates the level of incremental backup. Possible values are NULL (for full backups), 0 or 1.
PIECE#NUMBERThe number of the backup piece. The first piece has the value of 1.
COPY#NUMBERIndicates the copy number for backup pieces created with duplex enabled. 1 if the backup piece is not duplexed.
DEVICE_TYPEVARCHAR2(255)Type of the device on which the backup piece resides. Set to DISK for backup sets on disk.
HANDLEVARCHAR2(1024)The filename of the backup piece.
COMMENTSVARCHAR2(255)Comments about the backup piece.
MEDIAVARCHAR2(80)A comment that contains further information about the media manager that created this backup.
MEDIA_POOLNUMBERThe number of the media pool in which the backup is stored. 0 indicates no media pool.
CONCURVARCHAR2(3)Specifies whether backup media supports concurrent access: YES or NO.
TAGVARCHAR2(32)The tag associated with this backup piece.
START_TIMEDATEThe time when RMAN started to write the backup piece.
COMPLETION_TIMEDATEThe time when the backup piece was completed.
ELAPSED_SECONDSNUMBERThe duration of the creation of the backup piece.
STATUSVARCHAR2(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.)
BYTESNUMBERThe size of the backup piece in bytes.
IS_RECOVERY_DEST_FILEVARCHAR2(3)YES if this backup piece is located in the flash recovery area. NO otherwise.
RSR_KEYNUMBERUnique key for the row in RC_RMAN_STATUS corresponding to the job that created this backup piece.
COMPRESSEDVARCHAR2(3)YES if this backup piece is compressed. NO otherwise.
SITE_KEYNUMBERPrimary key of the Data Guard database associated with this file. Each database in a Data Guard environment has a unique SITE_KEY value.You can use SITE_KEY in a join with the RC_SITE view to obtain the DB_UNIQUE_NAME of the database.
ENCRYPTEDVARCHAR2(3)Indicates whether the backup piece is encrypted (YES) or not (NO).
BACKED_BY_OSBVARCHAR2(3)Indicates whether the backup piece is backed up to Oracle Secure Backup (YES) or not (NO).
PIECES_PER_SETNUMBERNumber of backup pieces in the backup set containing this backup piece.
SIZE_BYTES_DISPLAYVARCHAR2(4000)Same value as BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.

PK<ę^0EEPKHiUIOEBPS/title.htmkĒÍ Oracle Database Backup and Recovery Reference, 11g Release 1 (11.1)

Oracle¬ģ Database

Backup and Recovery Reference

11g Release 1 (11.1)

B28273-03

August 2008

This book provides complete reference information on the Recovery Manager client, including command syntax, a compatibility matrix, and recovery catalog views.


Oracle Database Backup and Recovery Reference, 11g Release 1 (11.1)

B28273-03

Copyright © 2004, 2008, Oracle. All rights reserved.

Primary Author: Lance Ashdown

Contributing Author: Antonio Romero, Katherine Weill

Contributors: Tammy Bednar, Anand Beldalker, Timothy Chien, Mark Dilman, Senad Dizdar, Raymond Guzman, Wei Hu, Alex Hwang, Ashok Joshi, J. William Lee, Reem Munakash, Muthu Olagappan, Cris Pedregal-Martin, Samitha Samaranayake, Francisco Sanchez, Vivian Schupmann, Mike Stewart, 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 Software‚ÄĒRestricted Rights (June 1987). Oracle USA, Inc., 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 Siebel 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.

PKôĘū#pkPKHiUIOEBPS/rcmsynta006.htmdõŚ ALTER DATABASE

ALTER DATABASE

Purpose

Use the ALTER DATABASE command to mount or open a database.


See Also:

Oracle Database SQL Language Reference for ALTER DATABASE syntax and semantics

Syntax

alterDatabase::=

Description of alterdatabase.gif follows

Prerequisites

Execute this command either within the braces of a RUN command or at the RMAN prompt. The target instance must be started.

Semantics

Syntax ElementDescription
MOUNTMounts the database without opening it. Issuing the command with this option is equivalent to the SQL statement ALTER DATABASE MOUNT.
OPENOpens the database (see Example 2-13). When you open the database after RECOVER DATABASE, RMAN re-creates any locally managed tempfiles recorded in the RMAN repository if necessary. However, if you perform recovery with a backup control file and no recovery catalog, then RMAN does not record tempfiles created after the control file backup in the RMAN repository. Also, RMAN does not re-create the tempfiles automatically.
   RESETLOGSArchives 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 command ALTER DATABASE OPEN RESETLOGS is equivalent to the SQL statement ALTER DATABASE OPEN RESETLOGS.

If you use a recovery catalog, then RMAN issues 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 rather than the RMAN command of the same name, then you must manually run the RESET DATABASE command.


Examples

Example 2-13 Making a Consistent Database Backup

Assume that the database is open and you want to make a consistent backup of the whole database. This example shuts down the database consistently, mounts the database, makes a consistent whole database backup, and then opens the database.

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP DATABASE PLUS ARCHIVELOG;
# Now that the backup is complete, open the database.
ALTER DATABASE OPEN;

Example 2-14 Mounting the Database After Restoring the Control File

This example restores the control file, mounts it, and performs recovery. Finally, the example resets the online redo logs.

STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
# You must run the RECOVER command after restoring a control file even if no 
# datafiles require recovery.
RECOVER DEVICE TYPE DISK DATABASE;
ALTER DATABASE OPEN RESETLOGS;
PKŤ>%řidPKHiUIOEBPS/rcviews018.htmy4Üň 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DB_IDNUMBERThe unique database identifier.
BS_KEYNUMBERThe primary key of the backup set in the recovery catalog. If you issue the LIST command while RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output. Use this column to join with RC_BACKUP_PIECE.
RECIDNUMBERThe 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.
STAMPNUMBERThe 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_STAMPNUMBERThe SET_STAMP value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated 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_COUNTNUMBERThe SET_COUNT value from V$BACKUP_SET.SET_STAMP and SET_COUNT form a concatenated 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.
BACKUP_TYPEVARCHAR2(1)The type of the backup: D (full backup or level 0 incremental), I (incremental level 1), L (archived redo log).
INCREMENTAL_LEVELNUMBERThe level of the incremental backup: NULL, 0, or 1.
PIECESNUMBERThe number of backup pieces in the backup set.
START_TIMEDATEThe time when the backup began.
COMPLETION_TIMEDATEThe time when the backup completed.
ELAPSED_SECONDSNUMBERThe duration of the backup in seconds.
STATUSVARCHAR2(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_INCLUDEDVARCHAR2(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_ONLYVARCHAR2(3)This backup set record was created by the BACKUP VALIDATE command. No real backup set exists. This record is only a placeholder used to keep track of which datafiles were scanned and which corrupt blocks (if any) were found in those files.

If COMPATIBLE is set to 11.0.0 or greater, then RMAN does not populate this column.

KEEPVARCHAR2(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_UNTILDATEIf 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, then the backup never becomes obsolete.
KEEP_OPTIONSVARCHAR2(11)The KEEP options specified for this backup set. Possible values are NOLOGS, BACKUP_LOGS, LOGS, and NULL. NOLOGS indicates a consistent backup made when the database was mounted. BACKUP_LOGS indicates that the backup was made in open mode, so archived log backups must be applied to make it consistent. LOGS indicates a long-term backup made with the LOGS keyword, which is now deprecated. NULL indicates that this backup has no KEEP options and becomes obsolete based on the retention policy.
BLOCK_SIZENUMBERBlock size of the backup set.
SITE_KEYNUMBERPrimary key of the Data Guard database associated with this backup set. Each database in a Data Guard environment has a unique SITE_KEY value.You can use SITE_KEY in a join with the RC_SITE view to obtain the DB_UNIQUE_NAME of the database.
MULTI_SECTIONVARCHAR2(3)Y if this is a multisection backup; otherwise null.

PKc–sĮ~4y4PKHiUIOEBPS/rcmsubcl010.htmt:čŇ formatSpec

formatSpec

Purpose

Use the formatSpec subclause 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 platform-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.


Tip:

Oracle Database SQL Language Reference to learn how to create and name Automated Storage Manager disk groups

Usage Notes

Any name that is valid as a sequential filename on the platform is allowed, so long as each backup piece or copy has a unique name. If backing up to disk, then any valid disk filename is allowed, provided it is unique.

You cannot specify an Oracle Managed Files filename as the format for a backup. For example, if +DISK1/datafile/system.732.609791431 is an OMF filename, then you cannot specify this filename in the FORMAT parameter.

Environment variables are not valid in the FORMAT parameter.

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 "Semantics" are available in FORMAT strings to aid in generating unique filenames. The formatting of this information varies by platform.

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 the format 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, then RMAN reuses the format values, starting with the first one.

Specify format_string in any of the following places, listed in order of precedence:

The backupSpec clause

The BACKUP command

The ALLOCATE CHANNEL command

The CONFIGURE CHANNEL command

If specified in more than one of these places, then RMAN searches for the FORMAT parameter in the order shown.

Syntax

formatSpec::=

Description of formatspec.gif follows

Semantics

formatSpec

The following table lists RMAN substitution variables that are valid in format strings.

Syntax ElementDescription
%aSpecifies the activation ID of the database.
%cSpecifies 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.
%dSpecifies the name of the database (see Example 3-22).
%DSpecifies the current day of the month from the Gregorian calendar in format DD.
%eSpecifies the archived log sequence number.
%fSpecifies the absolute file number (see Example 3-22).
%FCombines 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)

%hSpecifies the archived redo log thread number.
%ISpecifies the DBID.
%MSpecifies the month in the Gregorian calendar in format MM.
%NSpecifies the tablespace name. This substitution variable is only valid when backing up datafiles as image copies.
%nSpecifies the name of the database, padded on the right with x characters to a total length of eight characters. For example, if prod1 is the database name, then the padded name is prod1xxx.
%pSpecifies 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.

%sSpecifies 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.
%tSpecifies 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.
%TSpecifies the year, month, and day in the Gregorian calendar in this format: YYYYMMDD.
%uSpecifies an 8-character name constituted by compressed representations of the backup set or image copy number and the time the backup set or image copy was created.
%USpecifies a system-generated unique filename (default).

The meaning of %U is different for image copies and backup pieces. For a backup piece, %U specifies a convenient shorthand for %u_%p_%c that guarantees uniqueness in generated backup filenames. For an image copy of a datafile, %U means the following:

data-D-%d_id-%I_TS-%N_FNO-%f_%u

For an image copy of an archived redo log, %U means the following:

arch-D_%d-id-%I_S-%e_T-%h_A-%a_%u

For an image copy of a control file, %U means the following:

cf-D_%d-id-%I_%u

%YSpecifies the year in this format: YYYY.
%%
Specifies the percent (%) character. For example, %%Y translates to the string %Y.

Example

Example 3-21 Specifying an ASM Disk Group

This example copies the database to ASM disk group DISK1:

BACKUP AS COPY DATABASE FORMAT '+DATAFILE';

Example 3-22 Specifying a Format for Datafile Copies

This example copies two datafiles with tag LATESTCOPY to directory /disk2:

BACKUP AS COPY
  COPY OF DATAFILE 27, 28
  FROM TAG 'LATESTCOPY' 
  FORMAT '/disk2/Datafile%f_Database%d';
PKu%X~y:t:PKHiUIOEBPS/rcmsynta008.htmGEłļ CATALOG

CATALOG

Purpose

Use the CATALOG command to do the following:


See Also:

Oracle Database Backup and Recovery User's Guide to learn how to manage target database records stored in the catalog

Prerequisites

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.

The file that you are cataloging must meet the following conditions:

Usage Notes

RMAN considers 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.

A recovery catalog is required when using RMAN in a Data Guard environment. The recovery catalog supports a unified file namespace for all primary and standby databases with the same DBID but different DB_UNIQUE_NAME values. Thus, the recovery catalog keeps track of database file names for all primary and standby databases, as well as where online redo logs, standby redo logs, tempfiles, archived redo logs, backup sets, and image copies were created.

"RMAN Backups in a Data Guard Environment" explains how RMAN handles backups made on a different primary and standby databases. In general, tape backups made on one database are accessible to any database in the environment, whereas disk backups are accessible only to the database that created them.

As long as backups are accessible to the connected target database, RMAN commands such as RESTORE and RECOVER behave transparently across different databases. You can manually transfer a disk backup from one host in the environment to another host and then catalog the backup. If a backup is on shared disk, then you can use CHANGE RESET DB_UNIQUE_NAME to associate the backup with a new database.

Syntax

catalog::=

Description of catalog.gif follows

Semantics

Syntax ElementDescription
ARCHIVELOG 'filename'Specifies the filename of an archived redo log to be added to the RMAN repository.

Note: This command does not catalog foreign archived redo logs, which are redo logs received by a logical standby database for a LogMiner session. Unlike normal archived logs, foreign archived logs have a different DBID.

BACKUPPIECE 'filename'Specifies the name of a backup piece to be added to the RMAN repository (see Example 2-30).

The backup piece must be on disk. RMAN verifies the backup piece header before cataloging it. RMAN can catalog a backup piece from a previous database incarnation.

You may choose to catalog backup pieces in the following situations:

  • You copy or move a backup piece with an operating system utility and want it to be usable by RMAN.

  • The RMAN metadata for the backup piece was removed, but the backup piece still exists. This situation can occur if you ran the DELETE command on a backup piece that was only temporarily unavailable.

  • You make a NOCATALOG backup on one database host in a Data Guard environment and move the backup piece to the same location on a different database host. In this case, the recovery catalog has no record of the original backup piece.

  • You do not use a recovery catalog and must re-create the control file, thereby losing all RMAN repository data. Cataloging your backups makes them available again.

  • When control file autobackup is disabled, you back up the control file and then back up the archived redo logs. You can restore and mount the control file, but must catalog the backup pieces containing the archived redo logs backed up after the control file.

If you specify a list of backup pieces, then 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 because otherwise it is only in a partially available state.

Note: If RMAN creates a server parameter file backup when the COMPATIBLE parameter of the database is set to 11.0.0 or higher, then the backup is associated with this database. In this case, even if you connect RMAN to a different database and explicitly catalog the backup piece, the DB_UNIQUE_NAME associated with this backup does not change. For example, if RMAN backs up the server parameter file of the database with DB_UNIQUE_NAME 'NEWYORK' when COMPATIBLE is 11.0.0, then RMAN cannot use the server parameter file backup created at database NEWYORK to restore the server parameter file on database BOSTON.

CONTROLFILECOPY 'filename'Specifies the filename of a control file copy to be added to the RMAN repository. The control file copy can be a normal or standby control file copy created by one of the following commands
  • The RMAN command BACKUP AS COPY CURRENT CONTROLFILE

  • The SQL statement ALTER DATABASE BACKUP CONTROLFILE

  • The SQL statement ALTER DATABASE CREATE STANDBY CONTROLFILE

Note: RMAN can automatically convert a primary database control file backup to a standby control file during a restore operation.

DATAFILECOPY 'filename'Specifies the filename of a datafile copy to be added to the RMAN repository (see Example 2-30). You can create datafile copies with the RMAN BACKUP AS COPY command or with operating system utilities used in conjunction with ALTER TABLESPACE BEGIN/END BACKUP.
   LEVEL integerSpecifies that the datafile copy should be recorded as a level 0 incremental backup (0 is the only valid value of LEVEL).

You can perform incremental backups by using this datafile copy as the base level 0 backup.

   TAG tagnameSpecifies a tag for the datafile copy.
RECOVERY AREACatalogs all valid backup sets, datafile copies, and archived redo logs in the flash recovery area (see Example 2-32).

RMAN must be connected to a database as TARGET. The target database must be mounted or open. The keywords RECOVERY AREA and DB_RECOVERY_FILE_DEST are exact synonyms.

Note: This command also catalogs foreign archived logs, which are archived redo logs received by logical standby for a LogMiner session, if they exist in the flash recovery area.

DB_RECOVERY_FILE_DESTThe keywords RECOVERY AREA and DB_RECOVERY_FILE_DEST are exact synonyms.

START WITH
'string_pattern'
Catalogs all valid backup sets, datafile and control file copies, and archived redo logs whose name start with string_pattern. The string pattern can be an ASM disk group, Oracle-managed files directory, or part of a file name (see Example 2-31).

RMAN reports any files in the disk location that it cannot catalog. RMAN must be connected to a mounted target database.

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 file /tmp/arc.cpy.

Note: You cannot use wildcard characters in the string pattern, only a strict prefix.

   NOPROMPTSuppresses the confirmation prompt. By default, RMAN prompts after every match.

Examples

Example 2-30 Cataloging a Datafile Copy as an Incremental Backup

Assume that you used a Linux utility to back up the users01.dbf datafile to /disk2/backup/users01.bak. This example catalogs the datafile copy as an incremental level 0 backup and then lists all copies.

CATALOG DATAFILECOPY '/disk2/backup/users01.bak' LEVEL 0;
LIST COPY;

Example 2-31 Cataloging Multiple Copies in a Directory

This example catalogs a directory full of archived redo logs that were copied into the /disk2/archlog directory with an operating system utility. The example includes sample output.

CATALOG START WITH '/disk2/archlog' NOPROMPT; 

searching for all files that match the pattern /disk2/archlog
 
List of Files Unknown to the Database
=====================================
File Name: /disk2/archlog/o1_mf_1_10_24trtc7s_.arc
File Name: /disk2/archlog/o1_mf_1_11_24trtg7s_.arc
File Name: /disk2/archlog/o1_mf_1_12_24trtk84_.arc
File Name: /disk2/archlog/o1_mf_1_13_24trtn85_.arc
File Name: /disk2/archlog/o1_mf_1_14_24trtq84_.arc
File Name: /disk2/archlog/o1_mf_1_15_24trtt84_.arc
File Name: /disk2/archlog/o1_mf_1_16_24trtx84_.arc
File Name: /disk2/archlog/o1_mf_1_17_24trv085_.arc
File Name: /disk2/archlog/o1_mf_1_18_24trv385_.arc
File Name: /disk2/archlog/o1_mf_1_19_24trv685_.arc
cataloging files...
cataloging done
 
List of Cataloged Files
=======================
File Name: /disk2/archlog/o1_mf_1_10_24trtc7s_.arc
File Name: /disk2/archlog/o1_mf_1_11_24trtg7s_.arc
File Name: /disk2/archlog/o1_mf_1_12_24trtk84_.arc
File Name: /disk2/archlog/o1_mf_1_13_24trtn85_.arc
File Name: /disk2/archlog/o1_mf_1_14_24trtq84_.arc
File Name: /disk2/archlog/o1_mf_1_15_24trtt84_.arc
File Name: /disk2/archlog/o1_mf_1_16_24trtx84_.arc
File Name: /disk2/archlog/o1_mf_1_17_24trv085_.arc
File Name: /disk2/archlog/o1_mf_1_18_24trv385_.arc
File Name: /disk2/archlog/o1_mf_1_19_24trv685_.arc

Example 2-32 Cataloging Files in the Flash Recovery Area

This example catalogs all files in the currently enabled flash recovery area without prompting the user for each one. As shown in the sample output, RMAN displays a message if it finds no files to catalog.

CATALOG RECOVERY AREA;
 
searching for all files in the recovery area
no files found to be unknown to the database

Example 2-33 Cataloging a Backup Piece

Assume that you use an operating system utility to copy a backup piece from one location to another. This example catalogs the backup piece in the new location (sample output included):

CATALOG BACKUPPIECE '/disk1/c-874220581-20061128-01';

using target database control file instead of recovery catalog
cataloged backup piece
backup piece handle=/disk1/c-874220581-20061128-01 RECID=12 STAMP=607695990
PK&ÖÜgLEGEPKHiUIOEBPS/rcmsubcl017.htmŅ@Ô tempfileSpec

tempfileSpec

Purpose

Use the tempfileSpec subclause to specify a tempfile by name or absolute file number.

Syntax

tempfileSpec::=

Description of tempfilespec.gif follows

Semantics

Syntax ElementDescription
'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.

You can specify an absolute path name, or a path name relative to the Oracle home. Double and single quotes are both valid (although only single quotes are shown in the diagram). Use a question mark (?) to represent the Oracle home and the at sign (@) for the Oracle SID.

integerSpecifies the datafile by absolute file number. Obtain the file number from the V$TEMPFILE view or REPORT SCHEMA output.

Examples

Example 3-34 Specifying a Tempfile by Filename

This example renames tempfile /disk1/oradata/prod/temp01.dbf to /disk2/temp01.dbf, specifying it by filename:

SHUTDOWN IMMEDIATE
STARTUP MOUNT
RUN
{
  SWITCH TEMPFILE '/disk1/oradata/prod/temp01.dbf'
               TO '/disk2/temp01.dbf';
}
ALTER DATABASE OPEN;

Note that the database must be mounted when performing this example.

PKÜ-ŪĮńŅPKHiUIOEBPS/rcviews056.htmÚ" › 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.

ColumnDatatypeDescription
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
SESSION_KEYNUMBERSession identifier. Use in joins with RC_RMAN_OUTPUT and RC_RMAN_BACKUP_JOB_DETAILS.
RSR_KEYNUMBERUnique key for the row in RC_RMAN_STATUS corresponding to the job that created this file.
BTYPECHAR(9)The backup type container, which can be BACKUPSET, IMAGECOPY, or PROXYCOPY.
BTYPE_KEYNUMBERUnique identifier for the backup type. It is BS_KEY/COPY_KEY.
ID1NUMBERFor 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.
ID2NUMBERFor backups taken as backup sets, ID2 contains SET_COUNT. For image copy and proxy copy backups ID2 contains STAMP.
FILETYPEVARCHAR2(15)The type of this backup file. Possible values are BACKUPPIECE, COPY, or PROXYCOPY.
FILETYPE_KEYNUMBERBackup 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.
STATUSVARCHAR2(1)Can be either U (for unavailable backups) or X (for expired backups).
FILESIZENUMBERSize in bytes of the unusable backup file.
DEVICE_TYPEVARCHAR2(255)Device type storing this unusable backup file. Possible values are DISK and SBT_TAPE.
FILENAMEVARCHAR2(1024)File name.
MEDIAVARCHAR2(80)A comment that contains further information about the media manager that created this backup.
MEDIA_POOLNUMBERThe number of the media pool in which the backup is stored.

PKQ tų"Ú"PKHiUIOEBPS/rcmsynta046.htmĄ{Ū SPOOL

SPOOL

Purpose

Use the SPOOL command to direct RMAN output to a log file.


See Also:

RMAN for a description of LOG files

Prerequisites

Execute the SPOOL command at the RMAN prompt.

Syntax

spool::=

Description of spool.gif follows

Semantics

Syntax ElementDescription
OFFTurns off spooling.
TO filenameSpecifies 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. If the specified file cannot be opened for writing, then RMAN turns SPOOL to OFF and continues execution.
   APPENDAppends the RMAN output to the end of the existing log.

Example

Example 2-142 Spooling RMAN Output to a File

This example directs RMAN output to standard output for configuration of the default device type, spools output of the SHOW command to log file current_config.log, and then spools output to db_backup.log for the whole database backup:

CONFIGURE DEFAULT DEVICE TYPE TO sbt;
SPOOL LOG TO '/tmp/current_config.log';
SHOW ALL;
SPOOL LOG OFF;
SPOOL LOG TO '/tmp/db_backup.log';
BACKUP DATABASE;
SPOOL LOG OFF;
PKö8 ÄČĄPKHiUIOEBPS/rcviews051.htm•ZÔ RC_SITE

RC_SITE

This view lists information about all databases in a Data Guard environment that are known to the recovery catalog. You can use this view to obtain the DB_UNIQUE_NAME value for views which do not have this column.

ColumnDatatypeDescription
SITE_KEYNUMBERThe unique key of this database. You can join the RC_SITE.SITE_KEY column with the RC_SITE column of other views to determine which DB_UNIQUE_NAME is associated with a backup.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DATABASE_ROLEVARCHAR2(7)The role of the database in the Data Guard environment.
CF_CREATE_TIMEDATEThe creation date of the control file.
DB_UNIQUE_NAMEVARCHAR2(30)The DB_UNIQUE_NAME of the database. All databases in a Data Guard environment share the same DBID but different DB_UNIQUE_NAME values.

PKÜŰē™•PKHiUIOEBPS/rcmsynta041.htmŅ@Á RUN

RUN

Purpose

Use the RUN command to group a series RMAN commands into a block to be executed sequentially. On 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.

Prerequisites

Execute this command only at the RMAN prompt. You must precede the list of job commands with an opening brace ({) and terminate it with a closing brace (}).

Usage Notes

You can use RUN to create a scope within which a script can override default configurations. For example, you can override configured channels with the ALLOCATE CHANNEL and RELEASE CHANNEL commands and other parameters with the SET command (as shown in Example 2-132). After executing the commands listed in the RUN block, the channels allocated within the RUN block are released and settings returned to their values.

As shown in Example 2-133, you must use the EXECUTE SCRIPT command within a RUN block.

Syntax

run::=

Description of run.gif follows

(backupCommands::=, maintenanceCommands::=, miscellaneousCommands::=, restoreCommands::=)

backupCommands::=

Description of backupcommands.gif follows

maintenanceCommands::=

Description of maintenancecommands.gif follows

miscellaneousCommands::=

Description of miscellaneouscommands.gif follows

restoreCommands::=

Description of restorecommands.gif follows

Semantics

Refer to individual command entries for information about commands that you can run from the RMAN prompt.

Examples

Example 2-132 Overriding Configured Settings

Assume that your configured device configuration is as follows:

RMAN> SHOW DEVICE TYPE;

RMAN configuration parameters for database with db_unique_name PROD1 are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

You want to make a backup to a nondefault directory. Instead of changing the configuration, you can override it in the job as follows:

RUN
{
  ALLOCATE CHANNEL c1 DEVICE TYPE DISK FORMAT "/disk2/%U";
  BACKUP DATABASE PLUS ARCHIVELOG;
}

Example 2-133 Executing an RMAN Script

Assume that you use the CREATE SCRIPT command to create a backup script named backup_db. This example executes the stored script:

RUN { EXECUTE SCRIPT backup_db; }
PKĀ[`ńŅPKHiUIOEBPS/rcviews023.htmšŽ RC_BACKUP_SPFILE_SUMMARY

RC_BACKUP_SPFILE_SUMMARY

RC_BACKUP_SPFILE_SUMMARY provides summary information about server parameter file backups for databases registered in the recovery catalog.

This view is primarily intended to be used internally by Enterprise Manager.

ColumnDatatypeDescription
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
NUM_FILES_BACKEDNUMBERNumber of files backed up.
NUM_DISTINCT_FILES_BACKEDNUMBERNumber of distinct files backed up (based on differing modification timestamps).
MIN_MODIFICATION_TIMEDATEEarliest modification time of any SPFILE backed up for this database.
MAX_MODIFICATION_TIMEDATELatest modification time of any SPFILE backed up for this database.
INPUT_BYTESNUMBERTotal number of bytes in the input files backed up.
INPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as INPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.

PKĄ3]ĖťšPKHiUIOEBPS/rcmsynta033.htm|0ÉŌ REPAIR FAILURE

REPAIR FAILURE

Purpose

Use the REPAIR FAILURE command to repair database failures identified by the Data Recovery Advisor.

The recommended workflow is to run LIST FAILURE to display failures, ADVISE FAILURE to display repair options, and REPAIR FAILURE to fix the failures.

Prerequisites

The target database instance must be started. The database must be a single-instance database and must not be a physical standby database.

Make sure that at most one RMAN session is running the REPAIR FAILURE command. The only exception is REPAIR FAILURE ... PREVIEW, which is permitted in concurrent RMAN sessions.

To perform an automated repair, the Data Recovery Advisor may require specific backups and archived redo logs. If the files needed for recovery are not available, then the recovery will not be possible.

Usage Notes

Repairs are consolidated when possible so that a single repair can fix multiple failures. The command performs an implicit ADVISE FAILURE if this command has not yet been executed in the current session.

RMAN always verifies that failures are still relevant and automatically closes fixed failures. RMAN does not attempt to repair a failure that has already been fixed, nor does it repair a failure that is obsolete because new failures have been introduced since ADVISE FAILURE was run.

By default, REPAIR FAILURE prompts for confirmation before it begins executing. After executing a repair, RMAN reevaluates all existing failures on the chance that they may also have been fixed.

Oracle RAC and Data Recovery Advisor

If a data failure brings down all instances of an Oracle RAC database, then you can mount the database in single-instance mode and use Data Recovery Advisor to detect and repair control file, SYSTEM datafile, and dictionary failures. You can also initiate health checks to test other database components for data failures. This approach will not detect data failures that are local to other cluster instances, for example, an inaccessible datafile.

Syntax

repair::=

Description of repair.gif follows

Semantics

repair

Syntax ElementDescription
REPAIR FAILURERepairs failures recorded in the Automated Diagnostic Repository.

If you execute REPAIR FAILURE with no other command options, then RMAN uses the first repair option of the most recent ADVISE FAILURE command in the current session. The command performs an implicit ADVISE FAILURE if this command has not yet been executed in the current session.


   USING ADVISE OPTION
   integer
Specifies a repair option by its option number (not its failure number). You can obtain repair option numbers from the ADVISE FAILURE command.
   NOPROMPTSuppresses the confirmation prompt.

This is the default option if you run REPAIR FAILURE in a command file.

   PREVIEWDoes not make any repairs and generates a script with all repair actions and comments. By default the script is displayed to standard output. You can use the SPOOL command to write the script to an editable file (see Example 2-106).

Examples

Example 2-105 Repairing Failures

This example repairs all failures known to the Recovery Data Advisor. The example repairs two failures: missing datafiles and a datafile with corrupt blocks. After the recovery, RMAN asks whether it should open the database (user-entered text is in bold).

RMAN> LIST FAILURE;
 
List of Database Failures
=========================
 
Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
142        HIGH     OPEN      23-APR-07     One or more non-system datafiles are missing
101        HIGH     OPEN      23-APR-07     Datafile 1: '/disk1/oradata/prod/system01.dbf' 
                                            contains one or more corrupt blocks
 
RMAN> ADVISE FAILURE;
 
List of Database Failures
=========================
 
Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
142        HIGH     OPEN      23-APR-07     One or more non-system datafiles 
                                            are missing
101        HIGH     OPEN      23-APR-07     Datafile 1: '/disk1/oradata/prod/system01.dbf' 
                                            contains one or more corrupt blocks
 
analyzing automatic repair options; this may take some time
using channel ORA_DISK_1
analyzing automatic repair options complete
 
Mandatory Manual Actions
========================
no manual actions available
 
Optional Manual Actions
=======================
1. If file /disk1/oradata/prod/users01.dbf was unintentionally renamed or moved, restore it
 
Automated Repair Options
========================
Option Repair Description
------ ------------------
1      Restore and recover datafile 28; Perform block media recovery of 
       block 56416 in file 1
  Strategy: The repair includes complete media recovery with no data loss
  Repair script: /disk1/oracle/log/diag/rdbms/prod/prod/hm/reco_660500184.hm

RMAN> REPAIR FAILURE;
 
Strategy: The repair includes complete media recovery with no data loss
Repair script: /disk1/oracle/log/diag/rdbms/prod/prod/hm/reco_475549922.hm
contents of repair script:
   # restore and recover datafile
   sql 'alter database datafile 28 offline';
   restore datafile 28;
   recover datafile 28;
   sql 'alter database datafile 28 online';
   # block media recovery
   recover datafile 1 block 56416;
 
Do you really want to execute the above repair (enter YES or NO)? YES
executing repair script
 
sql statement: alter database datafile 28 offline
 
Starting restore at 23-APR-07
using channel ORA_DISK_1
 
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00028 to /disk1/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /disk2/PROD/backupset/2007_04_18/o1_mf_nnndf_TAG20070418T182042_32fjzd3z_.bkp
channel ORA_DISK_1: piece handle=/disk2/PROD/backupset/2007_04_18/o1_mf_nnndf_TAG20070418T182042_32fjzd3z_.bkp tag=TAG20070418T182042
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 23-APR-07
 
Starting recover at 23-APR-07
using channel ORA_DISK_1
 
starting media recovery
media recovery complete, elapsed time: 00:00:01
 
Finished recover at 23-APR-07
 
sql statement: alter database datafile 28 online
 
Starting recover at 23-APR-07
using channel ORA_DISK_1
searching flashback logs for block images until SCN 429690
finished flashback log search, restored 1 blocks
 
starting media recovery
media recovery complete, elapsed time: 00:00:03
 
Finished recover at 23-APR-07
repair failure complete

Example 2-106 Previewing a Repair

The following example previews a repair of the first repair option of the most recent ADVISE FAILURE command in the current session. Note that the sample output for the LIST FAILURE and ADVISE FAILURE commands is not shown in the example.

RMAN> LIST FAILURE;
.
.
.
RMAN> ADVISE FAILURE;
.
.
.
RMAN> REPAIR FAILURE PREVIEW;

Strategy: The repair includes complete media recovery with no data loss
Repair script: /disk1/oracle/log/diag/rdbms/prod/prod/hm/reco_3200987003.hm

contents of repair script:
   # block media recovery
   recover datafile 1 block 56416;

You can use SPOOL in conjunction with REPAIR FAILURE ... PREVIEW to write a repair script to a file. You can then edit this script and execute it manually. The following example spools a log a repair preview to /tmp/repaircmd.dat.

RMAN> SPOOL LOG TO '/tmp/repaircmd.dat';
RMAN> REPAIR FAILURE PREVIEW;
RMAN> SPOOL LOG OFF;
PKŮr`…Ā0|0PKHiUIOEBPS/rcviews024.htm Űķ RC_CHECKPOINT

RC_CHECKPOINT

This view is deprecated. See RC_RESYNC instead.

PK8Ď PKHiUIOEBPS/rcmsynta034.htm /Ű– REPLACE SCRIPT

REPLACE SCRIPT

Purpose

Use the REPLACE SCRIPT command to replace an existing script stored in the recovery catalog. If the script does not exist, then REPLACE SCRIPT creates it.


See Also:

CREATE SCRIPT to learn how to create stored scripts

Prerequisites

Execute REPLACE SCRIPT only at the RMAN prompt. RMAN must be connected to a target database and a recovery catalog. The recovery catalog database must be open.

If you are replacing a local script, then you must be connected to the target database that you connected to when you created the script.

Substitution Variables in Stored Scripts

RMAN supports the use of substitution variables in a stored script. &1 indicates where to place the first value, &2 indicate where to place the second value, and so on. Special characters must be quoted.

The substitution variable syntax is &integer followed by an optional period, for example, &1.3. The optional period is part of the variable and replaced with the value, thus enabling the substitution text to be immediately followed by another integer. For example, if you pass the value mybackup to a command file that contains the substitution variable &1.3, then the result of the substitution is mybackup3. Note that to create the result mybackup.3, you would use the syntax &1..3.

When you create a stored script with substitution variables, you must provide example values at create time. You can provide these values with the USING clause when starting RMAN (see RMAN) or enter them when prompted (see Example 2-60).

Syntax

replaceScript::=

Description of replacescript.gif follows

(backupCommands::=, maintenanceCommands::=, miscellaneousCommands::=, restoreCommands::=)

Semantics

Syntax ElementDescription
GLOBALIdentifies the script as global.

Note: A virtual private catalog has read-only access to global scripts. Creating or updating global scripts must be done while RMAN is connected to the base recovery catalog.

See Also: "Usage Notes" for an explanation of the difference between global and local scripts

SCRIPT script_nameIdentifies the local or global script being replaced.
   COMMENT 'comment'Associates an explanatory comment with the stored script in the recovery catalog. The comment is shown in the output of LIST SCRIPT NAMES.

backupCommands
maintenanceCommands
restoreCommands
miscellaneousCommands
Specifies commands to include in the stored script. The commands allowable within the brackets of the REPLACE SCRIPT 'script_name ' {...} command are the same commands supported within a RUN block. Any command that is valid within a RUN command is permitted in the stored script. The following commands are not permitted within stored scripts: RUN, @ (at sign), and @@ (double at sign).
FROM FILE 'filename'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 left brace ({) and the last line must contain a right brace (}). The RMAN commands in the file must be valid in a stored script.


Example

Example 2-107 Replacing a Recovery Catalog Script

Assume that you start the RMAN client and connect to database prod as TARGET and then connect to a recovery catalog. You use CREATE SCRIPT to create a global script named backup_db as follows:

CREATE GLOBAL SCRIPT backup_db
COMMENT "back up any database from the recovery catalog, with logs"
{
    BACKUP DATABASE;
}

You then use LIST SCRIPT NAMES to list all scripts known to the recovery catalog:

RMAN> LIST SCRIPT NAMES;
 
List of Stored Scripts in Recovery Catalog
 
 
    Global Scripts
 
 
       Script Name
       Description
       -----------------------------------------------------------------------
       backup_db
       back up any database from the recovery catalog, with logs

You then run the following REPLACE SCRIPT command with the intention of editing the backup_db global script:

RMAN> REPLACE SCRIPT backup_db { BACKUP DATABASE PLUS ARCHIVELOG; }
 
replaced script backup_db

Because you did not specify the GLOBAL keyword, RMAN creates a local script named backup_db in addition to the global script named backup_db. LIST SCRIPT NAMES shows both the global and local script recorded in the recovery catalog:

RMAN> LIST SCRIPT NAMES;
 
List of Stored Scripts in Recovery Catalog
 
 
    Scripts of Target Database PROD
 
       Script Name
       Description
       -----------------------------------------------------------------------
       backup_db
 
 
    Global Scripts
 
 
       Script Name
       Description
       -----------------------------------------------------------------------
       backup_db
       back up any database from the recovery catalog, with logs

You can then delete the local script named backup_db with DELETE SCRIPT and replace the global script as follows:

RMAN> DELETE SCRIPT backup_db;
 
deleted script: backup_db
 
RMAN> REPLACE GLOBAL SCRIPT backup_db { BACKUP DATABASE PLUS ARCHIVELOG; }
 
replaced global script backup_db

The LIST SCRIPT NAMES command now shows that only one script named backup_db exists in the catalog:

RMAN> LIST SCRIPT NAMES;

List of Stored Scripts in Recovery Catalog
 
    Global Scripts
 
       Script Name
       Description
       -----------------------------------------------------------------------
       backup_db

The PRINT SCRIPT command confirms the changes to the global script:

RMAN> PRINT GLOBAL SCRIPT backup_db;
 
printing stored global script: backup_db
 { BACKUP DATABASE PLUS ARCHIVELOG; }
PKúFP_/ /PKHiUIOEBPS/rcmsynta048.htm(◊ŗ STARTUP

STARTUP

Purpose

Use the STARTUP command to start the target database from within the RMAN environment. This command is equivalent to using the SQL*Plus STARTUP command.

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

Prerequisites

RMAN must be connected to a target database. You can only use this command to start the target database.

Usage Notes

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 Example 2-146).

Syntax

startup::=

Description of startup.gif follows

Semantics

Syntax ElementDescription
STARTUPIf you specify only STARTUP with no other options, then the instance starts the instance with the default server parameter file, mounts the control file, and opens the database.
   DBARestricts access to users with the RESTRICTED SESSION privilege.
   FORCEIf 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.
   MOUNTStarts the instance, then mounts the database without opening it
   NOMOUNTStarts the instance without mounting the database. If no parameter file exists, then RMAN starts the instance with a temporary parameter file. You can then run RESTORE SPFILE to restore a backup server parameter file.
   PFILE filenameSpecifies the filename of the text-based initialization parameter file for the target database. If PFILE is not specified, then the default initialization parameter filename is used.

Examples

Example 2-145 Mounting the Database While Specifying the Parameter File

This example forces a SHUTDOWN ABORT and then mounts the database with restricted access, specifying a nondefault initialization parameter file location:

CONNECT TARGET /
STARTUP FORCE MOUNT DBA PFILE=/tmp/initPROD.ora;

Example 2-146 Starting an Instance Without a Parameter File

Assume that the server parameter file was accidentally deleted from the file system. The following example starts an instance without using a parameter file, then runs RESTORE SPFILE FROM AUTOBACKUP. In this example, the autobackup location is the flash recovery area, so SET DBID is not necessary.

CONNECT TARGET /
STARTUP FORCE NOMOUNT; # RMAN starts instance with dummy parameter file
RESTORE SPFILE TO '?/dbs/spfileprod.ora'
  FROM AUTOBACKUP
  RECOVERY AREA '/disk2' DB_NAME='prod';
STARTUP FORCE; # restart instance with restored server parameter file
PKųXKJ-(PKHiUIOEBPS/rcmsynta025.htmŤž HOST

HOST

Purpose

Use the HOST command to invoke an operating system command-line sub-shell from within RMAN.

Syntax

host::=

Description of host.gif follows

Prerequisites

Execute this command at the RMAN prompt or within the braces of a RUN command.

Semantics

Syntax ElementDescription
HOSTDisplays a command prompt and resumes after you exit the subshell (see Example 2-82).
   'command'Runs the command in the specified string and then continues (see Example 2-83).

Examples

Example 2-82 Hosting to the Operating System Within a Backup

This example makes an image copy of datafile 3, hosts out to the Linux prompt to check that the copy is in the directory (the Linux session output is indented and displayed in bold), and then resumes the RMAN session:

RMAN> BACKUP DATAFILE 3 FORMAT '/disk2/df3.cpy';

Starting backup at 15-FEB-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/disk1/oracle/oradata/prod/undotbs01.d bf
channel ORA_DISK_1: starting piece 1 at 15-FEB-07
channel ORA_DISK_1: finished piece 1 at 15-FEB-07
piece handle=/disk2/df3.cpy tag=TAG20070215T111326 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 15-FEB-07

RMAN> HOST;

% ls /disk2/df3.copy
/disk2/df3.cpy
% exit
exit
host command complete

RMAN>

Example 2-83 Executing an Operating System Copy Within RMAN

This example makes a backup of datafile system01.dbf and then executes the Linux ls command to display all files in the /disk2 directory:

BACKUP DATAFILE '?/oradata/prod/system01.dbf'
  FORMAT '/disk2/system01.dbf';
HOST 'ls -lt /disk2/*';
PK5“küŪŤPKHiUIOEBPS/rcviews035.htm)Ģ÷ 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 shows one record for each database registered in the recovery catalog. Thus, if only one database is registered, then this view shows one row regardless of the number of proxy copies of archived redo logs that have been performed. This view is primarily intended to be used internally by Enterprise Manager.

ColumnDatatypeDescription
SESSION_KEYNUMBERSession identifier. Use in joins with RC_RMAN_OUTPUT and RC_RMAN_BACKUP_JOB_DETAILS.
SESSION_RECIDNUMBERTogether with SESSION_STAMP, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
SESSION_STAMPNUMBERTogether with SESSION_RECID, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
COPY_KEYNUMBERUnique identifier for this proxy copy.
THREAD#NUMBERRedo thread number for the archived redo log file that was backed up.
SEQUENCE#NUMBERLog sequence number for the archived redo log file that was backed up.
RESETLOGS_CHANGE#NUMBERCheckpoint SCN of OPEN RESETLOGS for incarnation of the database of the archived redo log file that was backed up.
RESETLOGS_TIMEDATETime corresponding to RESETLOGS_CHANGE#.
HANDLEVARCHAR2(1024)A filename for the proxy copy.
MEDIAVARCHAR2(80)A comment that contains further information about the media manager that created this backup.
MEDIA_POOLNUMBERThe number of the media pool in which the backup is stored.
TAGVARCHAR2(32)Tag specified for this backup.
FIRST_CHANGE#NUMBERFirst change SCN included in the archived redo log file.
NEXT_CHANGE#NUMBERNext change SCN after this archived redo log file.
FIRST_TIMEDATETime corresponding to FIRST_CHANGE#.
NEXT_TIMEDATETime corresponding to NEXT_CHANGE#.
OUTPUT_BYTESNUMBERSum of sizes of all output pieces generated by this job.
COMPLETION_TIMEDATEThe time at which the job was completed.
OUTPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as OUTPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.

PKĻ/QÖ))PKHiUIOEBPS/compat003.htmN#Ī‹ RMAN Compatibility Matrix

RMAN Compatibility Matrix

In general, the rules of RMAN compatibility are as follows:

Table B-2 shows version requirements for RMAN components. Note that the symbol >= before a release means all Oracle Database releases from this release or later along with their patches.

Table B-2 RMAN Compatibility Table

Target/Auxiliary DatabaseRMAN clientRecovery Catalog DatabaseRecovery 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

9.2.0

>=9.0.1.3 and <= target database executable

>=8.1.7

>= RMAN client

10.1.0

>=9.0.1.3 and <= target database executable

>=9.0.1

>= RMAN client

10.2.0

>=9.0.1.3 and <= target database executable

>=9.0.1

>= RMAN client

11.1.0

>=9.0.1.3 and <= target database executable

>=9.0.1

>= RMAN client


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.

PKĺx:"S#N#PKHiUIOEBPS/rcviews049.htm6…Ó RC_RMAN_OUTPUT

RC_RMAN_OUTPUT

RC_RMAN_OUTPUT corresponds to the control file view V$RMAN_OUTPUT.

This view is primarily for internal use by Enterprise Manager.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for the target database. Use this column to join with almost any other catalog view.
RSR_KEYNUMBERUnique key for the row in RC_RMAN_STATUS corresponding to the job that created this output.
SESSION_KEYNUMBERSession identifier. Use in joins with RC_RMAN_OUTPUT and RC_RMAN_BACKUP_JOB_DETAILS.
RECIDNUMBERContains the value displayed in V$RMAN_OUTPUT.RECID for this database.
STAMPNUMBERStamp (used for ordering) of when the row for this line out output was added.
OUTPUTVARCHAR2(130)RMAN output text.

PKBÖų;6PKHiUIOEBPS/rcmsynta022.htmĄ{ų EXIT

EXIT

Purpose

Use the EXIT command to shut down the Recovery Manager utility. This command is functionally equivalent to the QUIT command.

Prerequisites

Execute only at the RMAN prompt.

Syntax

exit::=

Description of exit.gif follows

Example

Example 2-78 Exiting RMAN

This example terminates RMAN:

RMAN> EXIT
PKz[∑TČĄPKHiUIOEBPS/rcviews032.htm„Ś 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for the target database. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the incarnation of the target database. Use this column to join with RC_DATABASE_INCARNATION.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
RECIDNUMBERThe 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.
STAMPNUMBERThe 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#NUMBERThe thread number of the online redo log.
SEQUENCE#NUMBERThe log sequence number of the redo log.
FIRST_CHANGE#NUMBERThe SCN generated when switching into the redo log.
FIRST_TIMEDATEThe time stamp when switching into the redo log.
NEXT_CHANGE#NUMBERThe first SCN of the next redo log in the thread.
CLEAREDVARCHAR2(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.

PK’¨é!PKHiUIOEBPS/compat004.htmö eŲ Cross-Version Compatibility of Recovery Catalog Exports and Imports

Cross-Version Compatibility of Recovery Catalog Exports and Imports

Data Pump Exports of the recovery catalog are often used as a way to backup its contents. When planning to use Data Pump Export to make a logical backup of the recovery catalog, see Oracle Database Utilities for details on compatibility issues relating to the use of database exports across versions of Oracle Database.

Exports from a later version of the database cannot be imported into databases running under earlier versions. You must export your recovery catalog data using the export utility from the earliest version of Oracle Database that you need to use for a recovery catalog.

For example, if you want to export recovery catalog data from a 9.2.0.5 database and you expect to import it into an 8.1.7.4 version of Oracle for disaster recovery, you must use the export utility from the 8.1.7.4 release of Oracle to perform the export operation. Otherwise, the import operation will fail.

PK83Ógü ö PKHiUIOEBPS/rcmsynta050.htmŰP Į TRANSPORT TABLESPACE

TRANSPORT TABLESPACE

Purpose

Use the TRANSPORT TABLESPACE command to create transportable tablespace sets from RMAN backups instead of the live datafiles of the source database.


See Also:

Oracle Database Backup and Recovery User's Guide to learn how to transport tablespaces with RMAN

Prerequisites

The limitations on creating transportable tablespace sets described in Oracle Database Administrator's Guide apply to transporting tablespaces from backup, with the exception of the requirement to make the tablespaces read-only.

Note that the SYSAUX tablespace must not be part of the recovery set, which is the set of tablespaces to be transported. RMAN enforces inclusion of the SYSAUX tablespace in the auxiliary set, which contains datafiles and other files required for the tablespace transport.

TRANSPORT TABLESPACE does not convert endian formats. If the target platform has a different endian format, then after running TRANSPORT TABLESPACE use the CONVERT command to convert the endian format of the transportable set datafiles.

If you drop a tablespace, then you cannot later use TRANSPORT TABLESPACE to include this 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 rename a tablespace, then you cannot use TRANSPORT TABLESPACE to create a transportable tablespace set as of a point in time before the tablespace was renamed.

Backups and Backup Metadata

You must have a backup of all needed tablespaces (including those in the auxiliary set) and archived redo logs needed to recover to the target point in time.

If you do not use a recovery catalog, and if the database has re-used control file records containing metadata about required backups, then the command fails because RMAN cannot locate the 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.

Data Pump Export and Import

Because the RMAN uses the Data Pump Export and Import utilities, you cannot use TRANSPORT TABLESPACE if the tablespaces to be transported use XMLType. In this case you must use the procedure in Oracle Database Administrator's Guide.

If a file under the name of the export dump file already in the tablespace destination, then TRANSPORT TABLESPACE fails when it calls Data Pump Export. If you are repeating a previous TRANSPORT TABLESPACE job, then make sure to delete the previous output files, including the export dump file.

Tablespace and Column Encryption

The following database encryption features both use the wallet: transparent data encryption, which functions at the column level, and tablespace encryption. Note the following restrictions for tablespaces that are encrypted or contain encrypted columns:


See Also:

Oracle Database Advanced Security Administrator's Guide to learn about transparent data encryption

Usage Notes

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 RMAN is not part of the backup strategy for your database, then you can still use TRANSPORT TABLESPACE as long as the needed datafile copies and archived logs are available on disk. Use the CATALOG command to record the datafile copies and archived logs in the RMAN repository. You can then use TRANSPORT TABLESPACE. You also have the option of using RMAN to back up your database specifically so you can use TRANSPORT TABLESPACE.

Syntax

transpt_tbs::=

Description of transpt_tbs.gif follows

(transpt_tbs_optlist::=)

transpt_tbs_optlist::=

Description of transpt_tbs_optlist.gif follows

(untilClause::=)

Semantics

transpt_tbs

Syntax ElementDescription
tablespace_nameSpecifies the name of each tablespace to transport.

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 time for the TRANSPORT TABLESPACE operation.


transpt_tbs_optlist

This subclause specifies optional parameters that affect the tablespace transport.

Syntax ElementDescription

AUXILIARY DESTINATION
'location'
Specifies the location for files for the auxiliary instance.

You can use SET NEWNAME and CONFIGURE AUXNAME to override this argument for individual files. If using your own initialization parameter file to customize the auxiliary instance, then you can use the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT initialization parameters instead of AUXILIARY DESTINATION.

See Also: Oracle Database Backup and Recovery User's Guide for details on the interactions among the different techniques for naming the auxiliary instance files


DATAPUMP DIRECTORY
datapump_directory
Specifies a database directory object where Data Pump Export outputs are created (see Example 2-152). If not specified, then RMAN creates files in the location specified by TABLESPACE DESTINATION.

See Also: Oracle Database Utilities for more details on Data Pump Export and database directory objects

DUMP FILE 'filename'Specifies where to create the Data Pump 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.

Note: If a file under the name of the export dump file already in the tablespace destination, then TRANSPORT TABLESPACE fails when it calls Data Pump Export. If you are repeating a previous TRANSPORT TABLESPACE job, then make sure to delete the previous output files, including the export dump file.

EXPORT LOG 'filename'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 'filename'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
tablespace_destination
Specifies the location of the datafiles for the transported tablespaces after the tablespace transport operation completes.

TO RESTORE POINT
restore_point_name
Specifies a restore point for tablespace restore and recovery, with the SCN at which the restore point was created as the upper, inclusive limit. Because the limit is inclusive, RMAN selects only files that can be used to restore or recover tablespaces up to and including the SCN corresponding to the restore point.
untilClause
Specifies a past time, SCN, or log sequence number (see Example 2-151). If specified, RMAN restores and recovers the tablespaces at the auxiliary instance to their contents at that past point in time before export.

If you rename a tablespace, then you cannot use this command to create a transportable tablespace set as of a point in time before the tablespace was renamed. RMAN has no knowledge of the previous name of the tablespace.

Tablespaces including undo segments as of the UNTIL time or SCN for TRANSPORT TABLESPACE must be part of the auxiliary set. The control file only contains a record of tablespaces that include undo segments at the current time. If the set of tablespaces with undo segments was different at the UNTIL time or SCN, then TRANSPORT TABLESPACE fails. Thus, if you use RMAN in NOCATALOG mode and specify UNTIL, then the set of tablespaces with undo segments at the time TRANSPORT TABLESPACE executes must be the same as the set of tablespaces with undo segments at the UNTIL time or SCN.


Examples

Example 2-151 Using TRANSPORT TABLESPACE with a Past Time

In this example, the tablespaces for the transportable set are example and tools, the transportable set files are to be stored at /disk1/transport_dest, and the transportable tablespaces are to be recovered to a time 15 minutes ago:

TRANSPORT TABLESPACE example, tools
  TABLESPACE DESTINATION '/disk1/transportdest'
  AUXILIARY DESTINATION '/disk1/auxdest'
  UNTIL TIME 'SYSDATE-15/1440';

Partial sample output follows:

Creating automatic instance, with SID='egnr'
 
initialization parameters used for automatic instance:
db_name=PROD
compatible=11.0.0
db_block_size=8192
.
.
.
starting up automatic instance PROD
.
.
. 
executing Memory Script
 
executing command: SET until clause
 
Starting restore at 07-JUN-07
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=44 device type=DISK
 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
.
.
.
output file name=/disk1/auxdest/cntrl_tspitr_PROD_egnr.f
Finished restore at 07-JUN-07
 
sql statement: alter database mount clone database
 
sql statement: alter system archive log current
 
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
 
starting full resync of recovery catalog
full resync complete
.
.
.
executing Memory Script
.
.
.
 
Starting restore at 07-JUN-07
using channel ORA_AUX_DISK_1
 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /disk1/auxdest/TSPITR_PROD_EGNR/datafile/o1_mf_system_%u_.dbf
datafile 1 switched to datafile copy
.
.
.
starting media recovery
.
.
. 
Finished recover at 07-JUN-07
 
database opened
.
.
.
executing Memory Script
.
.
.
sql statement: alter tablespace EXAMPLE read only
Removing automatic instance
shutting down automatic instance
Oracle instance shut down
Automatic instance removed
auxiliary instance file /disk1/auxdest/cntrl_tspitr_PROD_egnr.f deleted
.
.
.

Example 2-152 Using TRANSPORT TABLESPACE with Customized File Locations

This example illustrates the use of the optional arguments that control the locations of Data Pump-related files such as the dump file. Note that the DATAPUMP DIRECTORY must refer to an object that exists in the target database. Use the CREATE DIRECTORY SQL statement to create a directory object.

TRANSPORT TABLESPACE example
  TABLESPACE DESTINATION '/disk1/transportdest'
  AUXILIARY DESTINATION '/disk1/auxdest'
  DATAPUMP DIRECTORY mypumpdir
  DUMP FILE 'mydumpfile.dmp'
  IMPORT SCRIPT 'myimportscript.sql'
  EXPORT LOG 'myexportlog.log';
PK∆ß}7ýPŰPPKHiUIOEBPS/rcviews040.htmŅO@į 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for the target database. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the incarnation of the target database. Use this column to join with RC_DATABASE_INCARNATION.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
XDF_KEYNUMBERThe proxy copy primary key in the recovery catalog. If you issue the LIST command while RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output.
RECIDNUMBERThe proxy copy record identifier from V$PROXY_DATAFILE. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe proxy copy stamp from V$PROXY_DATAFILE. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
TAGVARCHAR2(32)The tag for the proxy copy.
FILE#NUMBERThe absolute file number of the datafile that is proxy copied.
CREATION_CHANGE#NUMBERThe datafile creation SCN.
CREATION_TIMEDATEThe datafile creation time.
RESETLOGS_CHANGE#NUMBERThe SCN of the most recent RESETLOGS in the datafile header.
RESETLOGS_TIMEDATEThe time stamp of the most recent RESETLOGS in the datafile header.
INCREMENTAL_LEVELNUMBER0 if this copy is part of an incremental backup strategy, otherwise NULL.
CHECKPOINT_CHANGE#NUMBERCheckpoint SCN when the copy was made.
CHECKPOINT_TIMEDATECheckpoint time when the copy was made.
ABSOLUTE_FUZZY_CHANGE#NUMBERThe 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#NUMBERThe 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_TIMEDATEThe time that is associated with the RECOVERY_FUZZY_CHANGE#.
ONLINE_FUZZYVARCHAR2(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_FUZZYVARCHAR2(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.
BLOCKSNUMBERSize of the datafile copy in blocks (also the size of the datafile when the copy was made).
BLOCK_SIZENUMBERThe block size for the copy in bytes.
DEVICE_TYPEVARCHAR2(255)The type of sequential media device.
HANDLEVARCHAR2(1024)The name or "handle" for the proxy copy. RMAN passes this value to the operating system-dependent layer that identifies the file.
COMMENTSVARCHAR2(255)Comments about the proxy copy.
MEDIAVARCHAR2(80)A comment that contains further information about the media manager that created this backup.
MEDIA_POOLNUMBERThe number of the media pool in which the proxy copy is stored.
START_TIMEDATEThe time when proxy copy was initiated.
COMPLETION_TIMEDATEThe time when the proxy copy was completed.
ELAPSED_SECONDSNUMBERThe duration of the proxy copy.
STATUSVARCHAR2(1)The status of the backup set: A (available), U (unavailable), X (expired), or D (deleted).
KEEPVARCHAR2(3)Indicates whether this proxy copy has a retention policy different from the value for CONFIGURE RETENTION POLICY (YES or NO).
KEEP_UNTILDATEIf 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_OPTIONSVARCHAR2(11)The KEEP options specified for this backup. Possible values are NOLOGS, BACKUP_LOGS, LOGS, and NULL. NOLOGS indicates a consistent backup made when the database was mounted. BACKUP_LOGS indicates that the backup was made in open mode, so archived log backups must be applied to make it consistent. LOGS indicates a long-term backup made with the LOGS keyword, which is now deprecated. NULL indicates that this backup has no KEEP options and becomes obsolete based on the retention policy.
RSR_KEYNUMBERUnique key for the row in RC_RMAN_STATUS corresponding to the job that created this proxy copy.
SITE_KEYNUMBERPrimary key of the Data Guard database associated with this file. Each database in a Data Guard environment has a unique SITE_KEY value. You can use SITE_KEY in a join with the RC_SITE view to obtain the DB_UNIQUE_NAME of the database.
FOREIGN_DBIDNUMBERForeign DBID of the database from which this datafile was transported. The value is 0 if the file backed up is not a foreign database file.
PLUGGED_READONLYVARCHAR2(3)YES if this is a proxy copy of a transported read-only foreign file; otherwise NO.
PLUGIN_CHANGE#NUMBERSCN at which the foreign datafile was transported into the database. The value is 0 if this file is not a foreign database file.
PLUGIN_RESETLOGS_CHANGE#NUMBERThe SCN of the RESETLOGS operation for the incarnation into which this foreign file was transported. The value is 0 if this file is not a foreign database file.
PLUGIN_RESETLOGS_TIMEDATEThe time of the RESETLOGS operation for the incarnation into which this foreign file was transported. The value is 0 if this file is not a foreign database file.

PKŐĽéńOŅOPKHiUIOEBPS/rcviews047.htm« 8Ű 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.

ColumnDatatypeDescription
WEIGHTNUMBERUsed internally by Enterprise Manager to set precedence order of different backup types in reports.
INPUT_TYPEVARCHAR2(13)Used internally by Enterprise Manager to represent possible filters used in creating various reporting screens.

PKó~ö/Ő « PKHiUIOEBPS/rcmsubcl006.htmôfÔ deviceSpecifier

deviceSpecifier

Purpose

Use the deviceSpecifier subclause to specify the type of storage for a backup.

Syntax

deviceSpecifier::=

Description of devicespecifier.gif follows

Semantics

Syntax ElementDescription
DISKSpecifies a disk storage device (see Example 3-16).
media_deviceSpecifies a sequential I/O device or access method for storage (see Example 3-15).

The media_device variable specifies a case-insensitive name for a media manager. The syntax and semantics of sequential I/O device types are platform-specific. The most common value is sbt or sbt_tape (which are synonymous values).

Note: RMAN stores the value sbt in the recovery catalog as sbt_tape for backward compatibility.


Examples

Example 3-15 Allocating a Tape Channel

This example allocates a maintenance channel for a media management device:

ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
CROSSCHECK BACKUP;
RELEASE CHANNEL;

Example 3-16 Backing Up the Database to Disk

This example backs up the database to disk:

BACKUP DEVICE TYPE DISK DATABASE;
PKšŠ+cěôPKHiUIOEBPS/rcmcomma002.htmĹ BŖ RMAN Syntax Diagrams

RMAN Syntax Diagrams

Syntax descriptions are provided in this book for RMAN command-line constructs in graphic form or Backus Naur Form (BNF). See Oracle Database SQL Language Reference for general information about how to interpret syntax diagrams and BNF notation. This section explains RMAN conventions exclusively.

Recovery Manager syntax diagrams use lines and arrows to show syntactic structure, as shown in the following example for the CATALOG command.

catalog::=

Sample syntax diagram

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 in RMAN Syntax

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 in RMAN Syntax

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:

  • Names of database objects (tablespace_name)

  • Oracle datatype names (date_string)

  • Subclauses (datafileSpec)

When you see a placeholder in a syntax diagram, substitute an object or expression of the appropriate type in the RMAN statement. For example, to write a DUPLICATE TARGET DATABASE TO 'database_name' command, use the name of the duplicate database you want to create, such as dupdb, in place of the database_name placeholder in the diagram.

The only system-independent, valid environment variables in RMAN quoted strings are a question mark (?) for the Oracle home and an at-sign (@) 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.

PlaceholderDescriptionExamples
Quoted strings such as 'filename', 'tablespace_name', 'channel_name', 'channel_parms'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"

'dev1'

Nonquoted strings such as channel_id, tag_name, date_stringA sequence of characters containing no white space and no punctuation characters and starting with an alphabetic character.ch1
integerAny sequence of only numeric characters.67843

Quotes in RMAN Syntax

The RMAN syntax diagrams shows some placeholder values enclosed in required or optional quotes. The syntax diagrams show single quotes, though in all cases double quotes are also valid in RMAN syntax. For example, you may specify either 'filename' or "filename". For SQL commands, use double quotes, because the SQL statement may also contain quotes. Single and double quotes are not used interchangeably in SQL, and single quotes are the more common type of quote in a SQL statement.

PK†’?Ģ¬ Ĺ PKHiUIOEBPS/rcmcomma005.htm›T"ę Summary of RMAN Commands

Summary of RMAN Commands

Table 1-2 provides a functional summary of RMAN commands that you can execute at the RMAN prompt, within a RUN command, or both. All commands from previous RMAN releases work with the current release, although some commands and options are now deprecated (see Appendix A, "Deprecated RMAN Syntax"). For command-line options for the RMAN client, refer to RMAN.

Table 1-2 Recovery Manager Commands

CommandPurpose

@ (at sign)


Run a command file.

@@ (double at sign)


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.

ADVISE FAILURE


Display repair options.

ALLOCATE CHANNEL


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

ALLOCATE CHANNEL FOR MAINTENANCE


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

ALTER DATABASE


Mount or open a database.

BACKUP


Back up database files, copies of database files, archived logs, or backup sets.

CATALOG


Add information about file copies and user-managed backups to the repository.

CHANGE


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; update the recovery catalog with the DB_UNIQUE_NAME for the target database.

CONFIGURE


Configure persistent RMAN settings. These settings apply to all RMAN sessions until explicitly changed or disabled.

CONNECT


Establish a connection between RMAN and a target, auxiliary, or recovery catalog database.

CONVERT


Convert datafile formats for transporting tablespaces and databases across platforms.

CREATE CATALOG


Create the schema for the recovery catalog.

CREATE SCRIPT


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

CROSSCHECK


Determine whether files managed by RMAN, such as archived logs, datafile copies, and backup pieces, still exist on disk or tape.

DELETE


Delete backups and copies, remove references to them from the recovery catalog, and update their control file records to status DELETED.

DELETE SCRIPT


Delete a stored script from the recovery catalog.

DROP CATALOG


Remove the schema from the recovery catalog.

DROP DATABASE


Delete the target database from disk and unregisters it.

DUPLICATE


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


Run an RMAN stored script.

EXIT


Quit the RMAN executable.

FLASHBACK DATABASE


Returns the database to its state at a previous time or SCN.

GRANT


Grants privileges to a recovery catalog user.

HOST


Invoke an operating system command-line subshell from within RMAN or run a specific operating system command.

IMPORT CATALOG


Imports the metadata from one recovery catalog into a different recovery catalog.

LIST


Produce a detailed listing of backup sets or copies.

PRINT SCRIPT


Display a stored script.

QUIT


Exit the RMAN executable.

RECOVER


Apply redo logs and incremental backups to datafiles or data blocks restored from backup or datafile copies, in order to update them to a specified time.

REGISTER DATABASE


Register the target database in the recovery catalog.

RELEASE CHANNEL


Release a channel that was allocated with an ALLOCATE CHANNEL command or ALLOCATE CHANNEL FOR MAINTENANCE command.

REPAIR FAILURE


Repair one or more failures recorded in the automated diagnostic repository.

REPLACE SCRIPT


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

REPORT


Perform detailed analyses of the content of the recovery catalog.

RESET DATABASE


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


Restore files from backup sets or from disk copies to the default or a new location.

RESYNC CATALOG


Perform a full resynchronization, which creates a snapshot control file and then copies any new or changed information from that snapshot control file to the recovery catalog.

REVOKE


Revoke privileges from a recovery catalog user.

RMAN


Start RMAN from the operating system command line.

RUN


Execute a sequence of one or more RMAN commands, which are one or more statements executed within the braces of RUN.

SEND


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

SET


Set the value of various attributes that affect RMAN behavior for the duration of a RUN block or a session.

SHOW


Display the current CONFIGURE settings.

SHUTDOWN


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

SPOOL


Write RMAN output to a log file.

SQL


Execute a SQL statement from within Recovery Manager.

STARTUP


Start up the target database. This command is equivalent to the SQL*Plus STARTUP command.

SWITCH


Specify that a datafile copy is now the current datafile, that is, the datafile pointed to by the control file. This command is equivalent to the SQL statement ALTER DATABASE RENAME FILE as it applies to datafiles.

TRANSPORT TABLESPACE


Create transportable tablespace sets from backup for one or more tablespaces.

UNREGISTER


Unregister a database from the recovery catalog.

UPGRADE CATALOG


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

VALIDATE


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


PK*ł§÷‚T›TPKHiUIOEBPS/rcmsubcl001.htmČBvĹ allocOperandList

allocOperandList

Purpose

Use the allocOperandList subclause to control options on a channel, which is a connection between RMAN and a database instance.

Syntax

allocOperandList::=

Description of allocoperandlist.gif follows

(connectStringSpec::=, formatSpec::=)

sizeSpec::=

Description of sizespec.gif follows

Semantics

allocOperandList

Syntax ElementDescription
CONNECT connectStringSpecSpecifies a connect string to the database instance where RMAN should conduct the backup or restore operations. Use this parameter to spread the work across different instances in an Oracle RAC configuration.

If you do not specify this parameter, and if you did not specify the AUXILIARY option, then RMAN conducts all operations on the target database instance specified by the command-line CONNECT parameter or CONNECT command. Typically, you should not use the CONNECT parameter in conjunction with the AUXILIARY option.

See Also: connectStringSpec and RMAN

AUXILIARY FORMATSpecifies the format of image copies created on an auxiliary instance.

RMAN must be connected to the auxiliary instance with CONNECT AUXILIARY and have access to auxiliary channels.

   formatSpec
Specifies a pattern for image copy names on an auxiliary instance.

The path must be valid on the auxiliary host.

See Also: formatSpec for valid substitution variables

   NEWCreates an image copy in the directory specified by the DB_CREATE_FILE_DEST initialization parameter of the auxiliary instance.

The image copy name is in an Oracle Managed Files format.

FORMAT formatSpecSpecifies the format to use for the names backup pieces or image copies created on this channel. Example 3-1 illustrates this technique.

The FORMAT parameter is useful if you allocate multiple disk channels and want each channel to write to a different directory. The FORMAT parameter specified in CONFIGURE CHANNEL or ALLOCATE CHANNEL is semantically equivalent to the FORMAT parameter specified in the BACKUP command (not the DATAFILECOPY FORMAT parameter in forRecoveryOfSpec). If you specify the FORMAT parameter in the BACKUP command, then it overrides the FORMAT parameter specified in CONFIGURE CHANNEL or ALLOCATE CHANNEL.

If you do not specify FORMAT, then RMAN uses %U by default, which guarantees a unique name for the names of the backup files. If the flash recovery area is configured, then RMAN creates the backup files in the default disk location. Otherwise, the default disk location is operating system-specific (for example, ?/dbs on Solaris).

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.

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 host and the target database runs on a Linux host, then the FORMAT string must adhere to the naming conventions of a Linux file system or raw device.

See Also: formatSpec for available FORMAT parameters

MAXOPENFILES integerControls 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 sizeSpecSpecifies the maximum size of each backup piece created on this channel. Example 3-2 illustrates this technique. 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.

Note: You cannot use BACKUP ... SECTION SIZE in conjunction with MAXPIECESIZE.

PARMS 'channel_parms'Specifies parameters for the sbt channel. Example 3-3 illustrates this technique. Do not use this port-specific string if you have specified DEVICE TYPE DISK.

You can use the following formats for the channel parameters:

  • 'ENV=(var1=val1, var2=val2,...)'

    Specifies one or more environment variables required by the media manager in the server session corresponding to this RMAN client. Because RMAN is a client program, the ENV parameter can be used to set server session-specific variables that perform operations on behalf of the RMAN client, for example, PARMS 'ENV=(OB_DEVICE_1=tape1)'.

  • 'SBT_LIBRARY=lib_name'

    Specifies which media library should be used on this sbt channel, for example, PARMS="SBT_LIBRARY=/oracle/lib/mmv.so". Note that the default library is operating system-specific (for example, libobk.so on Linux and ORASBT.DLL on Windows.

See Also: Oracle Database Backup and Recovery User's Guide to learn how to integrate media management libraries

RATE sizeSpecSets 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'Sends a vendor-specific command string to all allocated channels. For example, you could specify an Oracle Secure Backup media family with SEND 'OB_MEDIA_FAMILY datafile_mf'.

See Also: Your media manager documentation to determine whether this feature is supported and when it should be used


sizeSpec

This subclause specifies the size of data. Refer to sizeSpec::= for the syntax diagram.

Syntax ElementDescription
integer [G ‚Ēā K ‚Ēā M]Specifies the size of data in gigabytes (G), kilobytes (K), or megabytes (M).

Examples

Example 3-1 Specifying the Default Location for Disk Backups

This example allocates a disk channel that specifies a nondefault format, and then backs up the database to the nondefault location.

RUN
{
  ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT = '/disk1/bkup_%U';
  BACKUP DATABASE;
}

Example 3-2 Setting the Maximum Size of a Backup Piece

This example manually allocates an SBT channel, which specifies an Oracle Secure Backup tape drive, and makes a whole database backup. The MAXPIECESIZE parameter specifies that no backup piece written to tape should exceed 800 MB.

RUN
{
  ALLOCATE CHANNEL c1 DEVICE TYPE sbt 
    PARMS 'SBT_LIBRARY=/usr/local/oracle/backup/lib/libobk.so, ENV=(OB_DEVICE_1=stape1)'
    MAXPIECESIZE 800M;
  BACKUP DATABASE;
}

Example 3-3 Setting SBT Channel Parameters

This example configures the default SBT channel to use the Oracle Secure Backup tape drive named stape1 and makes a database backup with the default channel:

CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_DEVICE_1=stape1)';
BACKUP DATABASE;

Later you decide to back up the database to drive stape2. The following examples uses a manually allocated SBT channel to back up the database to stape2.

RUN
{
  ALLOCATE CHANNEL st2 DEVICE TYPE sbt 
    PARMS 'ENV=(OB_DEVICE_1=stape2)';
  BACKUP DATABASE;
}
PK$∂łéBČBPKHiUIOEBPS/rcmsynta019.htmNĪž DROP DATABASE

DROP DATABASE

Purpose

Use the DROP DATABASE command to delete the target database and, if RMAN is connected to a recovery catalog, unregister it. RMAN removes all datafiles, online redo logs, and control files belonging to the target database. By default, RMAN prompts for confirmation.

Prerequisites

Execute this command only at the RMAN prompt. You must be connected to a target database. The target database must be mounted exclusive and not open, and started in RESTRICT mode.

Syntax

dropDatabase::=

Description of dropdatabase.gif follows

Semantics

Syntax ElementDescription
INCLUDING BACKUPSDeletes backup sets, proxy copies, image copies, and archived redo 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.

NOPROMPTDoes not prompt for confirmation before deleting the database.

Example

Example 2-69 Deleting a Database

In this example, you want to delete a test database called test1 that is registered in the recovery catalog. You start the RMAN client, connect to database test1 as TARGET, and connect to the recovery catalog. You then run the following commands to delete the target database files, as well as all backups, copies, and archived logs associated with the database:

RMAN> CONNECT TARGET SYS@test1

target database Password: password
connected to target database: TEST1 (DBID=39525561)

RMAN> STARTUP FORCE MOUNT
RMAN> SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION';
RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;
PKŰUäóSNPKHiUIOEBPS/rcviews009.htmĚbŤ RC_BACKUP_COPY_SUMMARY

RC_BACKUP_COPY_SUMMARY

RC_BACKUP_COPY_SUMMARY contains summary information about all AVAILABLE control file and datafile copies for each database.

This view is primarily intended to be used internally by Enterprise Manager.

ColumnDatatypeDescription
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
NUM_COPIESNUMBERTotal number of image copy backups.
NUM_DISTINCT_COPIESNUMBERNumber of distinct image copy backups.
MIN_CHECKPOINT_CHANGE#NUMBERMinimum checkpoint SCN among all image copy backups described in this view.
MAX_CHECKPOINT_CHANGE#NUMBERMaximum checkpoint SCN among all image copy backups described in this view.
MIN_CHECKPOINT_TIMEDATEEarliest checkpoint time among all copies described in this view.
MAX_CHECKPOINT_TIMEDATELatest checkpoint time among all copies described in this view.
OUTPUT_BYTESNUMBERSum of sizes of all datafile and control file copies.
OUTPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as OUTPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.

PKwėDĘĚPKHiUIOEBPS/rcmsynta017.htm÷)ť DELETE SCRIPT

DELETE SCRIPT

Purpose

Use the DELETE SCRIPT command to delete a local or global stored script from the recovery catalog.

Prerequisites

Execute DELETE SCRIPT only at the RMAN prompt. RMAN must be connected to a recovery catalog and target database. The recovery catalog database must be open.

Usage Notes

A stored script may be local or global. A local script is created for the current target database only, whereas a global script is available for use with any database registered in the recovery catalog.

If GLOBAL is specified, then a global script with this name must already exist in the recovery catalog; otherwise, RMAN returns error RMAN-06710. If you do not specify GLOBAL, then RMAN looks for a local stored script with the specified name defined on the current target database. If no such script is defined on the target database, then RMAN checks for a global stored script with this name and deletes it if it exists.

Syntax

deleteScript::=

Description of deletescript.gif follows

Semantics

Syntax ElementDescription
GLOBALIdentifies the script as global.

If you attempt to delete a global script, then RMAN must not be connected to a virtual private catalog. Virtual catalog users cannot modify global scripts, although they can execute them.

See Also: "Usage Notes" for an explanation of the difference between global and local scripts

SCRIPT script_nameSpecifies the name of the script to delete. Quotes must be used around the script name when the name contains either spaces or reserved words.

Example

Example 2-67 Deleting a Global Script

This example deletes global script backup_db from the recovery catalog (sample output included):

RMAN> LIST SCRIPT NAMES;
 
List of Stored Scripts in Recovery Catalog
 
 
    Scripts of Target Database PROD
 
       Script Name
       Description
       -----------------------------------------------------------------------
       backup_whole
       backup whole database and archived redo logs
 
 
    Global Scripts
 
 
       Script Name
       Description
       -----------------------------------------------------------------------
       global_backup_db
       back up any database from the recovery catalog, with logs
 
RMAN> DELETE GLOBAL SCRIPT global_backup_db;
 
deleted global script: global_backup_db
 
RMAN> LIST SCRIPT NAMES;
 
List of Stored Scripts in Recovery Catalog
 
 
    Scripts of Target Database PROD
 
       Script Name
       Description
       -----------------------------------------------------------------------
       backup_whole
       backup whole database and archived redo logs
PK){5oŘ÷PKHiUIOEBPS/rcviews007.htmů š 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.

ColumnDatatypeDescription
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
NUM_FILES_BACKEDNUMBERTotal number of control file backups.
NUM_DISTINCT_FILES_BACKEDNUMBERNumber of distinct control files backed up.
MIN_CHECKPOINT_CHANGE#NUMBERLowest checkpoint SCN among all backed up control file s.
MAX_CHECKPOINT_CHANGE#NUMBERHighest checkpoint SCN among all backed up control files.
MIN_CHECKPOINT_TIMEDATEEarliest checkpoint time of any control file in the summary.
MAX_CHECKPOINT_TIMEDATELatest checkpoint time of any control file in the summary.
INPUT_BYTESNUMBERTotal size of input files, in bytes.
OUTPUT_BYTESNUMBERSum of sizes of all output pieces generated by this job.
COMPRESSION_RATIONUMBERCompression ratio for this backup.
INPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as INPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.
OUTPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as OUTPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.

PKég›cÝůPKHiUIOEBPS/rcmsubcl008.htmýÍ forDbUniqueNameOption

forDbUniqueNameOption

Purpose

Use the forDbUniqueNameOption subclause to specify either all databases or a specific database in a Data Guard environment.

Usage Notes

The DBID for a primary database is identical to the DBID of its associated physical standby databases. A database is uniquely identified in the recovery catalog by a DBID and the value of its DB_UNIQUE_NAME initialization parameter.

When you specify forDbUniqueNameOption for any command, RMAN restricts its operations to the objects that are associated exclusively with the database with the specified DB_UNIQUE_NAME. For example, if you use this option with the LIST command, then RMAN lists only the objects associated exclusively with the database with the specified DB_UNIQUE_NAME. Note that objects that are not associated with any database (SITE_KEY column in the recovery catalog view is null) are not listed.

Syntax

forDbUniqueNameOption::=

Description of fordbuniquenameoption.gif follows

Semantics

Syntax ElementDescription
FOR DB_UNIQUE_NAME ALLSpecifies all primary and standby databases in the recovery catalog that share the DBID of the target database (or DBID specified by the SET DBID command).

FOR DB_UNIQUE_NAME
db_unique_name
Specifies the primary or standby database in the recovery catalog with the specified db_unique_name.

Examples

Example 3-19 Listing Expired Backups Associated with a Standby Database

This example connects to a recovery catalog and sets the DBID for the Data Guard environment. All primary and standby databases in this environment share the same DBID. The LIST command lists all expired backups associated with database standby1:

RMAN> CONNECT CATALOG rman@catdb;

recovery catalog database Password: password
connected to recovery catalog database

RMAN> SET DBID 3257174182;
RMAN> LIST EXPIRED BACKUP FOR DB_UNIQUE_NAME standby1;
PK Hiř PKHiUIOEBPS/rcmsynta010.htmġ CONFIGURE

CONFIGURE

Purpose

Use the CONFIGURE command to create or change a persistent configuration affecting RMAN backup, restore, duplication, and maintenance jobs on a particular database. A configuration is in effect for any RMAN session on this database until the configuration is explicitly cleared or changed. You can use the SHOW command to display the configurations for one or more databases.


See Also:

Oracle Database Backup and Recovery User's Guide to learn how to configure the RMAN environment

Additional Topics

Prerequisites

Execute this command only at the RMAN prompt.

Unless you specify the FOR DB_UNIQUE_NAME clause, an RMAN connection to a target database is required. The target database must be mounted or open.

Usage Notes

The CONFIGURE command always stores a configuration for a target database in the target database control file. If you use RMAN with a recovery catalog, then RMAN also stores persistent configuration settings for each registered database in the catalog.

Default RMAN Configuration Settings

The RMAN CONFIGURE settings have defaults. You can return to the default for any CONFIGURE command by rerunning the command with the CLEAR option, but you cannot clear individual parameters in this way. For example, you can run

CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR

but not

CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 5M CLEAR

RMAN Configuration in a Data Guard Environment

In a Data Guard environment, Oracle recommends that you always use RMAN with a recovery catalog. You can use the CONFIGURE command to create persistent RMAN configurations for any individual primary or standby database in the Data Guard environment, with the exception of settings for backup retention policy, tablespace exclusion, and auxiliary names. Thus, the primary and standby databases can have different channel configurations, control file autobackup locations, and so on.

You can use the FOR DB_UNIQUE_NAME clause to configure a database to which RMAN is not connected as TARGET. You can use CONFIGURE DB_UNIQUE_NAME to make a new physical standby database known to the recovery catalog and implicitly register it.

Syntax

configure::=

Description of configure.gif follows

(datafileSpec::=, backupConf::=, cfauConf::=, deviceConf::=, forDbUniqueNameOption::=)

delalConf::=

Description of delalconf.gif follows

(deviceSpecifier::=)

backupConf::=

Description of backupconf.gif follows

(deviceSpecifier::=, sizeSpec::=)

cfauConf::=

Description of cfauconf.gif follows

(deviceSpecifier::=, formatSpec::=)

deviceConf::=

Description of deviceconf.gif follows

(deviceSpecifier::=, allocOperandList::=)

sizeSpec::=

Description of sizespec.gif follows

forDbUniqueNameOption::=

Description of fordbuniquenameoption.gif follows

Semantics

configure

Syntax ElementDescription

DB_UNIQUE_NAME
db_unique_name
{CLEAR¬†‚Ēā¬†CONNECT IDENTIFIER
'connect_string'}
Specifies the net service name for the physical standby database specified by DB_UNIQUE_NAME. The CONNECT IDENTIFIER string must not include the database username and password.

RMAN must also be connected to the primary database as TARGET. RMAN must be connected to a recovery catalog.

When you run the RESYNC CATALOG FROM DB_UNIQUE_NAME command, databases in a Data Guard environment use the net service name to connect with the db_unique_name database. For example, assume that a standby database has the unique name standby1 and the net service name sby1. You connect RMAN as TARGET to the primary database and execute CONFIGURE DB_UNIQUE_NAME 'standby1' CONNECT IDENTIFIER 'sby1'. Every primary and standby database in the environment will use the net service name sby1 when it needs to make an Oracle Net connection to standby1.

Note: When the target database needs to connect to other standby or primary databases, it connects as the SYS user by using the existing Data Guard authentication mechanisms.

Suppose that you recently connected RMAN as TARGET to the primary database and used CONFIGURE ... FOR DB_UNIQUE_NAME standby_new to configure backup settings for standby database standby_new. However, you have not yet connected RMAN as TARGET to standby_new. In this case, you can execute RESYNC CATALOG FROM DB_UNIQUE_NAME standby_new. The primary database uses the connect identifier to make an Oracle Net connection to the standby database. When you later connect RMAN to the standby database, RMAN pushes the configuration from the recovery catalog to the mounted control file.

Note: If the database specified by CONFIGURE DB_UNIQUE_NAME is not registered in the recovery catalog, then RMAN implicitly registers it.

delalConf
Configures an archived redo log deletion policy.

AUXNAME FOR DATAFILE
datafileSpec TO 'filename'
Configures the auxiliary filename for the specified target datafile to 'filename' (see Example 2-44). Specify CLEAR to unspecify the auxiliary filename.

If you are performing TSPITR or using DUPLICATE, then you can set AUXNAME to preconfigure the filenames for use on the auxiliary database without manually specifying the auxiliary filenames during the procedure.

For example, use this command during TSPITR if the datafiles are on raw disk and you must restore auxiliary datafiles to raw disk for performance reasons. Typically, you set the AUXNAME parameter in TSPITR for the datafiles of the SYSTEM and SYSAUX tablespaces and the tablespaces containing rollback or undo segments. Do not overlay files which are in use by the production database and can be discarded after TSPITR completes. In essence, the AUXNAME of a datafile is the location where TSPITR can create a temporary copy of it.

When renaming files with the DUPLICATE command, CONFIGURE AUXNAME is an alternative to SET NEWNAME. The difference is that after you set the AUXNAME the first time, you do not need to reset the filename when you issue another DUPLICATE command: the AUXNAME setting remains in effect until you issue CONFIGURE AUXNAME ... CLEAR. In contrast, you must reissue the SET NEWNAME command every time you execute the DUPLICATE command.

See Also: Oracle Database Backup and Recovery User's Guide to learn how to perform RMAN TSPITR, and Oracle Database Backup and Recovery User's Guide to learn how to duplicate a database with RMAN

backupConf
Configures default backup options such as duplexing, optimization, excluding tablespaces, backup set sizes, and retention policies.
cfauConf
Configures control file autobackup settings.

COMPRESSION ALGORITHM
'algorithm_name'
Specifies the algorithm that RMAN uses to create compressed backup sets. The default compression algorithm is BZIP2.

The supported algorithms are ZLIB and BZIP2. ZLIB is optimized for CPU efficiency. BZIP2 is optimized for maximum compression. BZIP2 consumes more CPU resource than ZLIB, but will usually produce more compact backups. The COMPATIBLE initialization parameter must be set to 11.0.0 or higher for ZLIB compression, which requires the Oracle Advanced Compression option.

Note: The V$RMAN_COMPRESSION_ALGORITHM view describes supported algorithms.

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.
ENCRYPTIONSpecifies transparent-mode encryption settings for the database or tablespaces.

This configuration applies unless overridden with the SET ENCRYPTION command. Options specified for an individual tablespace take precedence over options specified for the whole database.

See Also: "Encryption of Backup Sets" to learn about the different modes of backup encryption, and Oracle Database Advanced Security Administrator's Guide to learn about transparent data encryption


   ALGORITHM
   'algorithm_name'
Specifies the default algorithm to use for encryption when writing backup sets. Possible values are listed in V$RMAN_ENCRYPTION_ALGORITHMS. The CLEAR option resets the database to the default value.

   FOR DATABASE
¬†¬†¬†[ON¬†‚Ēā¬†OFF¬†‚Ēā¬†CLEAR]
Specifies whether to enable transparent encryption for the entire database. The options are as follows:
  • ON enables encryption for all database files.

  • OFF turns off encryption for all database files.

  • CLEAR restores the default setting of OFF.

Note: You must use the SET ENCRYPTION IDENTIFIED BY command to enable password encryption.


   FOR TABLESPACE
   tablespace_name
¬†¬†¬†[ON¬†‚Ēā¬†OFF¬†‚Ēā¬†CLEAR]
Specifies whether to enable transparent encryption for one or more tablespaces. Configured settings for a tablespace always override configuration set at the database level. The options are as follows:
  • ON enables encryption for the specified tablespace unless SET ENCRYPTION OFF FOR ALL TABLESPACES is used.

  • OFF disables encryption for the specified tablespace unless SET ENCRYPTION ON FOR ALL TABLESPACES is used.

  • CLEAR means that encryption for the specified tablespace is determined by the current default for the whole database.

Note: You must use the SET ENCRYPTION IDENTIFIED BY command to enable password encryption.


SNAPSHOT CONTROLFILE
NAME TO 'filename'
Configures the snapshot control file name and location to 'filename'. If you run 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 Oracle home. For example, the default on some UNIX systems is ?/dbs/snapcf_@.f. If you clear the control file name, and if you change Oracle home, then the default location of the snapshot control file changes as well.

The snapshot control file name is valid for this database only. Assume that you configure the snapshot control file name to a nondefault value on the primary database. If you use DUPLICATE to create a standby database, then the snapshot control file location on the standby database will be set to the default value. If desired, you can then configure the snapshot location on the standby database to a nondefault value.

See Also: Oracle Database Backup and Recovery User's Guide for more information about snapshot control files

forDbUniqueNameOption
Creates an RMAN configuration in the recovery catalog for the database in a Data Guard environment specified by DB_UNIQUE_NAME. You can specify a single database with db_unique_name or use ALL for all databases in the recovery catalog that share the DBID of the target database (or DBID specified by the SET DBID command).

A recovery catalog is required when performing operations in a Data Guard environment. RMAN must be connected as TARGET to a mounted or open database (which can be a primary or standby database), or you must identify the target database with the SET DBID command. Thus, you can use this clause to create a persistent configuration for a standby database without connecting as TARGET to the standby or primary database. For example, you can create a configuration for a standby database before its creation so that the configuration applies after the database is created (see Example 2-46).

When you specify FOR DB_UNIQUE_NAME, RMAN directly updates the configuration metadata in the recovery catalog. When RMAN connects as TARGET to a database whose configurations were changed with FOR DB_UNIQUE_NAME, RMAN updates the mounted control file with the configuration metadata from the recovery catalog.

Note: It is possible to run CONFIGURE locally on a standby database and then run CONFIGURE FOR DB_UNIQUE_NAME for the same database while RMAN is not connected to this database as TARGET. In this case, the configuration in the recovery catalog overrides the configuration in the control file for the specific database.


delalConf

This subclause manages persistent configurations for archived redo log deletion policy.

Syntax ElementDescription
ARCHIVELOG DELETION POLICYDetermines when archived redo log files are eligible for deletion.

The archived log deletion policy applies to all log archiving destinations, including the flash recovery area. Note that the policy does not apply to archived logs in backup sets.

Only archived redo logs in the flash recovery area are automatically deleted by the database. You can execute the BACKUP ... DELETE INPUT, DELETE ARCHIVELOG, or DELETE OBSOLETE commands to delete logs manually from log archiving destinations, including the recovery area. If FORCE is not specified on the deletion commands, then these deletion commands obey the archived log deletion policy. If FORCE is specified, then the deletion commands ignore the archived log deletion policy.

In the recovery area, the database retains logs eligible for deletion as long as possible. The database deletes the oldest logs first when disk space is required. When the recovery area is under disk pressure, the database may delete archived redo logs needed by Oracle Streams.

Note: The deletion policy does not apply to foreign archived redo logs, which are logs received by a logical standby database for a LogMiner session. These logs are transferred from a primary database, but unlike ordinary archived logs they have a different DBID. Foreign archived redo logs cannot be backed up or restored on a logical standby database.


   TO APPLIED ON
   [ALL] STANDBY
Specifies that archived redo logs are eligible for deletion if both of the following conditions are met:
  • The archived redo logs have been applied to the required standby databases.

  • The logs are not needed by the BACKED UP ... TIMES TO DEVICE TYPE deletion policy. If the BACKED UP policy is not set, then this condition is always met.

Which remote destinations are considered depends on the following criteria:

  • If you do not specify ALL, then archived logs are eligible for deletion after being applied to all mandatory remote destinations.

  • If you specify ALL, then archived logs are eligible after being applied or consumed on all remote destinations, whether mandatory or not.

    For example, standby database sby1 may be the only remote destination receiving logs, but other remote destinations may apply logs by referring to the same location on sby1. With ALL, sby1 marks the log on the primary database as consumed as soon as it is not required at sby1, but does not permit deletion of this log until it is applied or consumed by all other dependent remote destinations referring to the same location.

Note: It is invalid to specify the TO APPLIED clause in combination with either NONE or the TO SHIPPED clause.

See Also: Oracle Data Guard Concepts and Administration for details


   BACKED UP integer
   TIMES TO DEVICE
   TYPE deviceSpecifier
Specifies that archived redo logs are eligible for deletion if both of the following conditions are met:
  • The specified number of archived log backups exist on the specified device type.

  • The logs are not needed by the TO SHIPPED TO ... STANDBY or TO APPLIED ON ... STANDBY deletion policy. If neither standby deletion policy is set, then this condition is always met.

If you configure the deletion policy with this clause, then a BACKUP ARCHIVELOG command copies the logs unless integer backups already exist on the specified device type. If integer backups of the logs exist, then the BACKUP ARCHIVELOG command skips the logs. In this way, the archived log deletion policy functions as a default NOT BACKED UP integer TIMES clause on the BACKUP ARCHIVELOG command. You can override this deletion policy by specifying FORCE option on the BACKUP command.

See Also: deviceSpecifier

   TO NONEDisables the archived log deletion policy. This is the default setting.

Archived redo log files can be located inside or outside of the flash recovery area. Logs in any location can be deleted by manual commands. Only logs in the flash recovery area can be deleted automatically by the database.

When the deletion policy is set to NONE, RMAN considers archived redo log files as eligible for deletion if they meet both of the following conditions:

  • The archived redo log files, whether in the flashġ recovery area or outside of it, have been transferred to the required remote destinations specified by LOG_ARCHIVE_DEST_n.

  • The archived redo log files in the flash recovery area have been backed up at least once to disk or SBT or the logs are obsolete according to the backup retention policy.

    The backup retention policy considers logs obsolete only if the logs are not needed by a guaranteed restore point and the logs are not needed by Flashback Database. Archived redo logs are needed by Flashback Database if the logs were created later than SYSDATE-'DB_FLASHBACK_RETENTION_TARGET'.

For example, suppose that archived logs have been transferred to required remote destinations. The logs are obsolete according to the recovery window retention policy, but have not been backed up. In this case, the logs are eligible for deletion. Alternatively, suppose that the logs are obsolete and have been backed up to SBT, but have not been transferred to required remote destinations. In this case, the logs are not eligible for deletion.

If the deletion policy is set to NONE, and if you execute a deletion command for archived redo logs outside the flash recovery area, then RMAN obeys only the conditions specified on the deletion command.


   TO SHIPPED TO
   [ALL] STANDBY
Specifies that archived redo logs are eligible for deletion if both of the following conditions are met:
  • The archived redo logs have been transferred to the required remote destinations.

  • The logs are not needed by the BACKED UP ... TIMES TO DEVICE TYPE deletion policy. If the BACKED UP deletion policy is not set, then this condition is always met.

Which remote destinations are considered depends on the following criteria:

  • If you do not specify ALL, then the archived redo logs are eligible for deletion after transfer to mandatory remote destinations only.

  • If you specify ALL, then the logs are eligible for deletion after transfer to all remote destinations, whether mandatory or not.

Note: It is invalid to specify the TO SHIPPED clause in combination with NONE or the TO APPLIED clause.

See Also: Oracle Data Guard Concepts and Administration for details


backupConf

This subclause manages persistent configurations relating to the BACKUP command. One configuration is backup optimization. If you enable backup optimization, then RMAN does not back up a file to a device type if the identical file is already backed up on the device type.

Table 2-3 explains the criteria used by backup optimization to determine whether a file is identical and can potentially be skipped. The table also explains the algorithm that RMAN uses when backup optimization is enabled and it needs to determine whether to skip the backup of an identical file. If RMAN does not skip a backup, then it makes the backup exactly as specified.

Table 2-3 Backup Optimization Algorithm

File TypeCriteria for an Identical FileBackup Algorithm When Backup Optimization Is Enabled

Datafile

The datafile must have the same DBID, checkpoint SCN, creation SCN, and RESETLOGS SCN and time as a datafile already in a backup. The datafile must be offline-normal, read-only, or closed normally.

If a recovery window-based retention policy is enabled, then whether RMAN skips a datafile depends on the backup media.

For backups to tape, if the most recent backup is older than the recovery window, then RMAN takes another backup of a datafile even if a backup of an identical datafile exists. In this way, tapes can be recycled after they expire.

For backups to disk, RMAN skips the backup if an identical datafile is available on disk, even if that backup is older than the beginning of the recovery window. The window-based retention policy causes RMAN to retain the old backup for as long as it is needed.

If a retention policy is enabled with CONFIGURE RETENTION POLICY TO REDUNDANCY r, then RMAN skips backups only if at least n backups of an identical file exist on the specified device, where n=r+1.

If no retention policy is enabled, then RMAN skips a backup only if at least n backups of an identical file exist on the specified device. RMAN searches for values of n in this order of precedence (that is, values higher on the list override values lower on the list):

BACKUP ... COPIES n

SET BACKUP COPIES n

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE ... TO n

n=1

Archived redo log

The archived redo log must have the same thread, sequence number, and RESETLOGS SCN and time as an archived log already in a backup.

RMAN skips a backup only if at least n backups of an identical file exist on the specified device. RMAN searches for values of n in this order of precedence (that is, values higher on the list override values lower on the list):

BACKUP ... COPIES n

SET BACKUP COPIES n

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE ... TO n

n=1

Backup set

The backup set must have the same record ID and stamp as an existing backup set.

RMAN skips a backup only if at least n backups of an identical file exist on the specified device. By default, n=1. RMAN searches for other values of n in this order of precedence (that is, values higher on the list override values lower on the list):

BACKUP ... COPIES n

SET BACKUP COPIES n

n=1


Syntax ElementDescription

{ARCHIVELOG¬†‚Ēā¬†DATAFILE}
BACKUP COPIES FOR DEVICE TYPE
deviceSpecifier 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 (see Example 2-41). You can create from 1 (default) to 4 copies.

RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices. Also, if COPIES is greater than 1, then the BACKUP_TAPE_IO_SLAVES initialization parameter must be enabled on the target database.

Control file autobackups are never duplexed. Also, duplexing is not permitted in the flash recovery area.

If duplexing is specified in the BACKUP command or in a SET BACKUP COPIES command, then the CONFIGURE setting is overridden.


BACKUP OPTIMIZATION
[ON¬†‚Ēā¬†OFF¬†‚Ēā¬†CLEAR]
Toggles backup optimization ON or OFF (default). Specify CLEAR to return optimization to its default value of OFF.

Backup optimization is enabled when all of the following conditions are met:

  • The CONFIGURE BACKUP OPTIMIZATION ON command has been run.

  • You run BACKUP DATABASE, BACKUP ARCHIVELOG with the ALL or LIKE options, BACKUP BACKUPSET ALL, BACKUP RECOVERY AREA, BACKUP RECOVERY FILES, or BACKUP DATAFILECOPY.

  • The RMAN job uses a channel of only one device type.

Optimization prevents RMAN from backing up a file to a device type if the identical file is already backed up on the device type. RMAN does not signal an error if backup optimization causes all files to be skipped during a backup. Note that the backup retention policy has an effect on which files backup optimization skips.

For two files to be identical, their content must be exactly the same, as described in Table 2-3. Note that when you create backup pieces on disk or on media managed by Oracle Secure Backup, optimization excludes undo data from the backup when the data does not belong to an active transaction.

Note: BACKUP ... DELETE INPUT deletes all specified archived redo log whether or not optimization would skip these files during a backup.

Note: You can override backup optimization with the FORCE option of the BACKUP command.

See Also: Oracle Database Backup and Recovery 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]
Excludes the specified tablespace from BACKUP DATABASE commands (see Example 2-43). Note that you cannot exclude the SYSTEM tablespace.

By default, each tablespace is not excluded, that is, the exclude functionality is disabled. The exclusion is stored as an attribute of the tablespace, not the individual datafiles, so the exclusion applies to any files that are added to this tablespace in the future. If you run CONFIGURE ... CLEAR on a tablespace after excluding it, then it returns to the default configuration of nonexclusion.

You can still back up an excluded tablespace by explicitly specifying it in a BACKUP command or by specifying the NOEXCLUDE option on a BACKUP DATABASE command.

MAXSETSIZESpecifies the maximum size of each backup set created on a channel. Use the CLEAR option to return MAXSETSIZE to the default value of UNLIMITED.

Note: This option is ignored by BACKUP AS COPY.

   TO sizeSpecSpecifies the maximum size of each backup set as integer gigabytes, kilobytes, or megabytes.
   TO UNLIMITEDSpecifies no size limit for backup sets.
RETENTION POLICYSpecifies a persistent, ongoing policy for backup sets and copies that RMAN marks as obsolete, that is, not needed and eligible for deletion.

As time passes, RMAN marks backup sets and copies as obsolete according to the criteria specified in the retention policy. RMAN automatically deletes obsolete backup sets and copies in the flash recovery area when space is needed. RMAN does not automatically delete obsolete files outside the flash recovery area: you must manually execute DELETE OBSOLETE to remove them.

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 creates a single backup set that is duplexed into four identical backup pieces. The retention policy considers this as one backup, not four separate backups.

Note: Use the CLEAR option to return RETENTION POLICY to its default of REDUNDANCY 1.

   TO NONEDisables the retention policy feature. RMAN does not consider any backup sets or copies as obsolete.

   TO RECOVERY WINDOW
   OF integer DAYS
Specifies a time window in which RMAN should be able to recover the database.

The window stretches from the current time (SYSDATE) to the point of recoverability, which is the earliest date to which you want to recover. The point of recoverability is SYSDATE - integer days in the past.

Note: The REDUNDANCY and RECOVERY WINDOW options are mutually exclusive. Only one type of retention policy can be in effect at any time.

   TO REDUNDANCY integerSpecifies that RMAN should retain integer full or level 0 backups of each datafile and control file. The default retention policy setting is REDUNDANCY 1.

If more than integer full or level 0 backups of a datafile or control file exist, then RMAN marks these extra files as obsolete. RMAN then determines the oldest of the retained backups and marks all archived redo logs and log backups older than this backup as obsolete. The DELETE OBSOLETE command removes obsolete datafile backups (full or incremental), control file backups, and archived log backups or image copies.

The following scenario illustrates how redundancy works in an incremental backup strategy. Assume that the redundancy level is 1. You run a level 0 database backup at noon Monday, a level 1 cumulative backup at noon on Tuesday and Wednesday, and a level 0 backup at noon on Thursday. Immediately after each daily backup you run a DELETE OBSOLETE. The Wednesday DELETE command does not remove the Tuesday level 1 backup because this backup is not redundant: the Tuesday level 1 backup could be used to recover the Monday level 0 backup to a time between noon on Tuesday and noon on Wednesday. However, the DELETE command on Thursday removes the previous level 0 and level 1 backups.

Note: The REDUNDANCY and RECOVERY WINDOW options are mutually exclusive. Only one type of retention policy can be in effect at any time.


cfauConf

This subclause creates persistent configurations relating to control file autobackups.

Syntax ElementDescription
CONTROLFILE AUTOBACKUPControls the control file autobackup feature.

Note: You should enable control file autobackup feature when using RMAN without a recovery catalog.

   ONSpecifies that RMAN should perform a control file autobackup in the following circumstances:
  • After every BACKUP or CREATE CATALOG command issued at the RMAN prompt.

  • Whenever a BACKUP command within a RUN block is followed by a command that is not BACKUP.

  • At the end of every RUN block if the last command in the block was BACKUP.

  • After structural changes for databases in ARCHIVELOG mode. The autobackup after structural changes does not occur for databases in NOARCHIVELOG mode.

    Structural changes include adding tablespaces, altering the state of a tablespace or datafile (for example, bringing it online), adding a new online redo log, renaming a file, adding a new redo thread, enabling or disabling Flashback Database, and so on. This type of autobackup, unlike autobackups that occur in the preceding circumstances, is only to disk. You can run CONFIGURE CONTROLFILE AUTOBACKUP FOR DEVICE TYPE DISK to set a nondefault disk location.

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 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. You can change the location and filename format with the CONFIGURE CONTROLFILE AUTOBACKUP FORMAT and SET CONTROLFILE AUTOBACKUP FORMAT commands.

You cannot configure RMAN to write the autobackup to multiple locations. To create multiple control file backups, you can make the last command in your backup job a BACKUP CURRENT CONTROLFILE FORMAT command, which will back up the control file to the specified FORMAT location and then execute an autobackup.

Note: The SET CONTROLFILE AUTOBACKUP FORMAT command, which you can specify either within a RUN block or at the RMAN prompt, overrides the configured autobackup format in the session only. The order of precedence is:

SET within a RUN block

SET at RMAN prompt

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT

You can configure the autobackup format even when CONFIGURE CONTROLFILE AUTOBACKUP is set to OFF, but RMAN does not generate autobackups in this case. For RMAN to make autobackups, you must set CONFIGURE CONTROLFILE AUTOBACKUP to ON.

   OFFDisables the autobackup feature (default).

Any BACKUP command that includes datafile 1 automatically includes the current control file and server parameter file in the backup set. Otherwise, RMAN does not include these files.

   CLEARReturns this configuration to its default setting of OFF.

   FORMAT FOR
   DEVICE TYPE
   deviceSpecifier
   TO formatSpec
Configures the default location and filename format for the control file autobackup on the specified device type (see Example 2-45).

By default, the format is %F for all devices. Any default format string specified with CONFIGURE must include the %F substitution variable. Use of any other substitution variable is an error. Specify CLEAR to return the format to the default %F.

If a flash recovery area is enabled, and if the format is the default '%F', then RMAN creates the autobackup in the recovery area in a directory named autobackup. Otherwise, the default autobackup location is an operating system-specific location (?/dbs on UNIX, Linux, and Windows).

The string # default in the output of the SHOW command indicates when RMAN is using the default format. If you manually configure the disk format to '%F', then RMAN creates the autobackups in the operating system-specific default location even though the recovery area is enabled. To change the format back to its default so that RMAN creates the autobackups in the recovery area, run CONFIGURE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR.

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 for the semantics of the %F substitution variable


deviceConf

This subclause creates persistent configurations relating to channels and devices.

Names for Configured Channels

RMAN determines the names for configured channels. RMAN uses the following convention: ORA_devicetype_n, where devicetype refers to the user device type (such as DISK or sbt_tape) and n refers to the channel number. Channel names beginning with the ORA_ prefix are reserved by RMAN for its own use. You cannot manually allocate a channel with a name that begins with ORA_.


Note:

The sbt and sbt_tape device types are synonymous, but RMAN output always displays sbt_tape whether the input is sbt or sbt_tape.

RMAN names the first DISK channel ORA_DISK_1, the second ORA_DISK_2, and so on. RMAN names the first sbt channel ORA_SBT_TAPE_1, the second ORA_SBT_TAPE_2, and so on. When you parallelize channels, RMAN always allocates channels in numeric order, starting with 1 and ending with the parallelism setting (CONFIGURE DEVICE TYPE ... PARALLELISM n).

To run BACKUP or RESTORE jobs on specific configured channels, use the system-generated channel names. If you specify channel numbers in the CONFIGURE CHANNEL command (see the deviceConf clause), then RMAN uses the same numbers in the system-generated channel names.

Automatic channel allocation also applies to maintenance commands. If RMAN allocates an automatic maintenance channel, then it uses the same naming convention as any other automatically allocated channel.

Configured Channels in an Oracle RAC Environment

As long as the SYSDBA password for all Oracle RAC instances is the same, then you never need to put passwords in the CONNECT option of the ALLOCATE CH£X\ßANNEL or CONFIGURE command. If you use a connect string of the form user@database, then RMAN automatically uses the same password that was used for the TARGET connection when the RMAN session was started (see Example 2-43).

Syntax ElementDescription

[AUXILIARY] CHANNEL [integer]
DEVICE TYPE deviceSpecifier
Specifies the standard or AUXILIARY channel that you are configuring or clearing, as well as the device type of the channel.

Note: Channels allocated with ALLOCATE CHANNEL within a RUN command override configured automatic channels.

Either configure a generic channel or specify a channel number, where integer is less than 255. See Example 2-43 for an illustration of numbered channels.

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.

You must specify at least one channel option. For example, 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.

For generic channels of a specified device type, a new command erases previous settings for this device type. Assume that you run these commands:

CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 1G;
CONFIGURE CHANNEL DEVICE TYPE sbt FORMAT 'bkup_%U';

The second command erases the MAXPIECESIZE setting of the first command.

Note: RMAN does not simultaneously allocate automatic channels for multiple device types in the BACKUP command.

See Also: Oracle Database Backup and Recovery User's Guide to learn how configure automatic channels specified by channel number

   allocOperandList
Specifies control options for the configured channel.

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.

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';

See Also: allocOperandList

   CLEARClears the specified channel. For example, CONFIGURE CHANNEL 1 DEVICE TYPE DISK CLEAR returns only channel 1 to its default, whereas CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR returns the generic disk channel to its default. Note that you cannot specify any other channel options (for example, PARMS) when you specify CLEAR.

DEFAULT DEVICE TYPE TO
deviceSpecifier
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 sbt, then RMAN only allocates tape 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 (see Example 2-41).

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. The CLEAR option resets backup type and parallelism settings for this device to their defaults.

If you run the CONFIGURE DEVICE TYPE command to configure default settings for a device type and do not run CONFIGURE CHANNEL for this device type, then RMAN allocates all channels without other channel control options. Assume that you configure the sbt device and run a backup as follows:

CONFIGURE DEVICE TYPE sbt PARALLELISM 1;
BACKUP DEVICE TYPE sbt DATABASE;

In effect, RMAN does the following when executing this backup:

RUN 
{
  ALLOCATE CHANNEL ORA_SBT_TAPE_1 DEVICE TYPE sbt;
  BACKUP DATABASE;
}

   BACKUP TYPE TO
   [[COMPRESSED]
¬†¬†¬†BACKUPSET¬†‚Ēā¬†COPY]
Configures the default backup type for disk or tape backups. For SBT devices the COPY option is not supported. The default for disk is BACKUPSET.

If BACKUP TYPE is set to BACKUPSET, then the BACKUP command always produces backup sets regardless of which media the backup is created on. With the COMPRESSED option, the backup sets produced use binary compression.

The default location for disk backups is the flash recovery area, if one is configured; otherwise, RMAN stores backups in a platform-specific location. The default format for backup filenames is %U.

   PARALLELISM integerConfigures the number of automatic channels of the specified device type allocated for RMAN jobs. By default, PARALLELISM is set to 1.

Note: The CONFIGURE ... PARALLELISM parameter specifies channel parallelism, that is, the number of channels that RMAN allocates during backup and restore operations. The RECOVERY_PARALLELISM initialization parameter specifies the number of processes used in instance recovery.

Suppose you set PARALLELISM for disk backups to 2 (see Example 2-42). If you set the default device type as disk, then RMAN allocates two disk channels when you run BACKUP DATABASE at the RMAN prompt. RMAN always allocates the number of channels set by PARALLELISM, although it may use only a subset of these channels.

Note: If you configure n manually numbered channels, then the PARALLELISM setting can be greater than or less than n. For example, you can manually number 10 automatic channels and configure PARALLELISM to 2 or 12.

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

Example 2-40 Configuring Device and Backup Options

This example configures channels of device type DISK and sbt and sets the default device type as sbt. The example also enables backup optimization and configures a recovery windows of two weeks.

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/disk1/backups/%U';
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_DEVICE_1=tape1)';
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;

Example 2-41 Overriding the Default Device Type

This example configures duplexing to 2 for DISK backups of datafiles and control files (control file autobackups on disk are a special case and are never duplexed), then configures sbt as the default device.

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_DEVICE_1=tape1)';
CONFIGURE DEFAULT DEVICE TYPE TO sbt;

The first BACKUP command backs up the archived redo logs on the default sbt channel. The second BACKUP command backs up the database to disk locations. Because duplexing is enabled for disk backups, two copies of each output backup set are created.

BACKUP ARCHIVELOG ALL;
BACKUP DEVICE TYPE DISK 
  DATABASE
  FORMAT '/disk1/db_backup_%U','/disk2/db_backup_%U';

Example 2-42 Configuring Automatic Channels Across File Systems

This example configures automatic disk channels across two file systems:

CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/%U';

Because PARALLELISM is set to 2, the following command divides the output data between two file systems:

BACKUP DEVICE TYPE DISK
  DATABASE PLUS ARCHIVELOG;

The following LIST command shows how the datafile backup was parallelized:

RMAN> LIST BACKUPSET 2031, 2032;
 
List of Backup Sets
===================
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2031    Full    401.99M    DISK        00:00:57     19-JAN-07
        BP Key: 2038   Status: AVAILABLE  Compressed: NO  Tag: TAG20070119T100532
        Piece Name: /disk1/24i7ssnc_1_1
  List of Datafiles in backup set 2031
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 973497     19-JAN-07 /disk3/oracle/dbs/t_db1.f
  5       Full 973497     19-JAN-07 /disk3/oracle/dbs/tbs_112.f
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2032    Full    133.29M    DISK        00:00:57     19-JAN-07
        BP Key: 2039   Status: AVAILABLE  Compressed: NO  Tag: TAG20070119T100532
        Piece Name: /disk2/25i7ssnc_1_1
  List of Datafiles in backup set 2032
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2       Full 973501     19-JAN-07 /disk3/oracle/dbs/t_ax1.f
  3       Full 973501     19-JAN-07 /disk3/oracle/dbs/t_undo1.f
  4       Full 973501     19-JAN-07 /disk3/oracle/dbs/tbs_111.f

Example 2-43 Configuring Automatic Channels in an Oracle Real Application Clusters (Oracle RAC) Configuration

This example assumes an Oracle RAC database with two nodes. Oracle Secure Backup is the media manager. Tape drive tape1 is directly attached to node1, while tape drive tape2 is directly attached to node2. The example configures an automatic SBT channel for each cluster node.

This example illustrates channel connections to Oracle RAC instances node1 and node2. For both channel connections, RMAN uses the same username and password that were entered for the target database connection.

CONFIGURE DEVICE TYPE sbt PARALLELISM 2;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL 1 DEVICE TYPE sbt CONNECT '@node1'
  PARMS 'ENV=(OB_DEVICE=tape1)';
CONFIGURE CHANNEL 2 DEVICE TYPE sbt CONNECT '@node2'
  PARMS 'ENV=(OB_DEVICE=tape2)';

Example 2-44 Configuring Auxiliary Filenames

This example uses CONFIGURE AUXNAME to specify new filenames for the datafiles. The DUPLICATE command duplicates a database to a remote host with a different directory structure.

# set auxiliary names for the datafiles 
CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oracle/auxfiles/aux_1.f'; 
CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oracle/auxfiles/aux_2.f'; 
CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oracle/auxfiles/aux_3.f'; 
CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oracle/auxfiles/aux_4.f'; 

RUN
{  
  ALLOCATE AUXILIARY CHANNEL dupdb1 TYPE DISK;
  DUPLICATE TARGET DATABASE TO dupdb 
  LOGFILE
    GROUP 1 ('?/dbs/dupdb_log_1_1.f', 
             '?/dbs/dupdb_log_1_2.f') SIZE 4M,
    GROUP 2 ('?/dbs/dupdb_log_2_1.f', 
             '?/dbs/dupdb_log_2_2.f') SIZE 4M REUSE; 
}
# Un-specify the auxiliary names for the datafiles so that they are not 
# overwritten by mistake:
CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR; 
CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR; 
CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR; 
CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR;

Example 2-45 Specifying the Default Format for Control File Autobackup

The following example enables the autobackup feature and configures the default autobackup format for the DISK and sbt devices:

CONFIGURE CONTROLFILE AUTOBACKUP ON; 
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/disk2/%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt TO 'cf_auto_%F';

Example 2-46 Creating Configurations for Standby Databases

Assume that primary database prod is associated with two standby databases with the DB_UNIQUE_NAME names dgprod3 and dgprod4. Assume that you start RMAN and connect to prod as TARGET and connect to a recovery catalog. The following commands configure the default device type for databases dgprod3 and dgprod4.

CONFIGURE DEFAULT DEVICE TYPE TO sbt
  FOR DB_UNIQUE_NAME dgprod3;
CONFIGURE DEVICE TYPE sbt PARALLELISM 2
  FOR DB_UNIQUE_NAME dgprod3;
CONFIGURE DEFAULT DEVICE TYPE TO DISK
  FOR DB_UNIQUE_NAME dgprod4;

The control files of the two standby databases are updated with the configuration only after the reverse resynchronization from the recovery catalog to the control file, which occurs the first time that the user connects to dgprod3 and dgprod4.

The following SHOW command displays the persistent device type configurations for the database whose unique name is dgprod3:

RMAN> SHOW DEVICE TYPE FOR DB_UNIQUE_NAME dgprod3;
RMAN configuration parameters for database with db_unique_name DGPROD3 are:

CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

The following SHOW command displays the persistent configurations for all databases known to the recovery catalog whose DBID is 3257174182 (the value specified by the preceding SET DBID command):

SHOW ALL FOR DB_UNIQUE_NAME ALL;

Example 2-47 Optimizing Backups

This scenario illustrates the backup optimization behavior described in Table 2-3. Assume that backup optimization is disabled. At 9 a.m., you back up three copies of all existing archived logs to tape. Note that the BACKUP_TAPE_IO_SLAVES initialization parameter must be true when duplexing backups to tape.

BACKUP DEVICE TYPE sbt COPIES 3 ARCHIVELOG ALL;

At 11 a.m., you enable backup optimization:

CONFIGURE BACKUP OPTIMIZATION ON;

At noon, you run the following archived redo log backup:

BACKUP DEVICE TYPE sbt COPIES 2 ARCHIVELOG ALL;

Starting backup at 19-JAN-07
current log archived
using channel ORA_SBT_TAPE_1
skipping archived log file /d1/db1r_605ab325_1_34_612112605.arc; already backed up 3 time(s)
skipping archived log file /d1/db1r_605ab325_1_35_612112605.arc; already backed up 3 time(s)
skipping archived log file /d1/db1r_605ab325_1_36_612112605.arc; already backed up 3 time(s)
skipping archived log file /d1/db1r_605ab325_1_37_612112605.arc; already backed up 3 time(s)
skipping archived log file /d1/db1r_605ab325_1_38_612112605.arc; already backed up 3 time(s)
skipping archived log file /d1/db1r_605ab325_1_39_612112605.arc; already backed up 3 time(s)
channel ORA_SBT_TAPE_1: starting archived log backup set
channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=40 RECID=170 STAMP=612270506
channel ORA_SBT_TAPE_1: starting piece 1 at 19-JAN-07
channel ORA_SBT_TAPE_1: finished piece 1 at 19-JAN-07 with 2 copies and tag TAG20070119T110827
piece handle=2hi7t0db_1_1 comment=API Version 2.0,MMS Version 10.1.0.0
piece handle=2hi7t0db_1_2 comment=API Version 2.0,MMS Version 10.1.0.0

In this case, the BACKUP ... COPIES setting overrides the CONFIGURE ... COPIES setting, so RMAN sets n=2. RMAN skips the backup of a log only if at least two copies of the log exist on the sbt device. Because three copies of each log exist on sbt of all the logs generated on or before 9 a.m., RMAN skips the backups of these logs. However, RMAN backs up two copies of all logs generated after 9 a.m. because these logs have not yet been backed up to tape.

PK'Ęõ≤X£XPKHiUI OEBPS/lot.htm}āÍ List of Tables

List of Tables

PK0[Ą∂ā}PKHiUIOEBPS/rcviews025.htm#4‹ň 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for the target database. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the incarnation of the target database. Use this column to join with RC_DATABASE_INCARNATION.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
CCF_KEYNUMBERThe primary key of the control file copy in the recovery catalog. If you issue the LIST command while RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output.
RECIDNUMBERThe record identifier from V$DATAFILE_COPY. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe stamp from V$DATAFILE_COPY. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
NAMEVARCHAR2(1024)The control file copy filename.
TAGVARCHAR2(32)The tag of the control file copy. NULL if no tag used.
RESETLOGS_CHANGE#NUMBERThe SCN of the most recent RESETLOGS when the record was created.
RESETLOGS_TIMEDATEThe time stamp of the most recent RESETLOGS when the record was created.
CHECKPOINT_CHANGE#NUMBERThe control file checkpoint SCN.
CHECKPOINT_TIMEDATEThe control file checkpoint time.
CREATION_TIMEDATEThe control file creation time.
BLOCKSNUMBERThe number of blocks in the control file.
BLOCK_SIZENUMBERThe block size in bytes.
MIN_OFFR_RECIDNUMBERInternal use only.
OLDEST_OFFLINE_RANGENUMBERInternal use only.
COMPLETION_TIMEDATEThe time when the copy was generated.
STATUSVARCHAR2(1)The status of the copy: A (available), U (unavailable), X (expired), or D (deleted).
CONTROLFILE_TYPEVARCHAR2(1)The type of control file copy: B (normal copy) or S (standby copy).
KEEPVARCHAR2(3)Indicates whether this copy has a retention policy different from the value for CONFIGURE RETENTION POLICY. Possible values are YES and NO.
KEEP_UNTILDATEIf 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_OPTIONSVARCHAR2(11)The KEEP options specified for this control file copy. Possible values are NOLOGS, BACKUP_LOGS, LOGS, and NULL. NOLOGS indicates a consistent backup made when the database was mounted. BACKUP_LOGS indicates that the backup was made in open mode, so archived log backups must be applied to make it consistent. LOGS indicates a long-term backup made with the LOGS keyword, which is now deprecated. NULL indicates that this backup has no KEEP options and becomes obsolete based on the retention policy.
IS_RECOVERY_DEST_FILEVARCHAR2(3)This copy is located in the flash recovery area: YES or NO.
RSR_KEYNUMBERUnique key for the row in RC_RMAN_STATUS that created this backup piece.
SITE_KEYNUMBERPrimary key of the Data Guard database associated with this file. Each database in a Data Guard environment has a unique SITE_KEY value.You can use SITE_KEY in a join with the RC_SITE view to obtain the DB_UNIQUE_NAME of the database.

PKž8ćŕ(4#4PKHiUIOEBPS/rcmsynta035.htmġ REPORT

REPORT

Purpose

Use the REPORT command to perform detailed analyses of the RMAN repository. RMAN writes the report to standard output or the message log file.


See Also:

Oracle Database Backup and Recovery User's Guide to learn how to create RMAN reports

Prerequisites

Execute this command only at the RMAN prompt. Either of the following conditions must be met:

Syntax

report::=

Description of report.gif follows

(needBackupOption::=, atClause::=, reportObject::=, obsOperandList::=, deviceSpecifier::=)

needBackupOption::=

Description of needbackupoption.gif follows

(reportObject::=)

reportObject::=

Description of reportobject.gif follows

(datafileSpec::=)

atClause::=

Description of atclause.gif follows

Semantics

report

This clause specifies the type of report.

Syntax ElementDescription
needBackupOption
Lists files that require backups.

See Also: needBackupOption

OBSOLETE obsOperandListLists full backups, datafile copies, and archived redo logs recorded in the RMAN repository that can be deleted because they are no longer needed. See Table 2-33 for description of output. The command works in two steps:

For each datafile that has been backed up, RMAN identifies the oldest full backup, level 0 backup, or image copy that is not obsolete under the retention policy. Any backup of the datafile older than the one identified in this step is considered obsolete.

Any archived redo logs and level 1 incremental backups that are older than the oldest nonobsolete full backup are considered obsolete. These files are obsolete because no full or level 0 backup exists to which they can be applied. Incremental level 1 backups or archived redo logs are not considered obsolete if they can be applied to nonobsolete level 0 or full backups.

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 (see Example 2-110). If you use this option in conjunction with DEVICE TYPE, then RMAN only considers backups and copies created on the specified device. If the retention policy is disabled, then RMAN does not consider any backups as obsolete. Thus, RMAN issues an error when you run REPORT OBSOLETE with no other options and the retention policy is NONE.

Note: A backup made with the KEEP UNTIL TIME clause is obsolete after the KEEP time passes, regardless of the configured retention policy settings.

SCHEMALists the names of all datafiles (permanent and temporary) and tablespaces for the target database at the specified point in time. See Table 2-28 for description of output.

For REPORT SCHEMA without forDbUniqueNameOption, a target database connection is required, but a recovery catalog connection is optional.

   forDbUniqueNameOption
Reports the names of all datafiles and tablespaces for the database specified by its DB_UNIQUE_NAME.

You can specify a database with db_unique_name or use ALL for all uniquely named databases recorded in the catalog for a particular DBID. A database is uniquely identified in the recovery catalog by a DBID and the value of the DB_UNIQUE_NAME initialization parameter.

RMAN must be connected to a recovery catalog. RMAN must be connected to a target database or SET DBID must have been run.

See Also: forDbUniqueNameOption for descriptions of the options in this clause

   atClause
Specifies an SCN, log sequence number, or time.
UNRECOVERABLE reportObjectLists all unrecoverable datafiles. See Table 2-34 for description of output.

A datafile is considered unrecoverable if an unrecoverable operation has been performed against an object residing in the datafile since the last backup of the datafile. In an unrecoverable operation, redo is not generated. Examples are direct load of table data and updates with the NOLOGGING option.

Note: The nonexistence of any backup of a datafile is not sufficient reason to consider it unrecoverable. Such datafiles can be recovered through the use of the CREATE DATAFILE command, if redo logs starting from when the file was created still exist.


   DEVICE TYPE
   deviceSpecifier
Specifies the type of storage device. RMAN only considers backups and copies available on the specified device for its report.

needBackupOption

This clause reports only on files that need backups.

Syntax ElementDescription
NEED BACKUPLists all datafiles in the specified reportObject that require a new backup.

The report assumes that you will restore the most recent backup. 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), then RMAN generates an error.

   DAYS integerLists 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. See Table 2-29 for description of output.

If the target database control file is mounted and current, then RMAN makes the following optimizations to this report:

  • 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.

   INCREMENTAL integerSpecifies a threshold number of incremental backups required for recovery (see Example 2-109). If complete recovery of a datafile requires more than integer incremental backups, then the datafile requires a new full backup. See Table 2-30 for description of output.

Note: Files for which no backups exist will not appear in this list: issue the REPORT NEED BACKUP REDUNDANCY command to display them.


   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. See Table 2-31 for description of output.
   REDUNDANCY integerSpecifies 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. See Table 2-32 for description of output.
reportObject
Specifies the object for which you are generating the report.

reportObject

This subclause 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 that RMAN includes objects from prior incarnations.

Syntax ElementDescription
DATABASELists backups or datafile copies of all files in the database.

Note: Specify SKIP TABLESPACE tablespace_name to exclude the specified tablespace from the DATABASE specification.

DATAFILE datafileSpecLists the specified datafiles. RMAN reports on backups or datafile copies that contain at least one of the specified datafiles.
TABLESPACE tablespace_nameLists datafiles in the specified tablespace. RMAN reports on backups or datafile copies that include at least one datafile from a specified tablespace.

atClause

This subclause specifies a point in time as a time, SCN, or log sequence number. You must be connected to a recovery catalog when issuing a REPORT SCHEMA command with an AT clause.

Syntax ElementDescription
AT SCN integerSpecifies an SCN.
AT SEQUENCE integerSpecifies a log sequence number. The integer indicates the time when the specified log was first opened.
   THREAD integerSpecifies a redo THREAD number. The integer indicates the time when the thread was first opened.
AT TIME 'date_string'Specifies a date (see Example 2-108). The NLS_LANG and NLS_DATE_FORMAT environment variables specify the format for the time.

Report Output

The information that appears in the output is described in the following tables:

Table 2-28 Report of Database Schema

ColumnIndicates

File

The absolute datafile number.

Size(MB)

The size of the file in megabytes.

Tablespace

The tablespace name.

RB segs

For datafiles only. YES if rollback segments exist in the tablespace and NO if they do not (only if connected to the recovery catalog). If RMAN is not connected to the catalog, then *** is displayed.

Datafile Name

For permanent datafiles only. The filename of the datafile.

Maxsize(MB)

For tempfiles only. The maximum size of the tempfile.

Tempfile Name

For tempfiles only. The filename of the tempfile.


Table 2-29 Report of Files Whose Recovery Needs More Than n Days of Archived Logs

ColumnIndicates

File

The absolute file number of a datafile that requires more than n days of archived redo logs for recovery.

Days

The number of days of archived redo data required for recovery.

Name

The name of the datafile.


Table 2-30 Report of Files That Need More than n Incrementals During Recovery

ColumnIndicates

File

The absolute file number of a datafile that requires more than n incrementals for complete recovery.

Incrementals

The number of incremental backups required for complete recovery.

Name

The name of the datafile.


Table 2-31 Report of Files That Must Be Backed Up to Satisfy n Days Recovery Window

ColumnIndicates

File

The absolute file number of a datafile that must be backed up to satisfy a recovery window of n days.

Days

The number of days required for complete recovery.

Name

The name of the datafile that requires backup.


Table 2-32 Report of Files with Fewer Than n Redundant Backups

ColumnIndicates

File

The absolute datafile number of a datafile with less than n redundant backups.

#bkps

The number of backups that exist for this file.

Name

The name of the file.


Table 2-33 Report of Obsolete Backups and Copies

ColumnIndicates

Type

Whether the object is a backup set, backup piece, proxy copy, or datafile copy.

Key

A unique key that identifies this backup in the target database control file.

Completion Time

The time that the backup or copy completed.

Filename/handle

The filename or media handle of the backup or datafile copy.


Table 2-34 Report of Files that Need Backup Due to Unrecoverable Operations

ColumnIndicates

File

The absolute number of the datafile that needs a new backup due to unrecoverable operations.

Type Of Backup Required

FULL or INCREMENTAL, depending on which type of backup is necessary to ensure the recoverability of all of the data in this file. If FULL, then create a full backup, level 0 backup, or a datafile copy. If INCREMENTAL, then a full or incremental backup will also suffice.

Name

The name of the datafile.


Examples

Example 2-108 Reporting a Database Schema

This example, which requires a recovery catalog, reports the names of all datafiles and tablespaces 20 minutes ago.

RMAN> REPORT SCHEMA AT TIME 'sysdate-20/1440';

Report of database schema for database with db_unique_name PROD
 
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    450      SYSTEM               YES     /disk1/oradata/prod/system01.dbf
2    197      SYSAUX               YES     /disk1/oradata/prod/sysaux01.dbf
3    20       UNDOTBS              YES     /disk1/oradata/prod/undotbs01.dbf
4    10       CWMLITE              YES     /disk1/oradata/prod/cwmlite01.dbf
5    10       DRSYS                YES     /disk1/oradata/prod/drsys01.dbf
6    10       EXAMPLE              YES     /disk1/oradata/prod/example01.dbf
7    10       INDX                 YES     /disk1/oradata/prod/indx01.dbf
8    10       TOOLS                YES     /disk1/oradata/prod/tools01.dbf
9    10       USERS                YES     /disk1/oradata/prod/users01.dbf
 
List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    40       TEMP                 32767       /disk1/oradata/prod/temp01.dbf

Example 2-109 Reporting Datafiles Needing Incremental Backups

This example reports all datafiles in the database that require the application of one or more incremental backups to be recovered to their current state:

RMAN> REPORT NEED BACKUP INCREMENTAL 1;
 
Report of files that need more than 1 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------
1    2            /disk1/oradata/prod/system01.dbf
2    2            /disk1/oradata/prod/sysaux01.dbf
3    2            /disk1/oradata/prod/undotbs01.dbf
4    2            /disk1/oradata/prod/cwmlite01.dbf
5    2            /disk1/oradata/prod/drsys01.dbf
6    2            /disk1/oradata/prod/example01.dbf
7    2            /disk1/oradata/prod/indx01.dbf
9    2            /disk1/oradata/prod/users01.dbf

Example 2-110 Reporting Obsolete Backups and Copies

The following example reports obsolete backups and copies that are redundant according to the current retention policy. The retention policy is set to redundancy 1.

RMAN> REPORT OBSOLETE;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          1022   19-FEB-07          /disk1/prod/arch/archive1_59_614712405.dbf
Archive Log          1023   19-FEB-07          /disk1/prod/arch/archive1_61_614712405.dbf
Archive Log          1024   19-FEB-07          /disk1/prod/arch/archive1_60_614712405.dbf
Archive Log          1025   19-FEB-07          /disk1/prod/arch/archive1_55_614712405.dbf
Backup Set           1032   19-FEB-07
  Backup Piece       1050   19-FEB-07         
 /disk2/PROD/backupset/2007_02_19/o1_mf_nnndf_TAG20070216T173839_2xnpmp0l_.bkp
Datafile Copy        1073   19-FEB-07         
 /disk2/PROD/datafile/o1_mf_system_2xmz5l5m_.dbf
Backup Set           1035   19-FEB-07
  Backup Piece       1053   19-FEB-07         
 /disk2/PROD/backupset/2007_02_19/o1_mf_nnndf_TAG20070219T111434_2xnpozym_.bkp
Datafile Copy        1074   19-FEB-07         
 /disk2/PROD/datafile/o1_mf_sysaux_2xmz6zdg_.dbf
Datafile Copy        1075   19-FEB-07         
 /disk2/PROD/datafile/o1_mf_undotbs_2xmz7rof_.dbf
Datafile Copy        1076   19-FEB-07         
 /disk2/PROD/datafile/o1_mf_cwmlite_2xmz7vrg_.dbf
Datafile Copy        1077   19-FEB-07          /disk2/PROD/datafile/o1_mf_drsys_2xmz7wyc_.dbf
Datafile Copy        1078   19-FEB-07         
 /disk2/PROD/datafile/o1_mf_example_2xmz7y5s_.dbf
Datafile Copy        1079   19-FEB-07          /disk2/PROD/datafile/o1_mf_indx_2xmz81jg_.dbf
Datafile Copy        1081   19-FEB-07          /disk2/PROD/datafile/o1_mf_users_2xmz85vo_.dbf
Datafile Copy        1777   20-FEB-07          /disk2/users01.dbf
PKź:∆<ß2ßPKHiUIOEBPS/rcviews.htm«8ų Recovery Catalog Views

4 Recovery Catalog Views

This chapter contains descriptions of recovery catalog views. You can only access these views if you have created a recovery catalog (see CREATE CATALOG). For a summary of the recovery catalog views, refer to "Summary of RMAN Recovery Catalog Views".


Note:

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.

The views intended for use by Enterprise Manager are generally less useful for direct querying than the other views.


PKíŔ~Ő«PKHiUIOEBPS/rcmsynta049.htmõ9d∆ SWITCH

SWITCH

Purpose

Use the SWITCH command to perform either of the following operations:

A SWITCH is equivalent to the SQL statement ALTER DATABASE RENAME FILE: the names of the files in the RMAN repository are updated, but the database does not rename the files at the operating system level.

Prerequisites

RMAN must be connected to a target database. When switching tablespaces, datafiles, or tempfiles, the files must be offline. When switching the whole database, the database must not be open.

Usage Notes

The SWITCH command deletes the RMAN repository records for the datafile copy from the recovery catalog and updates the control file records to status DELETED.

If RMAN is connected to a recovery catalog, and if the database is using a control file restored from backup, then SWITCH updates the control file with records of any datafiles known to the recovery catalog but missing from the control file.

Execute SWITCH ... TO COPY only at the RMAN prompt. Use SWITCH without TO COPY only within a RUN block.

Syntax

switch::=

Description of switch.gif follows

(datafileSpec::=)

switchFile::=

Description of switchfile.gif follows

(datafileSpec::=, tempfileSpec::=)

Semantics

switch

This subclause switches filenames for a database, tablespace, or datafile to the latest image copies available for the specified files. By executing this command, you avoid restoring datafiles from backups. Execute SWITCH ... TO COPY only at the RMAN prompt.

Syntax ElementDescription
DATABASERenames the datafiles and control files to use the filenames of image copies of these files. RMAN switches to the latest image copy of each database file.

After a database switch, RMAN considers the previous database files as datafile copies.

DATAFILE datafileSpecSwitches the specified datafiles to the latest image copies.

After the switch, the control file no longer considers the specified datafile as current.

TABLESPACE tablespace_nameSwitches all datafiles within the specified tablespace, as with SWITCH DATAFILE ... TO COPY (see Example 2-147).
   TO COPYSwitches the specified active database files to image copies.

switchFile

This subclause updates the names for datafiles and tempfiles for which you have issued a SET NEWNAME command. Use this clause only within a RUN block.

Syntax ElementDescription
DATAFILE ALLSpecifies that all datafiles for which a SET NEWNAME FOR DATAFILE command has been issued in this job are switched to their new name (see Example 2-148).
DATAFILE datafileSpecSpecifies the datafile that are renaming. After the switch, the control file no longer considers the specified file as current. 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 as the switch target.

   TO DATAFILECOPY
¬†¬†¬†{'filename' ‚Ēā
    TAG tag_name}
Specifies the input copy file for the switch, that is, the datafile copy that you intend to rename (see Example 2-150).
TEMPFILE ALLSpecifies that all tempfiles for which a SET NEWNAME FOR TEMPFILE command has been issued in this job are switched to their new name.
TEMPFILE tempfileSpecSpecifies the tempfile that you are renaming. 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 as the switch target. The target database must be mounted but not open.
   TO 'filename'Renames the tempfile to the specified name (see Example 2-149). The target database must be mounted but not open.

Examples

Example 2-147 Switching to Image Copies to Avoid Restoring from Backup

Assume that a disk fails, rendering all datafiles in the users tablespace inaccessible. Image copies of all datafiles in this tablespace exist in the flash recovery area. After starting RMAN and connecting to the database as TARGET, you can run SWITCH to point to the control file to the new datafiles and then run RECOVER as follows:

SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";
SWITCH TABLESPACE users TO COPY;
RECOVER TABLESPACE users;
SQL "ALTER TABLESPACE users ONLINE";

Example 2-148 Switching Datafile Filenames After a Restore to a New Location

Assume that a disk fails, forcing you to restore a datafile to a new disk location. After starting RMAN and connecting to the database as TARGET, you can use the SET NEWNAME command to rename the datafile, then RESTORE to restore the missing datafile. You run SWITCH to point to the control file to the new datafile and then RECOVER. This example allocates both disk and tape channels.

RUN
{
  ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
  ALLOCATE CHANNEL dev2 DEVICE TYPE sbt;
  SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";
  SET NEWNAME FOR DATAFILE '/disk1/oradata/prod/users01.dbf'
                        TO '/disk2/users01.dbf';
  RESTORE TABLESPACE users;
  SWITCH DATAFILE ALL;
  RECOVER TABLESPACE users;
  SQL "ALTER TABLESPACE users ONLINE";
}

Example 2-149 Renaming Tempfiles Using SET NEWNAME and SWITCH TEMPFILE ALL

This example demonstrates using SET NEWNAME to specify new names for several tempfiles, and SWITCH TEMPFILE ALL to rename the tempfiles to the specified names. The database must be closed at the beginning of this procedure. The tempfiles are re-created at the new locations when the database is opened.

CONNECT TARGET /
STARTUP FORCE MOUNT
RUN
{  
  SET NEWNAME FOR TEMPFILE 1 TO '/disk2/temp01.dbf';
  SET NEWNAME FOR TEMPFILE 2 TO '/disk2/temp02.dbf';
  SET NEWNAME FOR TEMPFILE 3 TO '/disk2/temp03.dbf'; 
  SWITCH TEMPFILE ALL;  
  RESTORE DATABASE;  
  RECOVER DATABASE;  
  ALTER DATABASE OPEN;
}

Example 2-150 Switching to a Datafile Copy

The following command switches the datafile in the tools tablespace to the datafile copy named /disk2/tools.copy:

RUN
{ 
  SQL "ALTER TABLESPACE tools OFFLINE IMMEDIATE";
  SWITCH DATAFILE '/disk1/oradata/prod/tools01.dbf' 
  TO DATAFILECOPY '/disk2/tools.copy'; 
  RECOVER TABLESPACE tools;
  SQL "ALTER TABLESPACE tools ONLINE";
}
PKĎķř†9õ9PKHiUIOEBPS/rcviews022.htm5 ś 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.

ColumnDatatypeDescription
SESSION_KEYNUMBERSession identifier. Use in joins with RC_RMAN_OUTPUT and RC_RMAN_BACKUP_JOB_DETAILS.
SESSION_RECIDNUMBERTogether with SESSION_STAMP, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
SESSION_STAMPNUMBERTogether with SESSION_RECID, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
BS_KEYNUMBERUnique backup set identifier. Use this column to join with RC_BACKUP_SET or RC_BACKUP_PIECE.
SET_STAMPNUMBERSet stamp.
SET_COUNTNUMBERSet count.
MODIFICATION_TIMEDATEModification time.
FILESIZENUMBERSize in bytes of the SPFILE that was backed up.
FILESIZE_DISPLAYVARCHAR2(4000)Same value as FILESIZE, but converted to a user-displayable format, for example, 798.01M or 5.25G.

PKÓý÷Ģ:5PKHiUIOEBPS/rcmsynta032.htm≠RŠ RELEASE CHANNEL

RELEASE CHANNEL

Purpose

Use the RELEASE CHANNEL command to release a normal or maintenance channel while maintaining a connection to a target database instance. A normal channel is allocated with ALLOCATE CHANNEL, whereas a maintenance channel is allocated with ALLOCATE CHANNEL FOR MAINTENANCE.

Prerequisites

To release a normal channel, use the syntax shown in the release::= diagram. Execute this form of RELEASE CHANNEL only within a RUN command and specify the channel name with the same identifier used in the ALLOCATE CHANNEL command.

To release a maintenance channel, use the syntax shown in the releaseForMaint::= diagram. Execute this form of RELEASE CHANNEL only at the RMAN prompt, not within a RUN command.

Usage Notes

Maintenance channels are unaffected by ALLOCATE CHANNEL and RELEASE CHANNEL commands issued within a RUN command.

Using RELEASE CHANNEL to release channels within RUN is optional, because RMAN automatically releases all normal channels when a RUN command terminates.

Syntax

release::=

Description of release.gif follows

releaseForMaint::=

Description of releaseformaint.gif follows

Semantics

Syntax ElementDescription
channel_idSpecifies the case-sensitive channel ID used in the ALLOCATE CHANNEL command (see Example 2-103).

Examples

Example 2-103 Releasing a Channel Allocated in a RUN Command

This example allocates an SBT channel named ch1 with parameters for a set of tapes intended for daily backups, backs up the database, and then releases this channel. The example then allocates an SBT channel named ch1 with parameters for a set of tapes intended for weekly backups, and makes another database backup:

RUN
{
  ALLOCATE CHANNEL ch1 DEVICE TYPE sbt 
    PARMS='ENV=(OB_MEDIA_FAMILY=daily_bkp)';
  BACKUP DATABASE;
  RELEASE CHANNEL ch1;
  ALLOCATE CHANNEL ch1 DEVICE TYPE sbt 
    PARMS='ENV=(OB_MEDIA_FAMILY=weekly_bkp)';
  BACKUP DATABASE;
}

Note that a RELEASE CHANNEL command is not necessary at the end of the RUN command because RMAN automatically releases channel ch1.

Example 2-104 Releasing a Maintenance Channel

This example shows the transcript of an RMAN session. The example allocates an SBT maintenance channel and then crosschecks and deletes backups on tape. After the SBT channel is released, RMAN uses the default disk channel to back up the database.

RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
 
allocated channel: ORA_MAINT_SBT_TAPE_1
channel ORA_MAINT_SBT_TAPE_1: SID=105 device type=SBT_TAPE
channel ORA_MAINT_SBT_TAPE_1: Oracle Secure Backup
 
RMAN> CROSSCHECK BACKUP;
 
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1jiah8ln_1_1 RECID=25 STAMP=615031479
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1kiah8pk_1_1 RECID=26 STAMP=615031612
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1niah973_1_1 RECID=28 STAMP=615032036
Crosschecked 3 objects
 
RMAN> DELETE BACKUP;
  
List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1333    1331    1   1   AVAILABLE   SBT_TAPE    1jiah8ln_1_1
1334    1332    1   1   AVAILABLE   SBT_TAPE    1kiah8pk_1_1
1427    1423    1   1   AVAILABLE   SBT_TAPE    1niah973_1_1
 
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=1jiah8ln_1_1 RECID=25 STAMP=615031479
deleted backup piece
backup piece handle=1kiah8pk_1_1 RECID=26 STAMP=615031612
deleted backup piece
backup piece handle=1niah973_1_1 RECID=28 STAMP=615032036
Deleted 3 objects
 
RMAN> RELEASE CHANNEL;
 
released channel: ORA_MAINT_SBT_TAPE_1
 
RMAN> BACKUP DATABASE;
 
Starting backup at 20-FEB-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=105 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
PKÁK≤≠PKHiUIOEBPS/rcviews050.htmV:©Ň 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for the database. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the database incarnation.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
RECIDNUMBERThe recid of the corresponding row in the control file.
STAMPNUMBERThe 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.)
RSR_KEYNUMBERUnique key for this row.
PARENT_KEYNUMBERThe value of RSR_KEY for the parent row of this row.
SESSION_KEYNUMBERThe value of RSR_KEY for the session row associated with this row. Use in joins with RC_RMAN_BACKUP_JOB_DETAILS.
ROW_TYPEVARCHAR2(33)This is the type of operation represented by this row. Possible values are:
  • SESSION for rows at level 0

  • COMMAND for rows at level 1

  • RECURSIVE OPERATION for rows at level >1

ROW_LEVELNUMBERThe level of this row.
  • If 0 then this is a session row, that is, ROW_TYPE=SESSION and the row represents an invocation of the RMAN client.

  • If 1 then this row represents a command entered in the RMAN client and executed. ROW_TYPE=COMMAND for rows at level 1.

  • If >1 then this row represents a recursive operation, which is a suboperation of an RMAN command such as a control file autobackup performed in conjunction with a database backup. ROW_TYPE=RECURSIVE OPERATION for rows at levels >1.

OPERATIONVARCHAR2(33)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.
STATUSVARCHAR2(33)The status of the operation described by this row. Possible values are: COMPLETED, COMPLETED WITH WARNINGS, COMPLETED WITH ERRORS, and FAILED.
COMMAND_IDVARCHAR2(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.
MBYTES_PROCESSEDNUMBERIf the operation represented by this row performed some data transfer (such as backing up or restoring data), then this column contains the number of megabytes processed in the operation. Otherwise, this row contains NULL.
START_TIMEDATEThe start time for the operation represented by this row.
END_TIMEDATEThe end time for the operation represented by this row.
JOB_KEYNUMBERThe key of the RMAN session. Identical to SESSION_KEY.
INPUT_BYTESNUMBERNumber of input bytes read.
OUTPUT_BYTESNUMBERNumber of input bytes written.
OPTIMIZEDVARCHAR2(3)YES if backup optimization was applied during the backup job. Otherwise, NO.
OBJECT_TYPEVARCHAR2(80)Contains one of the following values: DATABASE FULL, RECOVERY AREA, DATABASE INCR, DATAFILE FULL, DATAFILE INCR, ARCHIVELOG, CONTROLFILE, SPFILE.
SESSION_RECIDNUMBERIf ROW_TYPE=SESSION, that is, this row has no parents and represents an RMAN session, then this column contains NULL. Otherwise, it contains the recid of the row representing the session associated with this row.
SESSION_STAMPNUMBERIf ROW_TYPE=SESSION, that is, this row has no parents and represents an RMAN session, then this column contains NULL. Otherwise, it contains the timestamp of the row representing the session associated with this row.
OUTPUT_DEVICE_TYPEVARCHAR2(17)The type of output device: DISK, SBT_TAPE, or *. An asterisk (*) indicates that output was written to more than one device type.
SITE_KEYNUMBERPrimary key of the Data Guard database associated with the RMAN status information. Each database in a Data Guard environment has a unique SITE_KEY value. You can use SITE_KEY in a join with the RC_SITE view to obtain the DB_UNIQUE_NAME of the database.
OSB_ALLOCATEDVARCHAR2(3)YES if this session allocated an SBT channel for Oracle Secure Backup; otherwise, NO.

PKI∆ěj[:V:PKHiUIOEBPS/rcmsynta040.htmá[x§ RMAN

RMAN

Purpose

Use the RMAN command to start RMAN from the operating system command line.

RMAN connections to a database are specified and authenticated in the same way as SQL*Plus connections to a database. The only difference is that RMAN connections to a target or auxiliary database require the SYSDBA privilege. The AS SYSDBA keywords are implied and cannot be explicitly specified. See Oracle Database Administrator's Guide to learn about database connection options when using SQL*Plus.


Caution:

Good security practice requires that passwords should not be entered in plain text on the command line. You should enter passwords in RMAN only when requested by an RMAN prompt. See Oracle Database Security Guide to learn about password protection.


See Also:

Oracle Database Backup and Recovery User's Guide to learn how to start RMAN from the command line

Prerequisites

You must issue the RMAN command and any options at the operating system command line rather than at the RMAN prompt.

Usage Notes

The command name that you enter at the operating system prompt is operating system-dependent. For example, enter rman in lowercase on Linux and UNIX systems.

If you start RMAN without specifying either CATALOG or NOCATALOG on the operating system command line, then the RMAN session is effectively in NOCATALOG mode unless you execute a CONNECT CATALOG command (see Example 2-126). If you maintain a recovery catalog, then the best practice is to connect RMAN to the recovery catalog before performing RMAN operations.

Syntax

cmdLine::=

Description of cmdline.gif follows

Semantics

cmdLine

Syntax ElementDescription
APPENDCauses 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.
CHECKSYNTAXCauses RMAN to start in a mode in which commands entered are checked for syntax errors, but no other processing is performed (see Example 2-129). If used with a CMDFILE or @ argument, then 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.

AUXILIARY connectStringSpecSpecifies a connect string to an auxiliary database, for example, AUXILIARY SYS@dupdb.

See Also: connectStringSpec

CATALOG connectStringSpecSpecifies a connect string to the database containing the recovery catalog, for example, CATALOG catowner@inst2.

See Also: connectStringSpec

CMDFILE filenameParses 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 run-time 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.

@filenameEquivalent to CMDFILE.

   {string_or_identifier
¬†¬†¬†‚Ēā integer}
Equivalent to options specified after USING syntax.
LOG filenameSpecifies the file where RMAN records its output, that is, the commands that were processed and their results. RMAN displays command input at the prompt but does not display command output, which is written to the log file. By default RMAN writes its message log file to standard output.

RMAN output is also stored in the V$RMAN_OUTPUT view, which is a memory-only view for jobs in progress, and in V$RMAN_STATUS, which is 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.

Note: The easiest way to send RMAN output both to a log file and to standard output is to use the Linux tee command or its equivalent. For example:

% rman ‚Ēā tee rman.log
MSGNOCauses 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.
NOCATALOGIndicates that you are using RMAN without a recovery catalog.
SEND 'command'Sends a vendor-specific command string to all allocated channels.

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

PIPE pipe_nameInvokes 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 /.

RMAN opens the following pipes in the target database:

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

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

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

See Also: Oracle Database Backup and Recovery User's Guide to learn how to pass commands to RMAN through a pipe

SCRIPT script_nameSpecifies the name of a stored script.

After connecting to a target database and recovery catalog (which must be specified with the TARGET and CATALOG options), RMAN runs the named stored script from the recovery catalog against the target database. If both a global script and a local stored script exist on the target database with the name script_name, then RMAN runs 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 (see "RMAN Reserved Words"). You should avoid creating script names that begin with a number or that match RMAN reserved words.

See Also: CREATE SCRIPT for more details about stored scripts

TARGET connectStringSpecSpecifies a connect string to the target database, for example, TARGET /.

See Also: connectStringSpec

TIMEOUT integerCauses 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 User's Guide to learn how to pass commands to RMAN through a pipe

USING {string_or_identifier ‚Ēā integer}Specifies one or more values for use in substitution variables in a command file. As in SQL*Plus, &1 indicates where to place the first value, &2 indicate where to place the second value, and so on. Example 2-128 illustrates how to pass values specified in a USING clause to an RMAN command file.

The substitution variable syntax is &integer followed by an optional dot, for example, &1.3. The optional dot is part of the variable and replaced with the value, thus enabling the substitution text to be immediately followed by another integer. For example, if you pass the value mybackup to a command file that contains the substitution variable &1.3, then the result of the substitution is mybackup3.

See Also: EXECUTE SCRIPT to learn how to specify the USING clause when executing a stored script


Examples

Example 2-126 Connecting RMAN to a Target Database in Default NOCATALOG Mode

In this example, you start the RMAN client without specifying database connection options at the operating system prompt. At the RMAN prompt, you run the CONNECT command to connect to a target database. Because CONNECT CATALOG was not run at the RMAN prompt, RMAN connects in default NOCATALOG mode when the first command requiring a repository connection is run, which in this case is the BACKUP DATABASE command.

% rman
RMAN> CONNECT TARGET /
RMAN> BACKUP DATABASE;

Example 2-127 Connecting RMAN to an Auxiliary Database Instance

This example connects to target database prod and recovery catalog database catdb with net service names, and connects to an auxiliary database instance with operating system authentication.

% rman TARGET SYS@prod
 
Recovery Manager: Release 11.1.0.6.0 - Production
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
target database Password: password
connected to target database: PROD (DBID=39525561)

RMAN> CONNECT CATALOG rman@catdb 

recovery catalog database Password: password
connected to recovery catalog database

RMAN> CONNECT AUXILIARY /

Example 2-128 Specifying Substitution Variables

Suppose that you want to create a Linux shell script that backs up the database. You want to use shell variables so that you can pass arguments to the RMAN backup script at run time. Substitution variables solve this problem. First, you create a command file named whole_db.cmd with the following contents:

cat > /tmp/whole_db.cmd <<EOF
# name: whole_db.cmd
CONNECT TARGET /
BACKUP TAG &1 COPIES &2 DATABASE FORMAT '/disk2/db_%U';
EXIT;
EOF

Next, you write the following Linux shell script, which sets csh shell variables tagname and copies. The shell script starts RMAN, connects to target database prod1, and runs whole_db.cmd. The USING clause passes the values in the variables tagname and copies to the RMAN command file at execution time.

#!/bin/csh
# name: runbackup.sh
# usage: use the tag name and number of copies as arguments
set tagname = $argv[1]
set copies = $argv[2]
rman @'/tmp/whole_db.cmd' USING $tagname $copies LOG /tmp/runbackup.out
# note that the preceding line is equivalent to:
# rman @'/tmp/whole_db.cmd' $tagname $copies LOG /tmp/runbackup.out

Finally, you execute the shell script runbackup.sh from a Linux shell as follows to create two backups of the database with the tag Q106:

% runbackup.sh Q106 2

Example 2-129 Checking the Syntax of a Command File

Suppose that you create command file backup_db.cmd as follows:

cat > /tmp/backup_db.cmd <<EOF
CONNECT TARGET /
BACKUP DATABASE;
EXIT;
EOF

The following example checks the syntax of the contents of command file backup_db.cmd (sample output included):

% rman CHECKSYNTAX @'/tmp/backup_db.cmd'

Recovery Manager: Release 11.1.0.6.0 - Production on Wed Jul 11 17:51:30 2007
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
RMAN> CONNECT TARGET *
2> BACKUP DATABASE;
3> EXIT;
The cmdfile has no syntax errors
 
Recovery Manager complete.

Example 2-130 Running a Stored Script and Appending Output to a Message Log

This example connects to a target database using operating system authentication and then runs stored script wdbb. RMAN writes output to message log /tmp/wdbb.log.

% rman TARGET / SCRIPT wdbb LOG /tmp/wdbb.log

Example 2-131 Invoking the RMAN Pipe Interface

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

% rman PIPE newpipe TARGET / TIMEOUT 90
PKD°GĆ[á[PKHiUIOEBPS/index.htmġ Index

Index

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Z 

Symbols

%U format, 3
? symbol in quoted strings, 1.2.2
@ command, 2
@ parameter, RMAN command, 2
@ symbol in quoted strings, 1.2.2
@@ command, 2

A

ABORT parameter, SHUTDOWN command, 2
ACTIVE DATABASE parameter, DUPLICATE command, 2, 2
Advanced Compression, 2
Advanced Security option, 2
ADVISE FAILURE command, 2
ADVISE OPTION parameter, REPAIR FAILURE command, 2
AFTER parameter, completedTimeSpec subclause, 3
AL16UTF16 character set, CLOB storage, 2
ALGORITHM parameter, SET command, 2
ALL parameter
BACKUP command, 2
SHOW command, 2
ALL parameter, archivelogRecordSpecifier subclause, 3
ALL PRIVILEGES parameter, REVOKE command, 2
ALL SCRIPT NAMES parameter, LIST command, 2
ALLOCATE CHANNEL command, 2
allocOperandList subclause, 3
ALLOCATE CHANNEL FOR MAINTENANCE command, 2
shared server, 2
allocOperandList subclause
parameter descriptions, 3
syntax diagram, 3
ALLOW CORRUPTION parameter, RECOVER command, 2
ALTER DATABASE BACKUP command (SQL), 2
ALTER DATABASE command, 2
analyzing RMAN repositories, 2
APPEND parameter, RMAN command, 2
archived log backups, 2
archived log copies, 2
archived log failover, 2
archived logs
in backup sets, 2
validation report, 2
archived redo files, optimization algorithms, 2
archived redo logs, 3
adding to repository, 2
backing up, 2, 2, 3
backing up n times, 2
cataloging in RMAN repository, 2
days for recovery, 2
deleting, 2, 2, 2, 2
deletion policies, 2
displaying information, 2
excluding from backup, 2, 2
excluding from validation, 2
foreign (LogMiner), 3
image copies, 2
limiting number of backups, 2
missing or inaccessible, 2
number of backups, 2
obsolete, 2
previewing, 2
recovering, 2
report output, 2
restoring, 2
restoring a range, 2
setting the destination, 2
specifying a range, 3
using for recovery (example), 2
validating, 2, 2
ARCHIVELOG BACKUP COPIES parameter
CONFIGURE command, 2
SHOW command, 2
ARCHIVELOG DELETION POLICY parameter
CONFIGURE command, 2
SHOW command, 2
ARCHIVELOG DESTINATION parameter, SET command, 2
ARCHIVELOG mode, 2, 2, 2
ARCHIVELOG parameter
CATALOG command, 2
VALIDATE command, 2
recordSpec subclause, 3
ARCHIVELOG TAG parameter, RECOVER command, 2
archivelogRecordSpecifier subclause, 3, 3
parameter descriptions, 3
syntax diagram, 3
archiving redo logs, 2, 2
archlogRange subclause
parameter descriptions, 3
syntax diagram, 3, 3
arguments to stored scripts, 2
AS BACKUPSET parameter, BACKUP command, 2
AS COPY parameter, BACKUP command, 2
ASM
See Automatic Storage Management (ASM)
AT SCN parameter, REPORT command, 2
AT SEQUENCE parameter, REPORT command, 2
at sign command (@), 2
at sign parameter, RMAN command, 2
AT TIME parameter, REPORT command, 2
atClause subclause
parameter descriptions, 2
syntax diagram, 2
AUTOBACKUP parameter, RESTORE command, 2
autoBackupOptList subclause
parameter descriptions, 2
syntax diagram, 2
autobackups, control file, 2
Automated Diagnostic Repository, logging failures, 2
automated repair, 2
automatic diagnostic repository
changing failure status, 2
changing logged failures, 2
See diagnostic repository
Automatic Storage Management (ASM)
channel allocation, 2
converting format to, 2
converting format to (example), 2
converting formats, 2
disk groups, 2
duplicating databases, 2
specifying disk groups, 2
AUXILIARY CHANNEL parameter
CONFIGURE command, 2
SHOW command, 2
auxiliary databases
connecting to, 2, 3
initialization files, 2
AUXILIARY DESTINATION parameter
RECOVER command, 2
TRANSPORT TABLESPACE command, 2
auxiliary filename settings, 2
AUXILIARY FORMAT parameter
allocOperandList subclause, 3
BACKUP command, 2
AUXILIARY INSTANCE PARAMETER FILE TO parameter, SET command, 2
auxiliary instances, specifying channels, 2
AUXILIARY parameter
ALLOCATE CHANNEL command, 2
CONNECT command, 2
RMAN command, 2
AUXNAME parameter
CONFIGURE command, 2
SHOW command, 2
availability, changing status for backup or copy, 2, 2
AVAILABLE parameter, CHANGE command, 2
AVAILABLE status
definition, 2
effect of DELETE command, 2

B

BACKED UP parameter, maintQualifier subclause, 3
backing up, excluded files, 2
backup clause
parameter descriptions, 2
syntax diagram, 2
BACKUP command, 2
backup clause, 2, 2
backupOperand subclause, 2, 2
backupSpec subclause, 2, 2, 2
backupSpecOperand subclause, 2, 2
backupTypeSpec subclause, 2, 2
copyOfSpec subclause, 2, 2
datafileCopySpec subclause, 2, 2
duration subclause, 2, 2
fileNameConversionSpec parameter, 3
forRecoveryOfSpec subclause, 2, 2
limiting processing time, 2
notBackedUpSpec subclause, 2, 2
sizeSpec subclause, 2, 2
skipSpec subclause, 2, 2
backup commands, 2
BACKUP COPIES parameter
SET command, 2
SHOW command, 2
backup levels, 2
backup media, 2
BACKUP OPTIMIZATION parameter
SHOW command, 2
BACKUP OPTIMIZATION parameter, CONFIGURE command, 2
BACKUP parameter
LIST command, 2
maintSpec subclause, 3
backup pieces
adding to repository, 2, 2
available information, 2, 2
crosschecking or deleting, 2
definition, 2
displaying information, 2
format, 3, 3
maximum size, 3
obsolete, 2
overriding default copies, 2
restoring, 2
validating, 2
backup retention policies, 2
backup sections, sizing, 2
backup set failover, 2
backup sets
about archived logs, 2
available information, 2
backing up, 2
backing up encrypted, 2
backup pieces, available information, 2
binary compression, 2, 2
cataloging in RMAN repository, 2
date ranges, 2
deleting, 2, 2
displaying information, 2
encryption, 2, 2
information about copies, 2
information about datafiles, 2
maximum size, 2
maximum size per channel, 2
obsolete
report output, 2
optimization algorithms, 2
recovering, 2
restoring only from, 2
retention policies, 2
status, 2
summary information, 2
tag names, 2
unused block compression, 2, 2
validating, 2, 2
BACKUP_TAPE_IO_SLAVES initialization parameter, 2, 2
backupCommands subclause, syntax diagram, 2
backupConf subclause
parameter descriptions, 2
syntax diagram, 2
backupOperand subclause
parameter descriptions, 2
syntax diagram, 2
BACKUPPIECE parameter
CATALOG command, 2
recordSpec subclause, 3
backups
applying incremental, 2
binary compression, 2, 2
changing availability, 2, 2
configuration, 2
corruption tolerance (example), 2
creating multiple copies, 2
creating transportable tablespaces, 2
criteria for obsolescence, 3
cumulative, 2
datafiles, 2, 2
datafiles requiring new, 2
deleting, 2
deleting obsolete, 2
duplexing example, 2
duplicate copies, 2
duplicating, 2
failures, 2
inconsistent, 2
incremental, 2, 2, 2
limiting duration, 2
listing, 2, 2
minimum required, 2
multisection, 2
obsolete, 2
overriding defaults in restore, 2
overwriting, 2
partial, 2
previewing, 2
redundant, 2
removing from recovery catalog, 2
restarting, 2
retaining multiple full (level 0), 2
retention policies, 2
summary list, 2
using incremental (example), 2
using incremental updates (example), 2
validating files, 2
validating in repository, 2
BACKUPS parameter, UNREGISTER command, 2
BACKUPSET parameter
BACKUP command, 2, 2
RECOVER command, 2
RESTORE command, 2
VALIDATE command, 2
recordSpec subclause, 3
backupSpec subclause
parameter descriptions, 2, 2
syntax diagram, 2
backupSpecOperand subclause
parameter descriptions, 2
syntax diagram, 2
backupTypeSpec subclause
parameter descriptions, 2
syntax diagram, 2
Backus Naur Form syntax diagrams, 1.2
base recovery catalog
See recovery catalog
batch files
See command files
BEFORE parameter, completedTimeSpec subclause, 3
BEFORE RESETLOGS parameter, FLASHBACK DATABASE command, 2
BEFORE SCN parameter, FLASHBACK DATABASE command, 2
BEFORE SEQUENCE parameter, FLASHBACK DATABASE command, 2
BEFORE TIME parameter, FLASHBACK DATABASE command, 2
BETWEEN parameter, completedTimeSpec subclause, 3
BFILE datatype, excluded from backup, 2
binary compression, 2, 2
block change tracking files
excluded from backup, 2
improving performance, 2
block checksums, 2
block corruptions
checking for, 2
flashback, 2
block media recovery, 2
block sizes of backup media, 2
blockObject subclause
parameter descriptions, 2
syntax diagram, 2, 2
blocks
corrupt, 2
creating, 2
See also data blocks
BNF syntax diagrams, 1.2
braces {}, 2
BY FILE parameter, LIST command, 2
BZIP2 compression algorithm, 2, 2

C

CATALOG command, 2
CATALOG FOR DATABASE parameter
GRANT command, 2
REVOKE command, 2
CATALOG parameter
CONNECT command, 2
RMAN command, 2
CATALOG privilege, 2
catalogs
importing, 2
virtual private, 2
CDs as backup media, 2
cfauConf subclause
parameter descriptions, 2
syntax diagram, 2
CHANGE command, 2
changeFailure subclause, 2, 2
forDbUniqueNameOption subclause, 2
maintSpec subclause, 2, 3
recordSpec subclause, 3
resetDbUniqueNameOption subclause, 2, 2
changeFailure subclause
parameter descriptions, 2
syntax diagram, 2
changes, reversing, 2
channel names, 2
CHANNEL parameter
ALLOCATE CHANNEL command, 2
BACKUP command, 2
CONFIGURE command, 2
RESTORE command, 2, 2
SEND command, 2
SHOW command, 2
SQL command, 2
channel parameters, 2
channels
allocating for duplication, 2
allocating for restore, 2
allocating for validation, 2
allocating manually, 2, 2
allocating to shared server sessions, 2
configuring for RAC (example), 2
configuring type for recovery, 2
device type default, 2
identifying database server sessions, 2
maximum number, 2
naming conventions, 2
releasing, 2
restoring in Data Guard, 2
setting for restore (example), 2
with proxy capabilities, 2
character sets, CLOB storage, 2
CHECK LOGICAL parameter
BACKUP command, 2, 2
RECOVER command, 2
RESTORE command, 2
VALIDATE command, 2
checksums, 2
CHECKSYNTAX parameter, RMAN command, 2
client compatibility, B.1
client, opening RMAN, 2
CLOB datatype, transporting, 2
closing RMAN, 2, 2
CMDFILE parameter, RMAN command, 2
cmdLine clause
parameter descriptions, 2
syntax diagram, 2
cmdLine command
See RMAN command
command entry description, 1.1
command files, 2, 2, 2
command format, 1.3
COMMAND ID TO parameter
SET command, 2
command line arguments, 2
command subclause summary, 1.6
command subclauses
See specific subclause name
command summary, 1.5
command terminator, 1.3
commands
creating blocks, 2
deprecated, A, A
executing host, 2
executing SQL, 2
RMAN, 2
sending to media manager, 2
sending to media managers, 2
See specific command name
comment character (#), 1.3
COMMENT parameter
CREATE SCRIPT command, 2
DUPLICATE command, 2
REPLACE SCRIPT command, 2
compatibility, B.1
COMPATIBLE initialization parameter, 2
completedTimeSpec subclause, 3
compression, 2
COMPRESSION ALGORITHM parameter
CONFIGURE command, 2
SHOW command, 2
compression algorithms, 2
configuration
displaying, 2
displaying settings, 2
overriding, 2, 2
restoring default settings, 2
setting, 2
configuration files, excluded from backup, 2
CONFIGURE BACKUP OPTIMIZATION setting, 2
configure clause
parameter descriptions, 2
syntax diagram, 2
CONFIGURE command, 2
backupConf subclause, 2, 2
cfauConf subclause, 2, 2
configure clause, 2, 2
delalConf subclause, 2, 2
deviceConf subclause, 2, 2
encryption settings, 2
forDbUniqueNameOption subclause, 2
sizeSpec subclause, 2
CONFIGURE commands, 2
CONFIGURE CONTROLFILE AUTOBACKUP parameter, 2
CONNECT command, 2
CONNECT IDENTIFIER parameter, CONFIGURE command, 2
CONNECT parameter, allocOperandList subclause, 3
connect strings, 3
to auxiliary database, 2
to recovery catalog database, 2
to target database, 2
connections, changing, 2
connectStringSpec subclause, 3
consistent shutdowns, 2
control file backups, available information, 2
control file copies
available information, 2
tag names, 2
control files
adding copies to repository, 2
autobackup validation, 2
automatic backups, 2
backing up copies, 2
copies
cataloging in RMAN repository, 2
validating, 2
filenames for control file autobackup, 2
including in database backup, 2
limiting search, 2
re-creating, 2
restoring, 2, 2, 2
restoring (example), 2
restoring autobackups, 2
restoring for primary database, 2
resynchronization, 2
snapshots, 2, 2
validating, 2
validation report, 2
CONTROL_FILES initialization parameter, 2
CONTROLFILE AUTOBACKUP FORMAT parameter, SET command, 2
CONTROLFILE AUTOBACKUP parameter
CONFIGURE command, 2
SHOW command, 2
CONTROLFILE parameter
RESTORE command, 2, 2
VALIDATE command, 2, 2
CONTROLFILE parameter, listObjList subclause, 3
CONTROLFILECOPY parameter
BACKUP command, 2
CATALOG command, 2
RESYNC CATALOG command, 2
VALIDATE command, 2
recordSpec subclause, 3
convert clause
parameter descriptions, 2
syntax diagram, 2
CONVERT command, 2
convert clause, 2, 2
convertOptionList subclause, 2, 2
fileNameConversionSpec parameter, 3
skipSpec subclause, 2, 2
transportOptionList subclause, 2, 2
CONVERT command, formatSpec subclause, 2
convertOptionList subclause
parameter descriptions, 2
syntax diagram, 2
copies
changing availability, 2, 2
creating multiple backups, 2
deleting, 2, 2
deleting obsolete, 2
expired, 2
minimum required, 2
of backup sets, available information, 2
validating in repository, 2
viewing status, 2
COPIES parameter, BACKUP command, 2
copy location, 2
COPY OF parameter
BACKUP command, 2
RECOVER command, 2
COPY parameter
BACKUP command, 2
LIST command, 2
maintSpec subclause, 3
copying files, 2
copyOfSpec subclause
parameter descriptions, 2
syntax diagram, 2, 2
corrupt blocks
checking for, 2
restoring, 2
tolerance for, 2
tolerance for (example), 2
CORRUPTION LIST parameter, RECOVER command, 2
CORRUPTION parameter
RECOVER command, 2
CPU_COUNT initialization parameter, 2
CREATE CATALOG command, 2
CREATE SCRIPT command, 2
CREATE TYPE privilege, 2
CROSSCHECK command, 2
maintSpec subclause, 2, 3
recordSpec subclause, 3
cross-platform compatibility, 2
cumulative backups, 2
CUMULATIVE parameter
BACKUP command, 2
CURRENT CONTROLFILE parameter
BACKUP command, 2
VALIDATE command, 2, 2

D

data block address (DBA), 2
data blocks
checking for corrupted, 2
recovering corrupt, 2
recovering individual, 2
recovering logically corrupt, 2
recovering physically corrupt, 2
data compression, 2
data encryption, 2
Data Guard
changing backup associations, 2
configuring databases, 2
creating physical standby databases, 2
creating standby databases (example), 2
deleting backups and copies, 2
restoring backups, 2
RMAN configuration in recovery catalog, 2
specifying databases, 3
updating backup status, 2
Data Guard backups
accessibility by databases, 2
changing associated database, 2
database association, 2
Data Pump, 2, 2, 2, B.4
Data Recovery Advisor, 2, 2
database changes, reversing, 2
database configuration
See configuration
database duplication
See duplication
database failure, repairing, 2
database identifiers
changing, 2
duplicates, 2
database incarnations, 2
DATABASE parameter
BACKUP command, 2
RECOVER clause, 2
REPORT command, 2
RESTORE command, 2
SWITCH command, 2
UNREGISTER command, 2
VALIDATE command, 2
database point-in-time recovery (DBPITR), 2
database registration, 2
database schemas
report output, 2
database server sessions
identifying channels, 2
DATABASE SKIP TABLESPACE parameter, listObjList subclause, 3
databases, 2
available information, 2
backing up, 2
changing connections, 2
connecting to, 2
converting platform format, 2
copying, 2
deleting, 2
encryption settings, 2
mounting, 2
opening, 2
platform conversion scripts, 2
recovering, 2, 2
recovering with incremental backups (example), 2
recovering with incremental updates, 2
registering, 2, 2
removing from recovery catalog, 2
resetting incarnation, 2
resynchronization, 2
revoking registration privileges, 2
shutting down target, 2
specifying in Data Guard environment, 3
standby, restoring control files, 2
starting target from RMAN, 2
transparent encryption, 2
transporting re-created files, 2
updating filenames, 2
validating, 2
DATAFILE BACKUP COPIES parameter
CONFIGURE command, 2
SHOW command, 2
datafile backup sets, available information, 2
datafile backups
available information, 2
expired, 2
DATAFILE BLOCK parameter
RECOVER command, 2
datafile copies
available information, 2
deleting, 2
displaying information, 2
listing, 2
obsolete, 2
report output, 2
restoring only from, 2
tag names, 2
validating, 2
DATAFILE parameter
BACKUP command, 2
CONVERT command, 2
RECOVER command, 2
REPORT command, 2
RESTORE command, 2
SWITCH command, 2, 2
VALIDATE command, 2
DATAFILECOPY parameter
CATALOG command, 2
RECOVER command, 2, 2
RESTORE command, 2
recordSpec subclause, 3
datafileCopySpec subclause
parameter descriptions, 2
syntax diagram, 2
datafiles
auxiliary filenames, 2
backing up, 2, 2, 2
backing up copies, 2
backing up large, 2
backing up new only, 2
backups
deleting obsolete, 2
converting platform format, 2
copies
adding to repository, 2
cataloging in RMAN repository, 2
incremental backups, 2
tag names, 2
validating, 2
days of archived redo logs, 2
excluding from backup, 2, 2
excluding from conversion, 2
excluding from validation, 2
flashback status changes, 2
forcing restore, 2
image copies, 2
in backup sets
available information, 2
listing within a tablespace, 2
minimum number of backups, 2
offline, 2
optimization algorithms, 2
point-in-time lists, 2
readonly, 2
read-only, omitting from restore, 2
recovering, 2, 2
recovering corrupt data blocks, 2
renaming, 2
report output, 2, 2, 2, 2, 2
requiring backup
report output, 2
requiring new backups, 2
restored location, 2
restoring, 2
all online, 2
from image copies, 2
individual, 2
to new locations, 2
reversing changes, 2
unrecoverable, 2
updating filenames, 2
validating, 2, 2
validation report, 2
datafileSpec subclause, 3
DATAPUMP DIRECTORY parameter, TRANSPORT TABLESPACE command, 2
datatypes, endian conversion, 2
date ranges of backup sets, 2
dates in RMAN commands, 3
DAYS parameter, REPORT command, 2
DB_BLOCK_CHECKSUM initialization parameter, 2
DB_CREATE_FILE_DEST initialization parameter, 2, 3
DB_FILE_NAME_CONVERT initialization parameter, 2, 2, 2, 2, 3
DB_FLASHBACK_RETENTION_TARGET initialization parameter, 2
DB_NAME initialization parameter, 2
DB_NAME parameter
IMPORT CATALOG command, 2
RESTORE command, 2
DB_NAME, changing, 2
DB_RECOVERY_FILE_DEST initialization parameter, 2
DB_RECOVERY_FILE_DEST parameter
BACKUP command, 2
CATALOG command, 2
RESTORE command, 2
VALIDATE command, 2
DB_UNIQUE_NAME initialization parameter, 2
DB_UNIQUE_NAME parameter
CHANGE command, 2
CONFIGURE command, 2, 2
DELETE command, 2
LIST command, 2
RESTORE command, 2
RESYNC CATALOG command, 2
SHOW command, 2
UNREGISTER command, 2
DB_UNIQUE_NAME parameter, forDbUniqueNameOption, 3
DB_UNIQUE_NAME setting, 2, 2, 2, 2
DBA parameter, STARTUP command, 2
DBID parameter
IMPORT CATALOG command, 2
SET command, 2
DBIDs
available information, 2
changing, 2
duplicates, 2
of standby databases, 2
DBNEWID utility, 2
dbObject subclause
parameter descriptions, 2, 3
syntax diagram, 2, 3
DECRYPTION parameter, SET command, 2
DEFAULT DEVICE TYPE parameter
CONFIGURE command, 2
SHOW command, 2
delalConf subclause
command parameters, 2
syntax diagram, 2
DELETE ARCHIVELOG parameter, RECOVER command, 2
delete clause, syntax diagram, 2
DELETE command, 2
delete clause, 2
forDbUniqueNameOption subclause, 2
maintSpec subclause, 2, 3
recordSpec subclause, 3
DELETE INPUT parameter, BACKUP command, 2
DELETE SCRIPT command, 2
deprecated commands, A
DESTINATION parameter, RECOVER command, 2
DESTINATION PLATFORM parameter, CONVERT command, 2
destinations for restoring datafiles, 2
DEVICE TYPE parameter
ALLOCATE CHANNEL command, 2
ALLOCATE CHANNEL FOR MAINTENANCE command, 2
BACKUP command, 2
CHANGE command, 2
CONFIGURE command, 2
DELETE command, 2
DUPLICATE command, 2
FLASHBACK DATABASE command, 2
RECOVER command, 2
REPORT command, 2
RESTORE command, 2
SEND command, 2
SHOW command, 2
VALIDATE command, 2
maintSpec subclause, 3
DEVICE TYPE parameter, maintQualifier subclause, 3
device types, specifying, 2
deviceConf subclause
parameter descriptions, 2
syntax diagram, 2
deviceSpecifier subclause, 3
diagnostic repository, 2
diagrams of syntax, 1.2
disk device type setting, 2
disk drives, using several for backup, 2
disk files, creating from stored scripts, 2
DISK parameter, deviceSpecifier subclause, 3
DISKRATIO parameter, BACKUP command, 2
displaying scripts, 2
DORECOVER parameter, DUPLICATE command, 2
double at sign command (@@), 2
double quotes, 1.2.3
DROP CATALOG command, 2
DROP DATABASE command, 2
dual-mode encryption, 2
duplexing, 2, 2, 2, 2
duplicate clause
parameter descriptions, 2
syntax diagram, 2
DUPLICATE command, 2
duplicate clause, 2, 2
dupOptionList subclause, 2, 2
dupsbyOptionList subclause, 2, 2
fileNameConversionSpec parameter, 3
logSpec subclause, 2, 2
setParameter subclause, 2, 2
sizeSpec subclause, 2
duplicate databases, opening, 2
duplicating files, 2
duplication
backup based, 2
configuration, 2
example using auxiliary channels, 2
dupOptionList subclause
parameter descriptions, 2
syntax diagram, 2
dupsbyOptionList subclause
parameter descriptions, 2
syntax diagram, 2
DURATION parameter, BACKUP command, 2
duration subclause
parameter descriptions, 2
syntax diagram, 2
DVDs as backup media, 2
dynamic performance views
summary list, 4.1
V$BACKUP_PIECE, 2
V$BACKUP_SET, 2
V$DATABASE, 2
V$DATABASE_BLOCK_CORRUPTION, 2, 2, 2, 2, 2, 2, 2
V$DATABASE_FLASHBACK_ON, 2
V$DATABASE_INCARNATION, 2
V$DATABASE.CURRENT_SCN, 2
V$DATAFILE_COPY, 2
V$FLASHBACK_DATABASE_LOG, 2
V$RMAN_COMPRESSION_ALGORITHM, 2, 2
V$RMAN_ENCRYPTION_ALGORITHMS, 2, 2, 2, 2
V$RMAN_OUTPUT, 2, 2
V$RMAN_STATUS, 2
V$SESSION, 2
V$TABLESPACE, 2
V$TRANSPORTABLE_PLATFORM, 2

E

ECHO parameter, SET command, 2
encryption
backup sets, 2, 2, 2
of duplicate databases, 2
recovering tablespaces, 2
specifying decryption passwords, 2
ENCRYPTION ALGORITHM parameter, CONFIGURATION command, 2
encryption algorithms, 2, 2
ENCRYPTION parameter
CONFIGURE command, 2
SET command, 2
SHOW command, 2
encryption settings
overriding, 2, 2
transparent mode, 2
V$RMAN_ENCRYPTION_ALGORITHMS view, 2
encryption wallets
See wallets
end times
for restore, 2
endian formats
converting, 2
duplicating databases, 2
transportable tablespaces, 2
transporting across platforms, 2
environment variables
in RMAN strings, 1.2.2
NLS_DATE_FORMAT, 2
NLS_LANG, 2
error messages
ORA-1152, 2
ORA-1578, 2
ORA-19504, 2
ORA-19624, 2
ORA-19916, 2
ORA-27086, 2
RMAN-0558, 2
RMAN-06004, 2, 2, 2
RMAN-06445, 2, 2
RMAN-06496, 2, 2
RMAN-06710, 2
RMAN-10031, 2
RMAN-10035, 2
RMAN-20401, 2
RMAN-6758, 2
too many open files, 3
EXCLUDE FLASHBACK LOG parameter, RECOVER command, 2
EXCLUDE FOR TABLESPACE parameter, CONFIGURE command, 2
EXCLUDE parameter, SHOW command, 2
EXECUTE SCRIPT command, 2
EXIT command, 2
exiting RMAN, 2
EXPIRED parameter
DELETE command, 2
LIST command, 2
EXPIRED status, 2, 2
EXPORT LOG parameter, TRANSPORT TABLESPACE command, 2
export utilities, 2
external tables, excluded from backup, 2

F

failed backups, restarting, 2
FAILURE parameter
CHANGE command, 2
LIST command, 2
failure summary, 2
failures, available information, 2
file copies, 2, 2
See also backups
FILE parameter
CREATE SCRIPT command, 2
LIST command, 2
PRINT SCRIPT command, 2
REPLACE SCRIPT command, 2
file recovery, 2
file sections, sizing, 2
filename formats, 2
fileNameConversionSpec subclause, 3
filenames
changing during platform conversion, 2
datafile image copies, 2
duplication, 2
generating new, 3
setting auxiliary, 2
updating, 2
files
backing up new only, 2
backing up with proxy copy, 2
changing availability, 2, 2
creating from stored scripts, 2
excluded from backup, 2
listing those needing backup, 2
naming backups, 2
overwriting backups, 2
sources for duplication, 2
unavailable, 2
validating, 2
FILESPERSET parameter, BACKUP command, 2
flash recovery, 2
flash recovery areas
cataloging contents, 2
defining for duplicate databases, 2
location of autobackup, 2
specifying for restore, 2
validating, 2
flashback, 2
FLASHBACK DATABASE command, 2
FLASHBACK LOG parameter, RECOVER command, 2
flashback logs, 2, 2
flashback NOLOGGING operations, 2
FOR DB_UNIQUE_NAME parameter, forDbUniqueNameOption subclause, 3
FOR DB_UNIQUE_NAME parameter, RESTORE command, 2
FOR RECOVER OF COPY parameter, BACKUP command, 2
FOR RECOVER OF TAG parameter, BACKUP command, 2
FORCE parameter
BACKUP command, 2
DELETE command, 2
RESTORE command, 2
STARTUP command, 2
forDbUniqueNameOption subclause
parameter descriptions, 3
syntax, 3
syntax diagram, 2, 2, 2
foreignlogRecordSpecifier subclause
syntax diagram, 3
FOREVER parameter, RECOVER command, 2
FORMAT parameter
ALLOCATE CHANNEL command, 3
BACKUP command, 2
CONVERT command, 2
FORMAT parameter, allocOperandList subclause, 3
formatSpec subclause, syntax diagram, 2
forRecoveryOfSpec subclause
parameter descriptions, 2
syntax diagram, 2
FROM ACTIVE DATABASE parameter
DUPLICATE command, 2
FROM AUTOBACKUP parameter, RESTORE command, 2
FROM BACKUPSET parameter
RECOVER command, 2
RESTORE command, 2
FROM CONTROLFILECOPY parameter, RESYNC CATALOG command, 2
FROM DATAFILECOPY parameter
RECOVER command, 2
RESTORE command, 2
FROM DB_UNIQUE_NAME parameter, RESYNC CATALOG command, 2
FROM FILE parameter, REPLACE SCRIPT command, 2
FROM SCN parameter, archlogRange subclause, 3
FROM SEQUENCE parameter, archlogRange subclause, 3
FROM TAG parameter
BACKUP command, 2, 2
RECOVER command, 2
RESTORE command, 2, 2
FROM TIME parameter, archlogRange subclause, 3
FTP, moving backups, 2
FULL parameter, BACKUP command, 2

G

GLOBAL parameter
CREATE SCRIPT command, 2
DELETE SCRIPT command, 2
EXECUTE SCRIPT command, 2
PRINT SCRIPT command, 2
REPLACE SCRIPT command, 2
GLOBAL SCRIPT NAMES parameter, LIST command, 2
global scripts
executing, 2
importing, 2
listing names, 2
printing, 2
See also scripts
GRANT command, 2

H

hardware error recovery (example), 2
header blocks, 2
HEADER parameter
RECOVER command, 2
RESTORE command, 2
HOST command, 2

I

image copies
adding to repository, 2
applying incremental backups, 2
backing up, 2
creating, 2
deleting, 2
displaying information, 2
format, 3, 3, 3
restoring, 2, 2
retention policies, 2
IMMEDIATE parameter, SHUTDOWN command, 2
IMPORT CATALOG command, 2
IMPORT SCRIPT parameter, TRANSPORT TABLESPACE command, 2
import utilities, 2
INACCESSIBLE parameter
CONVERT command, 2
VALIDATE command, 2
INCARNATION parameter, LIST command, 2
incarnations, 2, 2
INCLUDE CURRENT CONTROLFILE parameter
BACKUP command, 2, 2
VALIDATE command, 2
INCLUDING BACKUPS parameter
DROP DATABASE command, 2
UNREGISTER command, 2
inconsistent backups, 2
inconsistent shutdowns, 2
incremental backups, 2, 2
adding datafile copies, 2
bitmap limit, 2
report output, 2
sample script, 2
using datafile copy, 2
INCREMENTAL parameter
BACKUP command, 2
REPORT command, 2
index blocks, logical corruption, 2
initialization files
for auxiliary databases, 2
for database startup, 2
initialization parameters
BACKUP_TAPE_IO_SLAVES, 2
COMPATIBLE, 2
CONTROL_FILES, 2
CPU_COUNT, 2
DB_BLOCK_CHECKSUM, 2
DB_CREATE_FILE_DEST, 2, 3
DB_FILE_NAME_CONVERT, 2, 2, 2, 3
DB_FLASHBACK_RETENTION_TARGET, 2
DB_NAME, 2
DB_RECOVERY_FILE_DEST, 2
DB_UNIQUE_NAME, 2
LOG_ARCHIVE_DEST_n, 2, 2
LOG_ARCHIVE_FORMAT, 2
LOG_FILE_NAME_CONVERT, 2, 2
RECOVERY_PARALLELISM, 2
replacing values, 2
setting collections, 2
setting for duplicate database, 2
input files, deleting, 2

J

job commands, 2

K

KEEP parameter
BACKUP command, 2
KEEP parameter, keepOption subclause, 3
keepOption subclause, 3
keywords in syntax diagrams, 1.2.1

L

LIKE parameter
archivelogRecordSpecifier subclause, 3
maintQualifier subclause, 3
LIKE parameter, BACKUP command, 2
Linux commands, 2
Linux-to-Windows conversion (example), 2
list clause
parameter descriptions, 2
syntax diagram, 2
LIST command, 2
list clause, 2, 2
listBackupOption subclause, 2, 2
listObjectSpec subclause, 2, 2
maintQualifier subclause, 2
recordSpec subclause, 3
recoverableClause subclause, 2, 2
listBackupOption subclause
parameter descriptions, 2
syntax diagram, 2
listObjectSpec subclause
parameter descriptions, 2
syntax diagram, 2
listObjList subclause, 3
parameter descriptions, 3
syntax diagram, 3
LOB datatypes, transporting, 2
local scripts
executing, 2
listing names, 2
printing, 2
See also scripts
LOCATION parameter, 2
log files
appending output, 2
creating for RMAN sessions, 2
directing output to, 2
LOG parameter, RMAN command, 2
log sequence number, 2
log sequence numbers
point-in-time recovery, 2
undoing changes, 2
log sequence, resetting, 2
LOG_ARCHIVE_DEST_n initialization parameter, 2, 2, 2
LOG_ARCHIVE_FORMAT initialization parameter, 2
LOG_FILE_NAME_CONVERT initialization parameter, 2, 2
LOG_FILE_NAME_CONVERT parameter, DUPLICATE command, 2
LOGFILE parameter
DUPLICATE command, 2, 2
logging in, 3
logical corruption, checking for, 2
LogMiner utility, 2, 2, 2, 2, 3
logSpec subclause
parameter descriptions, 2
syntax diagram, 2

M

maintenance channels
allocating, 2
naming conventions, 2
releasing, 2
maintenance commands, 2
maintenance job configuration, 2
maintenanceCommands subclause, syntax diagram, 2
maintQualifier subclause
parameter descriptions, 3
syntax diagram, 2, 3
maintSpec subclause, 3
syntax diagram, 2, 2, 2
MAXCORRUPT parameter
SET command, 2
MAXDAYS parameter, RESTORE command, 2
MAXOPENFILES parameter, allocOperandList subclause, 3
MAXPIECESIZE parameter, allocOperandList subclause, 3
MAXSEQ parameter, RESTORE command, 2
MAXSETSIZE parameter
BACKUP command, 2
CONFIGURE command, 2
SHOW command, 2
media failure, restoring backups, 2
media libraries for sbt channels, 3
media managers, 2
compressing data, 2
controlling data transfer, 2
sending commands, 2, 2
specifying environment variables, 3
status of offsite backups, 2
validating metadata, 2
See also Oracle Secure Backup
media pool, backup storage, 2
media recovery
parallel processing, 2
single processing, 2
message logs
appending output, 2
controlling content, 2
message numbers, 2
metadata
changing catalog schemas, 2
resynchronization, 2
validating in repository, 2
miscellaneous commands, 2
missing files
checking for, 2
deleting from repository, 2
MOUNT parameter
ALTER DATABASE command, 2
STARTUP command, 2
mounting databases, 2
moving backups, 2
MSGNO parameter, RMAN command, 2
multisection backups, 2

N

NEED BACKUP parameter, REPORT command, 2
needBackupOption subclause
parameter descriptions, 2
syntax diagram, 2
nested command files, 2
net service names, 2, 3
NEW DATABASE parameter, CONVERT command, 2
new files, backing up only, 2
NEWNAME FOR DATAFILE parameter, SET command, 2
NEWNAME FOR TEMPFILE parameter, SET command, 2
NEWNAME setting, persistent alternative, 2
NLS_DATE_FORMAT configuration setting, 2
NLS_DATE_FORMAT environment variable, 2
NLS_LANG environment variable, 2
NLS_LANG environment variables, 2
NO UNREGISTER parameter, IMPORT CATALOG command, 2
NOARCHIVELOG mode, 2, 2
NOCATALOG parameter, RMAN command, 2
NOCHECKSUM parameter, BACKUP command, 2
NOEXCLUDE parameter
BACKUP command, 2
VALIDATE command, 2
NOFILENAMECHECK parameter, DUPLICATE command, 2, 2, 2
NOKEEP parameter, keepOption subclause, 3
NOMOUNT parameter, STARTUP command, 2
nonquoted strings, 1.2.2
NOPARALLEL parameter, RECOVER command, 2
NOPROMPT parameter
DELETE command, 2
DROP DATABASE command, 2
NOREDO parameter
DUPLICATE command, 2
RECOVER command, 2
NORMAL parameter, SHUTDOWN command, 2
normal resynchronization, 2
NOT BACKED UP parameter, BACKUP command, 2
notBackedUpSpec subclause
parameter descriptions, 2
syntax diagram, 2
numbers, displaying message, 2

O

OBSOLETE parameter
DELETE command, 2
REPORT command, 2
obsOperandList subclause, 3
OFF parameter, SPOOL command, 2
OFFLINE parameter
CONVERT command, 2
VALIDATE command, 2
offsite backups, 2
OMF format, 2
online redo logs
for duplicate database, 2
for RAC, 2
OPEN parameter, ALTER DATABASE command, 2
OPEN RESTRICTED parameter, DUPLICATE command, 2
opening databases, 2
operating system commands, 2
operating systems
compatibility, 2
duplicating databases across, 2
transporting across, 2
optimization algorithms, 2
optimization, overriding backup, 2
ORA$RMAN_RPI_IN pipe, 2
ORA$RMAN_RPI_OUT pipe, 2
ORA-1152 error message, 2
ORA-1578 error message, 2
ORA-19504 error message, 2
ORA-19624 error message, 2
ORA-19916 error message, 2
ORA-27086 error message, 2
Oracle Advanced Compression, 2
Oracle home, excluded from backup, 2
Oracle Managed Files (OMF), 2, 3
duplicating databases (example), 2
Oracle Net connections, 2
Oracle RAC
recovering from failure, 2
See RAC
Oracle Secure Backup, 2
creating encrypted backups, 2
sending commands to (example), 2
undo data, 2
Oracle wallets, 2, 2
Oracle10g compatibility, B.1
Oracle8i compatibiity, B.1
Oracle9i compatibiity, B.1
output
displaying message numbers, 2
storing in files, 2
overwriting backup files, 2

P

PARALLEL parameter, RECOVER command, 2
parallelism
allocating channels, 2
backup using channels (example), 2
channel allocation, 2
specifying for recovery, 2
validation, 2
PARALLELISM parameter, CONVERT command, 2
parallelism settings, 2
parameter files
backing up, 2, 2
restoring, 2, 2
See also initialization parameter files, server parameter files, 2
specifying path, 2
PARAMETER_VALUE_CONVERT parameter
DUPLICATE command, 2, 2
overriding, 2
parameters
deprecated, A
for sbt channels, 3
in syntax diagrams, 1.2.2
parameters in stored scripts, 2
PARMS parameter
allocOperandList subclause, 3
SEND command, 2
partial backups, 2
password encryption, 2
PASSWORD FILE parameter, DUPLICATE command, 2
password files
excluded from backup, 2
for duplicate databases, 2
password-based encryption, 2
passwords, 3
encrypted, 2
encrypted backup sets, 2
for decryption, 2
RAC SYSDBA, 2
performance
allocating channels, 2
incremental backups, 2
PFILE parameter
DUPLICATE command, 2
STARTUP command, 2
PIPE parameter, RMAN command, 2
pipes
opening input and output, 2
timing out, 2
placeholders in syntax diagrams, 1.2.2
platform compatibility, 2
PLATFORM parameter, CONVERT command, 2
platforms
duplicating databases across, 2
transporting across, 2
PL/SQL code, converting formats, 2
PL/SQL stored procedures, 2
PLUS ARCHIVELOG parameter, VALIDATE command, 2
point-in-time recovery, 2, 2, 2, 3
POOL parameter, BACKUP command, 2
PREVIEW parameter, RESTORE command, 2
previewing backups, 2
PRIMARY CONTROLFILE parameter, RESTORE command, 2
primary databases
backing up, 2
copying, 2
PRINT SCRIPT command, 2
private catalog schema, assigning privileges, 2
privileges
assigning, 2
CATALOG, 2
CREATE TYPE, 2
REGISTER, 2
revoking, 2
SYSDBA, 2
processing time for backup, 2
proxy backups, restoring, 2
proxy copies
available information, 2
crosschecking, 2
definition, 2
deleting, 2, 2
obsolete
report output, 2
restoring, 2
tag names, 2
PROXY parameter
BACKUP command, 2
recordSpec subclause, 3

Q

QUIT command, 2
quoted strings, 1.2.2, 1.2.2

R

RAC
automatic channels (example), 2
creating online redo logs, 2
crosschecking backups, 2
crosschecking or deleting, 2
spreading work, 3
SYSDBA passwords, 2
RATE parameter, allocOperandList subclause, 3
RC_ARCHIVED_LOG view, 4.1
RC_BACKUP_ARCHIVELOG_DETAILS view, 4.1
RC_BACKUP_ARCHIVELOG_SUMMARY view, 4.1
RC_BACKUP_CONTROLFILE view, 4.1
RC_BACKUP_CONTROLFILE_DETAILS view, 4.1
RC_BACKUP_CONTROLFILE_SUMMARY view, 4.1
RC_BACKUP_COPY_DETAILS view, 4.1
RC_BACKUP_COPY_SUMMARY view, 4.1
RC_BACKUP_CORRUPTION view, 4.1, 4.1
RC_BACKUP_DATAFILE view, 4.1, 4.1
RC_BACKUP_DATAFILE_DETAILS view, 4.1
RC_BACKUP_DATAFILE_SUMMARY view, 4.1
RC_BACKUP_FILES view, 4.1
RC_BACKUP_PIECE view, 4.1
RC_BACKUP_PIECE_DETAILS, 4.1
RC_BACKUP_REDOLOG view, 4.1
RC_BACKUP_SET view, 4.1
RC_BACKUP_SET_DETAILS view, 4.1
RC_BACKUP_SET_SUMMARY view, 4.1
RC_BACKUP_SPFILE view, 4.1
RC_BACKUP_SPFILE_DETAILS view, 4.1
RC_BACKUP_SPFILE_SUMMARY view, 4.1
RC_CHECKPOINT view
See RC_RESYNC view
RC_CONTROLFILE_COPY view, 4.1
RC_COPY_CORRUPTION view, 4.1
RC_DATABASE view, 2, 4.1
RC_DATABASE_BLOCK_CORRUPTION view, 4.1
RC_DATABASE_INCARNATION view, 2, 4.1
RC_DATAFILE view, 4.1
RC_DATAFILE_COPY view, 4.1
RC_LOG_HISTORY view, 4.1
RC_OFFLINE_RANGE view, 4.1
RC_PROXY_ARCHIVEDLOG view, 4.1
RC_PROXY_ARCHIVELOG_DETAILS view, 4.1
RC_PROXY_CONTROLFILE view, 4.1
RC_PROXY_COPY_DETAILS view, 4.1
RC_PROXY_COPY_SUMMARY view, 4.1
RC_PROXY_DATAFILE view, 4.1
RC_REDO_LOG view, 4.1
RC_REDO_THREAD view, 4.1
RC_RESTORE_POINT view, 4.1
RC_RESYNC view, 4.1
RC_RMAN_BACKUP_JOB_DETAILS view, 4.1
RC_RMAN_BACKUP_SUBJOB_DETAILS view, 4.1
RC_RMAN_BACKUP_TYPE view, 4.1
RC_RMAN_CONFIGURATION view, 4.1
RC_RMAN_OUTPUT view, 4.1
RC_RMAN_STATUS view, 4.1
RC_SITE view, 4.1
RC_STORED_SCRIPT view, 4.1
RC_STORED_SCRIPT_LINE view, 4.1
RC_TABLESPACE view, 4.1
RC_TEMPFILE view, 4.1
RC_UNUSABLE_BACKUPFILE_DETAILS view, 4.1
RCMRF1938|RC_PROXY_ARCHIVEDLOG view, 4.1
RCMRF1947|RC_UNUSABLE_BACKUPFILE_DETAILS view, 4.1
READONLY parameter
CONVERT command, 2
RECOVER command, 2
VALIDATE command, 2
Real Application Clusters
See RAC
recordSpec subclause, 3
recover clause
parameter descriptions, 2
syntax diagram, 2
RECOVER command, 2
blockObject subclause, 2, 2
dbObject subclause, 2, 2
recover clause, 2, 2
recoverObject subclause, 2, 2
recoverOptionList subclause, 2, 2
recoverSpec subclause, 2, 2
sizeSpec subclause, 2
RECOVER OF COPY parameter, BACKUP command, 2
RECOVER OF TAG parameter, BACKUP command, 2
RECOVERABLE parameter, LIST command, 2
recoverableClause subclause
parameter descriptions, 2
syntax diagram, 2
recoverObject subclause
parameter descriptions, 2
syntax diagram, 2
recoverOptionList subclause
parameter descriptions, 2
syntax diagram, 2
recoverSpec subclause
parameter descriptions, 2
syntax diagram, 2
recovery
allowing corrupt blocks, 2
database in NOARCHIVELOG mode (example), 2
incremental, 2
point-in-time of duplicate databases, 2
search order for backups, 2
RECOVERY AREA parameter
BACKUP command, 2
CATALOG command, 2
RESTORE command, 2
VALIDATE command, 2
recovery catalog
connecting to, 3
DB_UNIQUE_NAME, 2
granting access, 2
registering databases, 2
removing databases, 2
removing references, 2
removing repository records, 2
replacing scripts, 2
updating DB_UNIQUE_NAME, 2
upgrading versions, 2
recovery catalog databases, connecting to, 2
recovery catalog views, 4
RC_DATABASE, 2
RC_DATABASE_INCARNATION, 2
summary list, 4.1
See also specific view names
recovery catalogs
creating, 2
creating stored scripts, 2
deleting, 2
removing references, 2
resynchronization, 2
revoking privileges, 2, 2
running RMAN without, 2
stored scripts, available information, 2
unregistering, 2
recovery catalogs, moving metadata, 2
recovery catalogs.NOCATALOG mode, 2
RECOVERY FILES parameter
BACKUP command, 2
VALIDATE command, 2
recovery files, backing up, 2
Recovery Manager
compatibility, B.1
dates in commands, 3
Recovery Manager client, opening, 2
Recovery Manager, control file autobackups, 2
RECOVERY WINDOW OF parameter, obsOperandList subclause, 3
RECOVERY WINDOW parameter
CONFIGURE command, 2
REPORT command, 2
recovery windows
report output, 2
recovery windows, report output, 2
RECOVERY_CATALOG_OWNER role, 2, 2, 2, 2
RECOVERY_PARALLELISM initialization parameter, 2
redo logs
archiving, 2
backing up, 2
for duplicate databases, 2
for RAC, 2
omitting from recovery, 2
sequence numbers, 2
redo threads, 3
REDUNDANCY parameter
CONFIGURE command, 2
REPORT command, 2
REDUNDANCY parameter, obsOperandList subclause, 3
redundant backups, 2
REGISTER DATABASE command, 2
REGISTER DATABASE parameter
GRANT command, 2
REVOKE command, 2
REGISTER privilege, 2
RELEASE CHANNEL command, 2
release clause, 2
releaseForMaint clause, 2
release clause, syntax diagram, 2
releaseForMaint clause
syntax diagram, 2
repair clause
parameter description, 2
syntax diagram, 2
REPAIR FAILURE command, 2
repair clause, 2, 2
repair options, 2, 2
repair status, 2
repair strategies, 2
REPLACE SCRIPT command, 2
replaceScript clause, 2
replaceScript clause
syntax diagram, 2
report clause
parameter descriptions, 2
syntax diagram, 2
REPORT command, 2
atClause subclause, 2, 2
needBackupOption subclause, 2, 2
report clause, 2, 2
reportObject subclause, 2, 2
reportObject subclause
parameter descriptions, 2
syntax diagram, 2
repositories
analyzing, 2
listing contents, 2
updating, 2
updating availability status, 2
updating filenames, 2
validating contents, 2
reserved words, 1.4
reset clause, syntax diagram, 2
RESET DATABASE command, 2
reset clause, 2
RESET DB_UNIQUE_NAME parameter, CHANGE command, 2
resetDbUniqueNameOption subclause
parameter descriptions, 2
syntax diagram, 2
RESETLOGS parameter, FLASHBACK DATABASE command, 2
restoration configuration, 2
restore clause
parameter descriptions, 2
syntax diagram, 2
RESTORE command, 2
autoBackupOptList subclause, 2, 2
restore clause, 2, 2
restoreObject subclause, 2, 2
restoreSpecOperand subclause, 2
restore commands, 2
restore failover, 2
RESTORE POINT parameter
DUPLICATE command, 2
FLASHBACK DATABASE command, 2
LIST command, 2
RECOVER command, 2
RESTORE command, 2
SET command, 2
TRANSPORT TABLESPACE command, 2
restore points, 2, 2
restoreCommands subclause, syntax diagram, 2
restoreObject subclause
parameter descriptions, 2
syntax diagram, 2
restoreSpecOperand subclause, syntax diagram, 2
RESTRICTED SESSION privilege, 2
RESYNC CATALOG command, 2
RESYNC CATALOG, resync clause, 2
resync clause, syntax diagram, 2
resynchronization, 2
retention policies, 3
exemptions (example), 2
overriding, 2, 2
window-based, 2
RETENTION POLICY parameter
CONFIGURE command, 2
SHOW command, 2
REUSE parameter, BACKUP command, 2
reverse resynchronization, 2
revoke clause, syntax diagram, 2
REVOKE command, 2
revoke clause, 2
RMAN command, 2
cmdLine clause, 2, 2
RMAN command (operating system), 2
RMAN commands
See specific command names
executing from files, 2
RMAN-0558 error message, 2
RMAN-06004 error message, 2, 2, 2
RMAN-06445 error message, 2, 2
RMAN-06496 error message, 2, 2
RMAN-06710 error message, 2
RMAN-10031 error message, 2
RMAN-10035 error message, 2
RMAN-20401 error message, 2
RMAN-6758 error message, 2
roles
RECOVER_CATALOG_OWNER, 2
RECOVERY_CATALOG_OWNER, 2, 2
rollback segments, resynchronization, 2
run clause, syntax diagram, 2
RUN command, 2
backupCommands subclause, 2
maintenanceCommands subclause, 2
restoreCommands subclause, 2
run clause, 2

S

saving scripts, 2
sbt channels, specifying parameters, 3
SCHEMA parameter, REPORT command, 2
SCN
for restore, 2
setting restore point, 2
See also system change numbers
SCN BETWEEN parameter, archlogRange subclause, 3
SCN parameter
FLASHBACK DATABASE command, 2
REPORT command, 2
scopes, creating for scripts, 2
SCRIPT NAMES parameter, LIST command, 2
SCRIPT parameter
DELETE SCRIPT command, 2
EXECUTE SCRIPT command, 2
REPLACE SCRIPT command, 2
RMAN command, 2
scripts
available information, 2
creating from files, 2
creating in recovery catalog, 2
listing names, 2
printing, 2
replacing, 2
See command files
substitution variables, 2
SECTION SIZE parameter
BACKUP command, 2
VALIDATE command, 2
Secure Backup, 2
SEND command, 2
SEND parameter
RMAN command, 2
SEND parameter, allocOperandList subclause, 3
SEQUENCE BETWEEN parameter, archlogRange subclause, 3
SEQUENCE parameter
FLASHBACK DATABASE command, 2, 2
REPORT command, 2
SEQUENCE parameter, archivelogRecordSpecifier subclause, 3
server parameter files
backing up, 2, 2
for auxiliary databases, 2
restoring, 2, 2
restoring lost, 2
validating, 2
validation report, 2
sessions
ending RMAN, 2
identifying channels, 2
set clause, syntax diagram, 2
SET command, 2
encryption settings, 2
set clause, 2
setRmanOption subclause, 2, 2
setRmanOrRunOption subclause, 2, 2
setRunOption subclause, 2, 2
SET MAXCORRUPT command, 2
SET NEWNAME command, 2
SET parameter, DUPLICATE command, 2
setParameter subclause
parameter descriptions, 2
syntax diagram, 2
setRmanOption subclause
parameter descriptions, 2
syntax diagram, 2
setRmanOrRunOption subclause
parameter descriptions, 2
syntax diagram, 2
setRunOption subclause
parameter descriptions, 2
syntax diagram, 2
shared servers, allocating channels, 2
shell commands, 2
show clause, syntax diagram, 2
SHOW command, 2
show clause, 2
SHUTDOWN command, 2
shutdowns, 2
single quotes, 1.2.3
SITE_KEY column null values, 2
sizeSpec subclause
parameter descriptions, 2, 3
syntax diagram, 2, 2, 2, 2, 2, 3
SKIP keyword, CONVERT command, 2
SKIP parameter
BACKUP command, 2
RECOVER command, 2
RESTORE command, 2
VALIDATE command, 2
SKIP READONLY parameter
DUPLICATE command, 2
RECOVER command, 2
RESTORE command, 2
SKIP TABLESPACE parameter, DUPLICATE command, 2
SKIP TABLESPACE parameter, listObjList subclause, 3
skipSpec subclause
parameter descriptions, 2, 2, 2
syntax diagram, 2, 2, 2
SNAPSHOT CONTROLFILE NAME parameter, CONFIGURE command, 2
SNAPSHOT CONTROLFILE parameter, SHOW command, 2
snapshots
control file, 2
Volume Shadow Copy Service (VSS), 2
source databases
copying, 2
used for duplication, 2
SPFILE parameter
BACKUP command, 2
DUPLICATE command, 2, 2
RESTORE command, 2
VALIDATE command, 2
listObjList subclause, 3
SPFILE SET, overriding, 2
SPOOL command, 2
SQL command, 2
standard output
printing scripts, 2
redirecting to files, 2
STANDBY CONTROLFILE parameter, RESTORE command, 2
standby databases
backing up, 2
copying, 2
flash recovery areas, 2
password files, 2
updating (example), 2
STANDBY parameter, DUPLICATE command, 2
STARTUP command, 2
stdout, redirecting, 2
stored scripts
available information, 2
deleting, 2
executing, 2, 2
printing, 2
See also scripts
strings
valid characters in RMAN commands, 1.2.2
striped files, allocating channels, 2
striping backup sets, 2
subclause summary, 1.6
subclauses
See specific subclause name
substitution variables, 2
complete list, 3
example of %D, 2
example of %F, 2
example of %U, 2
in scripts, 2, 2, 2
passing to stored scripts, 2
providing values, 2
SUMMARY parameter, LIST command, 2
switch clause
parameter descriptions, 2
syntax diagram, 2
SWITCH command, 2
effect on RESTORE, 2
switch clause, 2, 2
switchFile subclause, 2, 2
switchFile subclause
parameter descriptions, 2
syntax diagram, 2
syntax conventions, 1.2
syntax diagrams
keywords, 1.2.1
parameters, 1.2.2
placeholders, 1.2.2
syntax errors, checking for, 2
syntax, deprecated, A
SYSAUX tablespaces, 2
SYSDBA passwords
for active duplication, 2
RAC environment, 2
SYSDBA privilege, 2, 3
system change numbers
See also SCN
system change numbers (SCN), 2, 2, 2

T

TABLESPACE DBA parameter, RECOVER command, 2
TABLESPACE DESTINATION parameter, TRANSPORT TABLESPACE command, 2
TABLESPACE parameter
BACKUP command, 2
CONVERT command, 2
DUPLICATE command, 2
RECOVER command, 2, 2
REPORT command, 2
RESTORE command, 2
SWITCH command, 2
VALIDATE command, 2
tablespace point-in-time recovery (TSPITR), 2, 2
tablespace recovery (example), 2
tablespaces
backing up, 2
converting platform format, 2
duplicating, 2
encryption settings, 2
excluding from database backup, 2
excluding from duplicate database, 2
including in duplicate database, 2
listing datafiles, 2
point-in-time lists, 2
recovering individual, 2
recovering undo segments, 2
renamed, 2
show excluded, 2
transparent encryption, 2
updating filenames, 2
validating individual, 2
See also transportable tablespaces
TAG parameter
BACKUP command, 2
RECOVER command, 2, 2, 2
RESTORE command, 2
RESTORE commands, 2
maintQualifier subclause, 3
tape backups, allocating channels, 2
tape device type setting, 2
target control files, 2
target databases
connecting to, 2, 3
deleting, 2
maintaining single metadata catalog, 2
registering, 2
starting from RMAN, 2
TARGET parameter
CONNECT command, 2
RMAN command, 2
target times, undoing changes, 2
tee command (Linux), 2
TEMPFILE parameter, SWITCH command, 2
tempfiles
re-creating, 2, 2
renaming, 2
tempfileSpec subclause, 3
temporary tablespaces, 2
TEST parameter, RECOVER command, 2
THREAD parameter
FLASHBACK DATABASE command, 2
REPORT command, 2
THREAD parameter, archlogRange subclause, 3
TIME BETWEEN parameter, archlogRange clause, 3
time constraints
partial backups, 2
recovery period, 2
time limits, 3
TIME parameter
FLASHBACK DATABASE command, 2, 2
REPORT command, 2
time ranges, 3
time, backup completion, 3
time-based backups, 2
TIMEOUT parameter, RMAN command, 2
TO BEFORE RESETLOGS parameter, FLASHBACK DATABASE command, 2
TO BEFORE SCN parameter, FLASHBACK DATABASE command, 2
TO BEFORE SEQUENCE parameter, FLASHBACK DATABASE command, 2
TO BEFORE TIME parameter, FLASHBACK DATABASE command, 2
TO FILE parameter, PRINT SCRIPT command, 2
TO parameter, SPOOL command, 2
TO RESTORE POINT parameter
DUPLICATE command, 2
FLASHBACK DATABASE command, 2
RECOVER command, 2
RESTORE command, 2
SET command, 2
TRANSPORT TABLESPACE command, 2
TO SEQUENCE parameter, FLASHBACK DATABASE command, 2
TO TIME parameter, FLASHBACK DATABASE command, 2
TRANSACTIONAL parameter
SHUTDOWN command, 2
transferring backups, 2
transparent encryption, 2, 2
TRANSPORT SCRIPT parameter, CONVERT command, 2
TRANSPORT TABLESPACE command, 2
transpt_tbs clause, 2, 2
transpt_tbs_optlist subclause, 2, 2
transportable tablespaces
backing up read-only, 2
creating from backups, 2
duplicating, 2
transportOptionList subclause
parameter descriptions, 2
syntax diagram, 2
transpt_tbs clause
parameter descriptions, 2
syntax diagram, 2
transpt_tbs_optlist subclause
parameter descriptions, 2
syntax diagram, 2
trial recovery, 2

U

UNAVAILABLE parameter, CHANGE command, 2
UNAVAILABLE status, DELETE command, 2
UNCATALOG parameter, CHANGE command, 2
undo data, 2
undo segments, 2
UNDO TABLESPACE parameter, RECOVER command, 2
UNIX commands, 2
unrecoverable operations
report output, 2
UNRECOVERABLE parameter, REPORT command, 2
UNREGISTER DATABASE command, 2
UNTIL SCN parameter
archlogRange subclause, 3
untilClause subclause, 3
UNTIL SEQUENCE parameter
archlogRange subclause, 3
untilClause subclause, 3
UNTIL TIME parameter
archlogRange subclause, 3
untilClause subclause, 3
untilClause subclause, 3
unused block compression, 2, 2
UPGRADE CATALOG command, 2
USE_DB_RECOVERY_FILE_DEST parameter, 2
user names, 3
user privileges, 2
user roles, 2
user-managed backups, 2
USING ADVISE OPTION parameter, REPAIR FAILURE command, 2
USING parameter, RMAN command, 2
UTF character set, CLOB storage, 2
utlirp script, converting PL/SQL code, 2

V

V$ARCHIVED_LOG view, 2, 3, 3
V$BACKUP_DEVICE view, 2, 2
V$BACKUP_PIECE view, 2, 2, 2
V$BACKUP_SET view, 2, 2, 2, 2, 2
V$DATABASE view, 2
V$DATABASE_BLOCK_CORRUPTION view, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
V$DATABASE_INCARNATION view, 2
V$DATABASE.CURRENT_SCN view, 2
V$DATABASE.FLASHBACK_ON view, 2
V$DATAFILE view, 3, 3
V$DATAFILE_COPY view, 2, 2, 3
V$DATAFILE_HEADER view, 3
V$FLASHBACK_DATABASE_LOG view, 2
V$PROXY_DATAFILE view, 2
V$RMAN_COMPRESSION_ALGORITHM view, 2, 2
V$RMAN_ENCRYPTION_ALGORITHMS view, 2, 2, 2, 2
V$RMAN_OUTPUT view, 2, 2
V$RMAN_STATUS view, 2
V$SESSION view, 2, 2
V$TABLESPACE view, 2
V$TRANSPORTABLE_PLATFORM view, 2
validate clause
parameter descriptions, 2
syntax diagram, 2
VALIDATE command, 2
blockObject subclause, 2
copyOfSpec subclause, 2
sizeSpec subclause, 2
skipSpec subclause, 2, 2
validate clause, 2, 2
validateObject subclause, 2, 2
validateOperand subclause, 2, 2
VALIDATE HEADER parameter, RECOVER command, 2
VALIDATE parameter
BACKUP command, 2
RESTORE command, 2
validateObject subclause
parameter descriptions, 2
syntax diagram, 2
validateOperand subclause
parameter descriptions, 2
syntax diagram, 2
validating backups, 2
variables in command files, 2
views, recovery catalog, 4
VIRTUAL parameter, CREATE CATALOG command, 2
virtual private catalog schema, assigning privileges, 2
virtual private catalogs
access to global scripts, 2
creating, 2
deleting, 2
virtual recovery catalog
See virtual private catalog
Volume Shadow Copy Service (VSS) snapshots, 2

W

wallet-based encryption, 2
wallets, 2, 2
windows, 3
recovery, 2, 2
Windows commands, 2
WITH TAG parameter
RECOVER command, 2

X

XMLType datatype in transportable tablespaces, 2

Z

ZLIB compression algorithm, 2, 2
PKÖ"q≤9ÔÔPKHiUIOEBPS/rcmsynta047.htmń;ť SQL

SQL

Purpose

Use the SQL command to execute a SQL statement or a PL/SQL stored procedure from within RMAN.

Prerequisites

None.

Syntax

sql::=

Description of sql.gif follows

Semantics

Syntax ElementDescription
CHANNEL channel_idSpecifies the case-sensitive name of a channel to use when executing an RMAN command within a RUN command.

The channel must have been allocated by means of ALLOCATE CHANNEL in this RUN command. If you do not set this parameter, then RMAN uses the default channel.

'command'Specifies a SQL statement for execution (see Example 2-143). SELECT statements are not permitted.

You must use duplicate single quotes to insert a single quote into a quoted string when the quoted string uses the same style of quoting. For example, if the string that RMAN passes to 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 (see Example 2-144).

Note: Because EXECUTE is a SQL*Plus command, you cannot execute a PL/SQL program unit by specifying EXECUTE within the RMAN SQL command. Instead, you must use the BEGIN and END keywords. For example, to execute the PL/SQL procedure rman.rman_purge with the SQL command, issue the following command:

SQL 'BEGIN rman.rman_purge; END;';

Examples

Example 2-143 Archiving the Unarchived Online Logs

This example backs up a tablespace and then archives all unarchived online redo logs.

BACKUP TABLESPACE users;
SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";

Example 2-144 Specifying a Filename within a Quoted String

This example specifies a filename by using duplicate single quotes within the context of a double-quoted string.

SQL "ALTER TABLESPACE users ADD DATAFILE ''/disk1/oradata/users02.dbf'' 
  SIZE 100K AUTOEXTEND ON NEXT 10K MAXSIZE 100K";
PKOõnō…ńPKHiUIOEBPS/rcmsubcl016.htmŽŗ recordSpec

recordSpec

Purpose

Use the recordSpec subclause to specify which backups or copies the CHANGE, CROSSCHECK, DELETE, and LIST commands should process.

Most recordSpec options allow you to specify a primary key. Use the output of the LIST command to obtain primary keys.

Syntax

recordSpec::=

Description of recordspec.gif follows

Semantics

Syntax ElementDescription
ARCHIVELOGSpecifies an archived redo log by either primary key or filename.
BACKUPSETSpecifies a backup set by primary key.
BACKUPPIECESpecifies a backup piece by media handle, primary key, or tag name.
PROXYSpecifies a proxy copy by media handle, primary key, or tag name.
CONTROLFILECOPYSpecifies a control file copy by primary key, filename pattern ('filename'), or TAG tag_name. If you crosscheck a control file copy, then you must specify a filename rather than a primary key.
DATAFILECOPYSpecifies a datafile copy by primary key, filename pattern ('filename'), tag (TAG tag_name), or matching string (LIKE 'string_pattern'). Specify ALL to indicate all datafile copies recorded in the RMAN repository.
   NODUPLICATESSpecifies that only one copy of the control file or datafile copy specified by the rest of the clause should be the target of the operation, even when there are multiple copies.

Examples

Example 3-32 Crosschecking Backups

This example crosschecks backup sets specified by primary key:

RMAN> LIST BACKUP SUMMARY; 
 
List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
8504    B  A  A SBT_TAPE    08-MAR-07       1       1       NO         TAG20070308T155057
8558    B  F  A SBT_TAPE    08-MAR-07       1       1       NO         TAG20070308T155114
9872    B  F  A DISK        08-MAR-07       1       1       NO         TAG20070308T160830
9954    B  A  A SBT_TAPE    08-MAR-07       1       1       NO         TAG20070308T161157
9972    B  F  A SBT_TAPE    08-MAR-07       1       1       NO         TAG20070308T161224
10021   B  A  A SBT_TAPE    08-MAR-07       1       1       NO         TAG20070308T161251
10042   B  F  A SBT_TAPE    08-MAR-07       1       1       NO         TAG20070308T161308
10185   B  F  A DISK        08-MAR-07       1       1       NO         TAG20070308T170532
10210   B  F  A DISK        08-MAR-07       1       1       NO         TAG20070308T170535
 
RMAN> CROSSCHECK BACKUPSET 9872, 10185, 10210;
 
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=103 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/disk2/PROD/autobackup/2007_03_08/o1_mf_s_616694910_2z19d0wg_.bkp RECID=197 STAMP=616694912
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/disk2/PROD/backupset/2007_03_08/o1_mf_nnsnf_TAG20070308T170532_2z1dpwz6_.bkp RECID=202 STAMP=616698332
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/disk2/PROD/autobackup/2007_03_08/o1_mf_s_616698335_2z1dq0d0_.bkp RECID=203 STAMP=616698336
Crosschecked 3 objects

Example 3-33 Deleting Datafile Copies

This example deletes the specified datafile copy:

RMAN> DELETE NOPROMPT DATAFILECOPY '/disk1/oradata/prod/users01.dbf';
PKfÕňPKHiUIOEBPS/rcviews019.htm≥IL∂ 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.

ColumnDatatypeDescription
SESSION_KEYNUMBERSession identifier. Use in joins with RC_RMAN_OUTPUT and RC_RMAN_BACKUP_JOB_DETAILS.
SESSION_RECIDNUMBERTogether with SESSION_STAMP, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
SESSION_STAMPNUMBERTogether with SESSION_RECID, uniquely identifies output for this backup job from RC_RMAN_OUTPUT.
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
BS_KEYNUMBERThe primary key of the backup set to which this record belongs in the recovery catalog. Use this column to joint with RC_BACKUP_SET or RC_BACKUP_PIECE.
RECIDNUMBERThe backup set RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe backup set RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
SET_STAMPNUMBERThe SET_STAMP value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies this record in the target database control file.
SET_COUNTNUMBERThe SET_COUNT value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies this record in the target database control file.
BACKUP_TYPEVARCHAR2(1)The type of the backup: D (full backup or level 0 incremental), I (incremental level 1), L (archived redo log).
CONTROLFILE_INCLUDEDVARCHAR2(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_LEVELNUMBERThe level of the incremental backup: NULL, 0, or 1.
PIECESNUMBERThe number of backup pieces in the backup set.
START_TIMEDATEThe time when the backup began.
COMPLETION_TIMEDATEThe time when the backup completed
ELAPSED_SECONDSNUMBERThe duration of the backup in seconds.
BLOCK_SIZEVARCHAR2The block size used when creating the backup pieces in the backup set.
KEEPVARCHAR2(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_UNTILDATEIf 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_OPTIONSVARCHAR2(11)The KEEP options specified for this backup set. Possible values are NOLOGS, BACKUP_LOGS, LOGS, and NULL. NOLOGS indicates a consistent backup made when the database was mounted. BACKUP_LOGS indicates that the backup was made in open mode, so archived log backups must be applied to make it consistent. LOGS indicates a long-term backup made with the LOGS keyword, which is now deprecated. NULL indicates that this backup has no KEEP options and becomes obsolete based on the retention policy.
DEVICE_TYPEVARCHAR2(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), then this column contains an asterisk (*). Values are DISK or SBT_TAPE.
COMPRESSEDVARCHAR2(3)YES if RMAN's binary compression was used in creating the backup set. NO, otherwise.
NUM_COPIESNUMBERNumber of identical copies of this backup set created during the backup, for example if duplexing was used.
OUTPUT_BYTESNUMBERSum of sizes of all output pieces generated by this job.
ORIGINAL_INPUT_BYTESNUMBERSum of sizes of all input files backed up for this job.
COMPRESSION_RATIONUMBERCompression ratio for this backup.
STATUSCHAR(1)The status of the backup set: always A (all backup pieces available), because this view only reflects available backup sets.
ORIGINAL_INPRATE_BYTESNUMBERNumber of bytes read each second when the backup set was initially created.
OUTPUT_RATE_BYTESNUMBERNumber of bytes written each second when the backup set was initially created.
ORIGINAL_INPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as ORIGINAL_INPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.
OUTPUT_BYTES_DISPLAYVARCHAR2(4000)Same value as OUTPUT_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.
ORIGINAL_INPRATE_BYTES_DISPLAYVARCHAR2(4000)Same value as ORIGINAL_INPRATE_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.
OUTPUT_RATE_BYTES_DISPLAYVARCHAR2(4000)Same value as OUTPUT_RATE_BYTES, but converted to a user-displayable format, for example, 798.01M or 5.25G.
TIME_TAKEN_DISPLAYVARCHAR2(4000)Same value as ELAPSED_SECONDS, but converted to a user-displayable format in hours, minutes and seconds.
ENCRYPTEDVARCHAR2(3)Indicates whether the backup piece is encrypted (YES) or not (NO).
BACKED_BY_OSBVARCHAR2(3)Indicates whether the backup piece is backed up to Oracle Secure Backup (YES) or not (NO).

PKa¶ūfłI≥IPKHiUIOEBPS/rcmsubcl011.htm„%ŕ keepOption

keepOption

Purpose

Use the keepOption subclause to specify the status of a backup or copy in relation to a retention policy.

Syntax

keepOption::=

Description of keepoption.gif follows

Usage Notes

RMAN does not consider backup pieces with the KEEP option when computing the backup retention policy. If available, RMAN uses these backups for disaster recovery restore operations, but their purpose is to produce a snapshot of the database that can be restored on another system for testing or historical usage.

Semantics

Syntax ElementDescription
KEEPSpecifies the backup as an archival backup, which is a self-contained backup that is exempt from the configured retention policy.

An archival backup is self-contained because is contains all files necessary to restore the backup and recover it to a consistent state. If the database is open during the backup, then RMAN automatically generates and backs up the archived redo logs needed to make the database backup consistent (see Example 2-26).

RMAN does not consider backup pieces with the KEEP option when computing the retention policy. If available, RMAN uses these backups for disaster recovery restore operations, but their purpose is to produce a snapshot of the database that can be restored on another system for testing or historical usage.

Note: You cannot use KEEP to override the retention policy for files stored in the flash recovery area. If you specify KEEP when backing up to the recovery area, then RMAN issues an error.

When KEEP is specified, RMAN creates multiple backup sets. RMAN backs up datafiles, archived redo logs, the control file, and the server parameter file with the options specified in the first backupOperand. RMAN uses the FORMAT, POOL, and TAG parameters for all the backups. For this reason, the FORMAT string must allow for the creation of multiple backup pieces. Specifying %U is the easiest way to meet this requirement.

Note: A recovery catalog is only required for KEEP FOREVER. No other KEEP options require a catalog.

   FOREVERSpecifies that the backup or copy never becomes obsolete (see Example 2-27). A recovery catalog is required when FOREVER is specified because the backup records eventually age out of the control file.

   UNTIL TIME
   'date_string'
Specifies the time until which the backup or copy must be kept. After this time the backup is obsolete, regardless of the backup retention policy settings.

You can either specify a specific time by using the current NLS_DATE_FORMAT, or a SQL date expression such as 'SYSDATE+365'. If you specify a KEEP TIME such as 01-JAN-07, then the backup becomes obsolete one second after midnight on this date. If you specify a KEEP time such as 9:00 p.m, then the backup becomes obsolete at 9:01 p.m.


   RESTORE POINT
   restore_point_name
Creates a normal restore point matching the SCN to which RMAN must recover the backup to a consistent state (see Example 2-26). The restore point name must not already exist.

The SCN is captured just after the datafile backups complete. The restore point is a label for the SCN to which this archival backup can be restored and recovered, enabling the database to be opened. In contrast, the UNTIL TIME clause specifies the date until which the backup must be kept.

Note: The RESTORE POINT parameter is not valid with the CHANGE command.

NOKEEPSpecifies that any KEEP attributes no longer apply to the backup. Thus, the backup is a normal backup that is subject to the configured backup retention policy. This is the default behavior if no KEEP option is specified.

Examples

Example 3-23 Creating a Consistent Database Backup for Archival

This example makes a database backup with tag Q107 and specifies that it should never be considered obsolete (partial sample output included). The archived redo logs necessary to make the datafiles consistent are included in the backup set.

RMAN> BACKUP TAG Q107 DATABASE KEEP FOREVER;

Starting backup at 24-JAN-07

current log archived
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=105 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_SBT_TAPE_1: starting full datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
.
.
.

Example 3-24 Removing the KEEP Attributes for a Backup

This example backs up all archived redo logs. The KEEP clause specifies that one second after midnight on January 1, 2008 the backup is considered obsolete.

RMAN> BACKUP KEEP UNTIL TIME '01-JAN-08' ARCHIVELOG ALL;

The following command removes the KEEP attributes of all archived redo log backups (sample output included):

RMAN> CHANGE BACKUP OF ARCHIVELOG ALL NOKEEP;
 
using channel ORA_SBT_TAPE_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=77 device type=DISK
keep attributes for the backup are deleted
backup set key=330 RECID=19 STAMP=612722760
keep attributes for the backup are deleted
backup set key=397 RECID=22 STAMP=612722884
PKę‘’Ť%„%PKHiUIOEBPS/rcmsynta009.htmġ CHANGE

CHANGE

Purpose

Use the CHANGE command to perform the following tasks:


See Also:

Oracle Database Backup and Recovery User's Guide to change the availability status of a backup or copy

Prerequisites

RMAN must be connected as TARGET to a database instance, which must be started.

Usage Notes

"RMAN Backups in a Data Guard Environment" explains the difference between the association and accessibility of a backup. In a Data Guard environment, the database that creates a backup or copy is associated with the file. You can use maintenance commands such as CHANGE, DELETE, and CROSSCHECK for backups when connected to any database in the Data Guard environment as long as the backups are accessible. In general, RMAN considers tape backups created on any database as accessible to all databases in the environment, whereas disk backups are accessible only to the database that created them.

For example, suppose that you connect RMAN as TARGET to standby database standby1 and back it up to tape and disk. If the tape drive becomes unavailable, then you can connect RMAN as TARGET to any primary or standby database in the Data Guard environment to change the status of the tape backup to UNAVAILABLE. After the tape drive is repaired, you can connect RMAN as TARGET to any database to change the status of the tape backup back to AVAILABLE. However, if the disk backup is accidentally removed by an operating system utility, then RMAN can only change the status of the disk backup when connected as TARGET to standby1.

Syntax

change::=

Description of change.gif follows

(maintSpec::=, forDbUniqueNameOption::=, keepOption::=, deviceSpecifier::=)

maintSpec::=

Description of maintspec.gif follows

(listObjList::=, archivelogRecordSpecifier::=, maintQualifier::=, recordSpec::=, deviceSpecifier::=)

forDbUniqueNameOption::=

Description of fordbuniquenameoption.gif follows

resetDbUniqueNameOption::=

Description of resetdbuniquenameoption.gif follows

changeFailure::=

Description of changefailure.gif follows

Semantics

change

This clause enables you to change the status of RMAN repository records. To obtain the primary keys of RMAN repository records whose status you want to change, run a LIST command or query the recovery catalog views.

Syntax ElementDescription
maintSpec
Specifies which files you want to CHANGE.

See Also: maintSpec for descriptions of the options in this clause.

   forDbUniqueNameOption
Changes the metadata for objects that are exclusively associated with the specified DB_UNIQUE_NAME in a Data Guard environment.

See Also: forDbUniqueNameOption for descriptions of the options in this clause.

   AVAILABLEChanges the status of a backup or copy to AVAILABLE in the repository. RMAN searches for the file and verifies that it exists.

This feature is useful when a previously unavailable file is made available again. You can also use this option to alter the repository status of backups and copies from prior incarnations.

This is the only CHANGE option that requires either a manual or automatic maintenance channel. A maintenance channel is not required, however, when CHANGE ... AVAILABLE is used with a file that is disk only (that is, an ARCHIVELOG, DATAFILECOPY, or CONTROLFILECOPY). 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.

If you execute CHANGE ... AVAILABLE for a file in a Data Guard environment, then RMAN attempts to crosscheck the file before updating its status to AVAILABLE. If the file is inaccessible, then RMAN prompts you to perform the same operation when connected as TARGET to the database associated with the file. If the file is accessible, then RMAN updates the status as requested.

Note: You can view the status of backups in the LIST output or recovery catalog views.

Note: CHANGE ... AVAILABLE is not valid for foreign archived redo logs, which are received by a logical standby database for a LogMiner session. Unlike normal archived logs, foreign archived logs have a different DBID.

   keepOption
Changes the exemption status of a backup or copy in relation to the configured retention policy. For example, specify CHANGE ... NOKEEP to remove the KEEP attributes for a backup, making it subject to the backup retention policy.

The KEEP FOREVER clause requires use of a recovery catalog (see Example 2-36). The RESTORE POINT option is not valid with CHANGE. You cannot use CHANGE ... UNAVAILABLE or KEEP attributes for files stored in the flash recovery area.

See Also: keepOption

   resetDbUniqueNameOption
Associates the files in maintSpec with a different database in a Data Guard environment.

See Also: resetDbUniqueNameOption

   UNAVAILABLEChanges the status of a backup or copy to UNAVAILABLE in the repository (see Example 2-34). View the status in the LIST output or recovery catalog views.

This option is useful when a file cannot be found or has migrated offsite. RMAN does not use a file that is marked UNAVAILABLE in a RESTORE or RECOVER command. If the file is later found or returns to the main site, then use the AVAILABLE option to update its status. The UNAVAILABLE option is also useful when you do not want a specific backup or copy to be eligible to be restored but also do not want to delete it, or when you want to alter the repository status of backups and copies from prior incarnations.

CHANGE ... UNAVAILABLE is not valid for files in the flash recovery area. This command is also not valid for foreign archived redo logs, which are received by a logical standby database for a LogMiner session. Unlike normal archived logs, foreign archived logs have a different DBID.

Note: If you execute CHANGE ... UNAVAILABLE for a file in a Data Guard environment, then RMAN does not attempt to crosscheck the file before updating its status to UNAVAILABLE. RMAN updates the status as requested regardless of whether the file physically exists.

   UNCATALOGRemoves 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 (see Example 2-35). Note that 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.

If you execute CHANGE ... UNCATALOG for a file in a Data Guard environment, then RMAN does not attempt to crosscheck the file before removing its metadata from the recovery catalog. RMAN removes the metadata as requested regardless of whether the file physically exists.

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.


   DEVICE TYPE
   deviceSpecifier
Executes the CHANGE for the specified device type only (see deviceSpecifier). 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.
changeFailure
Specifies changes for failures recorded by the Data Recovery Advisor.

DB_UNIQUE_NAME
FROM db_unique_name
TO db_unique_name
Updates the metadata in the recovery catalog to reflect a new DB_UNIQUE_NAME for a database in a Data Guard environment. The first value specifies the old DB_UNIQUE_NAME for the database currently recorded in the recovery catalog, whereas the second specifies the new DB_UNIQUE_NAME.

RMAN must be connected to a recovery catalog and a mounted target database. The target database should not have the DB_UNIQUE_NAME specified in the FROM db_unique_name parameter; otherwise, RMAN signals an error.

Typically, you use this command after you have already changed the DB_UNIQUE_NAME initialization parameter of a database and must update its metadata in the recovery catalog. In general, you should run this command before performing any other RMAN operations on a renamed database. The recommended practice is to execute LIST DB_UNIQUE_NAME before CHANGE DB_UNIQUE_NAME.

Assume that you have changed the DB_UNIQUE_NAME initialization parameter for a standby database from standby_old to standby_new. Typically, you execute CHANGE DB_UNIQUE_NAME in the following scenarios:

  • A LIST DB_UNIQUE_NAME command shows the old DB_UNIQUE_NAME value but does not show the new one (see Example 2-39).

  • A LIST DB_UNIQUE_NAME command shows both the old and new DB_UNIQUE_NAME values. When RMAN connects as TARGET to a database with an unrecognized DB_UNIQUE_NAME, RMAN implicitly registers the instance as a new database. For this reason, LIST DB_UNIQUE_NAME command can show both the old and new names (in this example, standby_old and standby_new) for a database whose DB_UNIQUE_NAME initialization parameter has been changed.

In the scenario in which only the old name is listed, execute CHANGE DB_UNIQUE_NAME FROM standby_old TO standby_new so that RMAN changes the DB_UNIQUE_NAME for standby_old to standby_new in the recovery catalog.

In the scenario in which both the old and new names are listed, RMAN automatically executes the following commands when you run CHANGE DB_UNIQUE_NAME FROM standby_old TO standby_new:

CHANGE ARCHIVELOG ALL FOR DB_UNIQUE_NAME standby_old RESET DB_UNIQUE_NAME

CHANGE BACKUP FOR DB_UNIQUE_NAME standby_old RESET DB_UNIQUE_NAME

UNREGISTER DB_UNIQUE_NAME standby_old

Thus, RMAN changes the association of all backups for the DB_UNIQUE_NAME specified in the FROM clause to the DB_UNIQUE_NAME specified in the TO clause.


resetDbUniqueNameOption

This clause enables you to associate backups made on one database in a Data Guard environment with a different database in the environment. The following table explains the RMAN behavior when different options are specified with RESET DB_UNIQUE_NAME.

Table 2-2 RESET DB_UNIQUE_NAME Options

TO db_unique_nameFOR DB_UNIQUE_NAMERMAN Behavior

No

No

RMAN associates the maintSpec files with the target database. RMAN also changes the association of all backups that are not associated with any database.

Typically, you would execute CHANGE with these options after upgrading to an Oracle Database 11g recovery catalog schema, so that you can associate the backups with the target database.

Yes

No

RMAN associates the maintSpec files with the database indicated by the TO db_unique_name. RMAN also changes the association of all backups that are not associated with any database.

No

Yes

RMAN restricts its operations to maintSpec files that are associated with the database in the FOR DB_UNIQUE_NAME clause, and then associates these files with the target database.

Yes

Yes

RMAN restricts its operations to maintSpec files that are associated with the database in the FOR DB_UNIQUE_NAME clause, and then associates these files with the database specified by TO db_unique_name.


Syntax ElementDescription
RESET DB_UNIQUE_NAMEAssociates the files in maintSpec with the target database (see Example 2-38). Table 2-2 explains the RMAN behavior when different options are specified.

When changing the association of the files from one database to another database, RMAN deletes the duplicate names from the recovery catalog. For example, if you change the association of datafile copy /d1/df1.bak from database standby1 to database prod, then the recovery catalog has only one record for this file rather than two.

Use caution when specifying the RESET DB_UNIQUE_NAME option because you cannot undo the effect of this command. For example, after you have change the association of the files associated with database standby1 to database prod, the recovery catalog does not retain historical metadata about the database with which these files were previously associated. However, you can unregister database standby1 and connect RMAN again to standby1, but in this case the recovery catalog will be updated with all metadata from the standby1 control file.

   TO db_unique_nameAssociates the files in maintSpec with the specified database in a Data Guard environment.

changeFailure

This clause enables you to change the status of failures. Use the LIST FAILURE command to show the list of failures.

Syntax ElementDescription
FAILUREEnables you to change priority or close failures recorded in the Automatic Diagnostic Repository. By default RMAN prompts for confirmation before performing the requested change.

The target database to which RMAN is connected must be a single-instance database and must not be a physical standby database.

   ALLChanges only open failures.
   CRITICALChanges only critical failures.
   HIGHChanges only failures with HIGH priority.
   LOWChanges only failures with LOW priority.
   failnumChanges only the specified failure.

   EXCLUDE FAILURE
   failnum
Excludes the specified failures from the change.

Examples

Example 2-34 Updating Backups to Status UNAVAILABLE

Assume that you have temporarily moved backup set 4 to a different location because of a space issue on disk. The backup, which has the key 4, is still listed as available:

RMAN> LIST BACKUP SUMMARY;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1       B  A  A DISK        24-FEB-07       1       1       NO         TAG20070427T115348
3       B  A  A DISK        24-MAR-07       1       1       NO         TAG20070427T115452
4       B  F  A DISK        24-APR-07       1       1       NO         TAG20070427T115456

You do not want to uncatalog the backup because you plan to move it back to its original location when space has been freed up on the disk. Thus, you make the backup unavailable as follows (sample output included):

RMAN> CHANGE BACKUPSET 4 UNAVAILABLE;
 
changed backup piece unavailable
backup piece handle=/disk2/backup/c-3257893776-20070424-00 RECID=4 STAMP=588858897
Changed 1 objects to UNAVAILABLE status

Example 2-35 Uncataloging and Recataloging Archived Redo Logs

In this example, you move all archived redo logs to a new directoryĮPū, uncatalog them, and then recatalog them in the new location:

HOST '/bin/mv $ORACLE_HOME/dbs/*.arc /disk2/archlog/';
CHANGE ARCHIVELOG ALL UNCATALOG;
CATALOG START WITH '/disk2/archlog' NOPROMPT;

Example 2-36 Changing a Database Backup into an Archival Backup

Assume that your goal to is to change a database backup into an archival backup, which you plan to store offsite. Because the backup is consistent and therefore requires no recovery, you do not need to save archived redo logs with the backup. The example uses the CHANGE ... KEEP FOREVER command to specify that the backup should never become obsolete.

RMAN> CONNECT TARGET /
RMAN> CONNECT CATALOG rman@catdb

recovery catalog database Password: password

RMAN> CHANGE BACKUP TAG 'consistent_db_bkup' KEEP FOREVER;

Example 2-37 Changing the Status of a Failure

In the following example, the LIST FAILURE command shows that a datafile has corrupt blocks. The failure number is 5 and has a priority of HIGH. You decide to change the priority of this failure to low.

RMAN> LIST FAILURE;

List of Database Failures
Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
5          HIGH     OPEN      11-DEC-06     datafile 8 contains corrupt blocks
 
RMAN> CHANGE FAILURE 5 PRIORITY LOW;
 
List of Database Failures
Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
5          HIGH     OPEN      11-DEC-06     datafile 8 contains corrupt blocks
 
Do you really want to change the above failures (enter YES or NO)? YES
changed 1 failures to LOW priority

Example 2-38 Associating Backups with a New Database in a Data Guard Environment

Assume that standby1, standby2, and standby3 are standby databases associated with primary database is prod. This example assumes that RMAN is connected to target database prod and a recovery catalog.

You are planning to remove standby1 from your environment, so you want to associate the standby1 backups with your primary database. You are also planning to remove standby3 from your environment, so you want to associate the standby3 backups with standby2. You execute the following commands:

CHANGE BACKUP FOR DB_UNIQUE_NAME standby1 RESET DB_UNIQUE_NAME;
CHANGE BACKUP FOR DB_UNIQUE_NAME standby3 RESET DB_UNIQUE_NAME TO standby2;

Example 2-39 Updating a DB_UNIQUE_NAME in the Recovery Catalog

Assume that a standby database has the DB_UNIQUE_NAME initialization parameter setting of dgrdbms4, which you decide to change to sfrdbms4. You shut down the standby instance, change the DB_UNIQUE_NAME initialization parameter to sfrdbms4, and restart the standby instance.

Later, to update the recovery catalog to reflect the changed unique name of the standby database, you connect RMAN to the primary database and recovery catalog, and then execute the CHANGE command as follows:

CHANGE DB_UNIQUE_NAME FROM dgrdbms4 TO sfrdbms4;
PK¶ĎģčĻŹĮŹPKHiUIOEBPS/preface001.htmćrų Audience

Audience

Backup and Recovery Reference is intended for database administrators who perform the following tasks:

To use this document, you must know the following:

PKáEķíćPKHiUIOEBPS/content.opfġ Oracle¬ģ Database Backup and Recovery Reference, 11g Release 1 (11.1) en-US B28273-03 Oracle Corporation Oracle Corporation Oracle¬ģ Database Backup and Recovery Reference, 11g Release 1 (11.1) 2008-08-07T15:31:45Z Describes RMAN syntax and recovery catalog views. PKá5ŻôhĆ^ĆPKHiUIOEBPS/rcviews017.htmä3uŐ 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the incarnation of the target database. Use this column to join with RC_DATABASE_INCARNATION.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
BRL_KEYNUMBERThe primary key of the archived redo log in the recovery catalog. If you issue the LIST command while RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output.
RECIDNUMBERThe record identifier propagated from V$BACKUP_REDOLOG. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe stamp from V$BACKUP_REDOLOG. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
BS_KEYNUMBERThe primary key of the backup set to which this record belongs in the recovery catalog. Use this column to join with RC_BACKUP_SET or RC_BACKUP_PIECE.
SET_STAMPNUMBERThe SET_STAMP value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
SET_COUNTNUMBERThe SET_COUNT value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
BACKUP_TYPEVARCHAR2(1)The type of the backup: L (archived redo log).
COMPLETION_TIMEDATEThe time when the backup completed.
THREAD#NUMBERThe thread number of the redo log.
SEQUENCE#NUMBERThe log sequence number.
RESETLOGS_CHANGE#NUMBERThe SCN of the most recent RESETLOGS when the record was created.
RESETLOGS_TIMEDATEThe time stamp of the most recent RESETLOGS when the record was created.
FIRST_CHANGE#NUMBERThe SCN generated when Oracle switched into the redo log.
FIRST_TIMEDATEThe time when Oracle switched into the redo log.
NEXT_CHANGE#NUMBERThe first SCN of the next redo log in the thread.
NEXT_TIMEDATEThe first time stamp of the next redo log in the thread.
BLOCKSNUMBERThe number of operating system blocks written to the backup.
BLOCK_SIZENUMBERThe number of bytes in each block of this redo log.
STATUSVARCHAR2(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_RECIDNUMBERThe RECID value from V$BACKUP_SET.
BS_STAMPNUMBERThe STAMP value from V$BACKUP_SET. Note that BS_STAMP is different from SET_STAMP. BS_STAMP is the stamp of the backup set record when created in the control file, whereas SET_STAMP joins with SET_COUNT to make a unique identifier.
PIECESNUMBERThe number of pieces in the backup set.
TERMINALVARCHAR2(3)Indicates whether this log was created during terminal recovery of a standby database. Values are YES or NO.

PK≥] Ź3ä3PKHiUIOEBPS/rcmsynta007.htmġ BACKUP

BACKUP

Purpose

Use the BACKUP command to back up a primary or standby database, tablespace, datafile (current or copy), control file (current or copy), server parameter file, archived redo log file, or backup set.

Additional Topics

Prerequisites

RMAN must be connected to a target database. See the CONNECT and RMAN commands to learn how to connect to a database as TARGET.

Database Archiving Modes

If the target database is in ARCHIVELOG mode, then the database must be mounted or open with a current control file. Backups made while the database is open are inconsistent. You must apply redo logs after restoring an inconsistent backup to make the database consistent.

If the target database is in NOARCHIVELOG mode, then the database must be mounted after a consistent shutdown when you make the backup. The shutdown is only consistent if you successfully execute the SHUTDOWN command with the NORMAL, IMMEDIATE, or TRANSACTIONAL options. You cannot use RMAN to back up a NOARCHIVELOG database after an instance failure or SHUTDOWN ABORT.

Backup Media

RMAN can only back up files onto valid media. If you specify DEVICE TYPE DISK, then RMAN makes backups to random access disks. You can make a backup on any device that can store a datafile. 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 files to any media supported by the media manager.

When backing up Oracle Database files to disk, the logical block size of the files must be an even multiple of the physical block size of the destination device. For example, a disk device with a block size of 2 KB can only be used as a destination for backups of Oracle files with logical block sizes of 2 KB, 4 KB, 6 KB and so on. In practice, most disk drives have physical block sizes of 512 bytes, so this limitation rarely affects backup. However, you can encounter this limitation when using BACKUP ... DEVICE TYPE DISK to back your database up to a writeable CD or DVD, or some other device that has a larger physical block size.

Channels

If no automatic channel is configured for the specified device type, then you must manually allocate a channel for each BACKUP execution. If no manual channel is allocated, then RMAN uses the default channels set with the CONFIGURE command. RMAN has a DISK channel preconfigured but no preconfigured sbt channels.


Note:

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.

Usage Notes

RMAN can only back up datafiles, control files, server parameter files, archived redo log files, and RMAN backups of these files. RMAN cannot make backups of other database-related files such as network configuration files, password files, the block change tracking file, and the contents of the Oracle home directory. Likewise, some features of Oracle Database, such as external tables or the BFILE datatype, store data in files other than those in the preceding list. RMAN cannot back up these files.

RMAN decomposes a BACKUP command into multiple independent backup steps. RMAN can execute each independent step on any channel allocated for a specific device. If multiple channels are allocated, and if 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.

RMAN backups made on one platform are not transportable to a different platform.

RMAN backups made in a previous release of Oracle Database are usable after a database migration or upgrade.

If you change the DB_NAME for a database, but not its DBID, then RMAN considers backups made of the database with the previous DB_NAME as eligible to be restored.

Incremental Backups

An INCREMENTAL backup at level 0 backs up all data blocks in datafiles being backed up. An incremental backup at level 0 is identical in content to a FULL backup, but unlike a full backup the level 0 backup is a part of the incremental backup strategy.

A level 1 backup copies only changed blocks. A level 1 incremental backup is either differential or CUMULATIVE. If cumulative, RMAN backs up all blocks changed since the most recent level 0 backup. If differential, RMAN backs up blocks updated since the most recent level 0 or level 1 incremental backup. You can apply a level 1 backup of a standby database to a level 0 backup of a primary database, and also apply a level 1 backup of a primary database to a level 0 backup of a standby database.

Incremental backups at level 0 can be either backup sets or image copies, but incremental backups at level 1 can only be backup sets.

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:


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. When making a level 1 backup, RMAN only makes a new level 0 backup if no level 0 is available in either the current or parent database incarnation.

You can improve incremental backup performance by enabling block change tracking on a primary or standby database. In this case, RMAN keeps a record of which blocks have changed in the block change tracking file.

The change tracking file maintains bitmaps that mark changes in the datafiles between backups. The database performs a bitmap switch before each backup. Oracle Database automatically manages space in the change tracking file to retain block change data that covers the 8 most recent backups. After the maximum of 8 bitmaps is reached, the most recent bitmap is overwritten by the bitmap that tracks the current changes.

The first level 0 incremental backup scans the entire datafile. Subsequent incremental backups use the block change tracking file to scan only the blocks that have been marked as changed since the last backup. An incremental backup can be optimized only when it is based on a parent backup that was made after the start of the oldest bitmap in the block change tracking file.

Consider the 8-bitmap limit when developing your incremental backup strategy. For example, if you make a level 0 database backup followed by 7 differential incremental backups, then the block change tracking file now includes 8 bitmaps. If you then make a cumulative level 1 incremental backup, RMAN cannot optimize the backup because the bitmap corresponding to the parent level 0 backup is overwritten with the bitmap that tracks the current changes.


See Also:

Oracle Database Backup and Recovery User's Guide for details about block change tracking

Encryption of Backup Sets

RMAN can transparently encrypt data written to backup sets and decrypt those backup sets when they are needed in a RESTORE operation. To create encrypted backups on disk, the database must use the Advanced Security Option. To create encrypted backups directly on tape, RMAN must use the Oracle Secure Backup SBT interface, but does not require the Advanced Security Option. RMAN issues an ORA-19916 error if you attempt to create encrypted RMAN backups using an SBT library other than Oracle Secure Backup.

RMAN can encrypt backups by using several different encryption algorithms, which are listed in V$RMAN_ENCRYPTION_ALGORITHMS. RMAN supports three modes of encryption for backups:


Note:

Wallet-based encryption is more secure than password-based encryption because no passwords are involved. You should use password-based encryption only when absolutely necessary because your backups must be transportable.

The CONFIGURE and SET commands are used to manage the encryption settings for database backups. See the reference entries for those commands for more details. Backup sets containing archived logs are encrypted if any of the following are true:


See Also:


RMAN Backups in a Data Guard Environment

A recovery catalog is required when you are performing RMAN operations in a Data Guard environment. The catalog enables all RMAN operations to be transparently executable at any primary or standby database. You can offload primary database backups onto any standby database in the environment; the RMAN backups are interchangeable. If you use RMAN in NOCATALOG mode, then RMAN uses only the metadata in the mounted control file.

In a Data Guard environment, the database that creates a backup or copy is associated with the file. For example, if RMAN connects as TARGET to database prod and backs it up, then this database backup is associated with prod. A backup remains associated with the database that created in unless you use the CHANGE ... RESET DB_UNIQUE_NAME to associate the backup with a different database.

The association of a backup is different from its accessibility. The recovery catalog considers disk backups as accessible only to the database in the Data Guard environment on which it was created, whereas tape backups created on one database are considered accessible to all databases. If a backup file is not associated with any database, then the row describing it in the recovery catalog view shows null for the SITE_KEY column. By default, RMAN associates files whose SITE_KEY is null with the database to which RMAN is connected as TARGET.

In a Data Guard environment, RMAN commands can operate on any backups that are accessible. For example, assume that databases prod and standby1 reside on different hosts. RMAN backs up datafile 1 on prod to /prodhst/disk1/df1.dbf on the production host and also to tape. RMAN backs up datafile 1 on standby1 to /sby1hst/disk2/df1.dbf on the standby host and also to tape. If RMAN is connected to database prod as TARGET, then you cannot use RMAN to perform operations with the /sby1hst/disk2/df1.dbf backup located on the standby host. However, RMAN considers the tape backup made on standby1 as eligible to be restored.


Note:

You can FTP a backup from a standby host to a primary host or vice versa and then CATALOG it. After a file is cataloged by the target database, the file is associated with the target database.

As long as backups are accessible to RMAN, you can use RMAN maintenance commands such as CHANGE, CROSSCHECK, and DELETE for backups when connected to any primary or standby database.


See Also:

Oracle Data Guard Concepts and Administration to learn how to use RMAN to back up and restore files in a Data Guard environment

Syntax

backup::=

Description of backup.gif follows

(backupOperand::=, backupSpec::=, backupSpecOperand::=)

backupOperand::=

Description of backupoperand.gif follows

(deviceSpecifier::=, fileNameConversionSpec::=, formatSpec::=, forRecoveryOfSpec::=, keepOption::=, notBackedUpSpec::=, sizeSpec::=, skipSpec::=)

backupSpec::=

Description of backupspec.gif follows

(archivelogRecordSpecifier::=, completedTimeSpec::=, copyOfSpec::=, datafileCopySpec::=, datafileSpec::=, backupSpecOperand::=)

backupSpecOperand::=

Description of backupspecoperand.gif follows

(formatSpec::=, keepOption::=, notBackedUpSpec::=, sizeSpec::=, skipSpec::=)

backupTypeSpec::=

Description of backuptypespec.gif follows

copyOfSpec::=

Description of copyofspec.gif follows

(datafileSpec::=)

datafileCopySpec::=

Description of datafilecopyspec.gif follows

duration::=

Description of duration.gif follows

forRecoveryOfSpec::=

Description of forrecoveryofspec.gif follows

(formatSpec::=)

notBackedUpSpec::=

Description of notbackedupspec.gif follows

sizeSpec::=

Description of sizespec.gif follows

skipSpec::=

Description of skipspec.gif follows

Semantics

backup

This clause specifies the objects to be backed up as well as the options to control the backup. Refer to backup::= for the syntax diagram.

Syntax ElementDescription
backupOperand
Specifies various options for the BACKUP command.
backupSpec
Specifies one or more objects to be backed up.

Each backupSpec clause generates one or more backup sets (AS BACKUPSET) or image copies (AS COPY). For AS BACKUPSET, the backupSpec clause generates multiple backup sets if the number of datafiles specified in or implied by its list of objects exceeds the FILESPERSET limit.

   PLUS ARCHIVELOGIncludes archived redo logs in the backup (see Example 2-15). Causes RMAN to perform the following steps:

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Run the BACKUP ARCHIVELOG ALL command. If backup optimization is enabled, then RMAN only backs up logs that have not yet been backed up.

Back up the files specified in the BACKUP command.

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Back up any remaining archived redo logs. If backup optimization is not enabled, then RMAN backs up the logs generated in step 1 plus all the logs generated during the backup.

Note: You cannot specify PLUS ARCHIVELOG on the BACKUP ARCHIVELOG command or BACKUP AS COPY INCREMENTAL command (or BACKUP INCREMENTAL command when the default backup type is COPY). You cannot specify PLUS ARCHIVELOG when also specifying INCREMENTAL FROM SCN.

Note: Unless the online redo log is archived at the end of the backup, DUPLICATE will not be possible with this backup.

    backupSpecOperand
Specifies a variety of options and parameters that affect the backupSpec clause.

backupOperand

This subclause specifies options such as the device type and output format. Refer to backupOperand::= for the syntax diagram.

Syntax ElementDescription
backupTypġeSpec
Specifies the type of backup being created, either backup sets (AS BACKUPSET) or image copies (AS COPY).

See Also: backupTypeSpec for details

CHANNEL channel_idSpecifies the case-sensitive name of a channel to use when creating backups. Use any meaningful name, for example ch1 or dev1. The database uses the channel ID to report I/O errors. If you do not set this parameter, then RMAN dynamically assigns the backup sets to any available channels during execution.

As shown in Example 2-23, you can use CHANNEL to specify which channels back up which files.

Note: You can also specify this parameter in the backupSpec clause.

CHECK LOGICALTests data and index blocks that pass physical corruption checks for logical corruption (see Example 2-25). This option typically adds 1-3% overhead.

Examples of logical corruption are 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 SET MAXCORRUPT command specifies the total number of physical and logical corruptions permitted in a datafile.

By default, the BACKUP command computes a checksum for each block and stores it in the backup. If you specify the NOCHECKSUM option, then RMAN does not perform a checksum of the blocks when writing the backup.

If SET MAXCORRUPT and NOCHECKSUM are not set, then CHECK LOGICAL detects all types of corruption that are possible to detect during a backup.

COPIES integerSets the number of identical backups (1 - 4) that RMAN creates. The default value is 1.

You can use multiple format strings to specify different names and locations for the copies. Example 2-22 illustrates a duplexed backup to different locations on disk.

RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices. Also, if COPIES is greater than 1, then the BACKUP_TAPE_IO_SLAVES initialization parameter must be enabled on the target database.

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:

BACKUP COPIES

SET BACKUP COPIES

CONFIGURE ... BACKUP COPIES

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.

CUMULATIVECopies the data blocks used since the most recent level 0 backup (see Example 2-16).

Note: This option does not apply with AS COPY and results in an error message.

DEVICE TYPE deviceSpecifierAllocates automatic channels for the specified device type only. For example, if you configure disk and tape channels, then configure sbt as the default device type, then the following command allocates disk channels only:
BACKUP DEVICE TYPE DISK DATABASE;

The DEVICE TYPE option is valid only for automatic channels and is not valid for manually allocated channels. 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.

Note: You cannot specify DEVICE TYPE DISK when running the BACKUP RECOVERY AREA command.

See Also: deviceSpecifier

DISKRATIO integerDirects 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 data. To manually disable this feature, set DISKRATIO to 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 to 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:

  • Use a high-bandwidth tape drive that requires several datafiles to be multiplexed in order to keep the tape drive streaming

  • Make backups while the database is open and you need to spread the I/O load across several disk spindles to leave bandwidth for online operations.

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

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 is specified, then RMAN uses the default format %U.

See Also: fileNameConversionSpec for file renaming patterns

FILESPERSET integerSpecifies the maximum number of input files to include in each output backup set. This parameter is only relevant when BACKUP generates backup sets.

RMAN backs up the files in each backupSpec as one or more backup sets. When the number of files in each backupSpec exceeds the FILESPERSET setting, then RMAN splits the files into multiple backup sets accordingly. The default value for FILESPERSET is 64.

The RMAN behavior is illustrated by the following BACKUP commands:

BACKUP AS BACKUPSET (DATAFILE 3, 4, 5, 6, 7) (DATAFILE 8, 9);
BACKUP AS BACKUPSET DATAFILE 3, 4, 5, 6, 7, 8, 9;
BACKUP AS BACKUPSET DATAFILE 3, ... 72;

In the first command, RMAN places datafiles 3, 4, 5, 6, and 7 into one backup set and datafiles 8 and 9 into another backup set. In the second command, RMAN places all datafiles into one backup set. In the third command, the ellipses indicate datafiles 3 through 72. Because in this case RMAN is backing up 70 datafiles, RMAN places 64 files in one backup set and 6 in another.

By default, RMAN divides files among backup sets 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 this number is the FILESPERSET value. Otherwise, FILESPERSET defaults to 64.

Note: You cannot specify the number of backup pieces that should be in a backup set.

FORCEForces RMAN to ignore backup optimization. That is, even if CONFIGURE BACKUP OPTIMIZATION is set to ON, RMAN backs up all specified files and undo data for active transactions.

Note: You can also specify this option in the backupSpecOperand clause.

AUXILIARY FORMATCopies the files on the target database to the specified location on the auxiliary instance. RMAN can only generate image copies when AUXILIARY FORMAT is specified. RMAN must be connected to both TARGET and AUXILIARY instances and have access to auxiliary channels.

You can use the BACKUP AUXILIARY FORMAT command to copy datafiles over the network between primary and standby databases. For example, if a datafile on a primary database was lost, you could CONNECT to the standby database as TARGET and the primary database as AUXILIARY, and copy an intact datafile from the standby host to the primary host.

   formatSpecSpecifies a pattern for naming the output image copies on an auxiliary instance. The path must be valid on the auxiliary host.

See Also: formatSpec for valid substitution variables

   NEWCreates an image copy in the directory specified in the DB_CREATE_FILE_DEST initialization parameter of the auxiliary instance. The image copy is an Oracle-managed file.
FORMAT formatSpecSpecifies a pattern for naming the output backup pieces or image copies (see Example 2-17). For AS COPY, if one or more of the directories mentioned in the specified format does not exist, then RMAN signals an error.

The default location for disk backups depends on whether a flash recovery area is enabled and whether FORMAT is specified:

  • If a flash recovery area is enabled, and if you do specify FORMAT, then RMAN names the output files according to the FORMAT setting. If no location is specified in FORMAT, then RMAN creates the backup in a platform-specific location‚ÄĒnot in the recovery area.

  • If a flash recovery area is enabled, and if you do not specify FORMAT, then RMAN creates the backup in the recovery area and uses the substitution variable %U to name the backup.

  • If a flash recovery area is not enabled, and if you do not specify FORMAT, then RMAN creates the backup in a platform-specific location and uses %U to name the backup.

To create RMAN backups in the flash recovery area with names in Oracle Managed Files format, do not specify the FORMAT clause on the BACKUP command or channel.

Note: You cannot specify an Oracle Managed Files filename as the format for a backup. For example, if +DISK1/datafile/system.732.609791431 is an OMF filename, then you cannot specify this filename in the FORMAT parameter.

Backup pieces must have unique names. The maximum length of a backup piece filename is platform-specific. For backups to 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 SBT 1.1 vendors may support longer filenames. Vendors supporting SBT 2.0 must support filenames up to 512 characters. Some SBT 2.0 vendors may support longer filenames.

You cannot specify multiple, identical FORMAT strings within a single backupSpec (for example, BACKUP DATAFILE 3 TO '/tmp/df3.f', DATAFILE 4 TO '/tmp/df4.f'). However, RMAN permits a single FORMAT string to exist in multiple backupSpec clauses.

Note: If you are making an archival backup with the KEEP option (see Example 2-26), then the format string must contain %U. The autobackup also uses this format string.

See Also: formatSpec for valid substitution variables

forRecoveryOfSpec
Identifies the backup being created as an incremental backup to be used in rolling forward an image copy.

See Also: forRecoveryOfSpec

FULLCreates 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. A full image copy backup can be incrementally updated, however, by applying incremental backups with the RECOVER command.

Note: Unused block compression, which is described in the entry for BACKUP AS BACKUPSET, causes some datafile blocks to be skipped during full backups.

INCREMENTAL LEVEL integerCopies only those data blocks that have changed since the last incremental integer backup, where integer is 0 or 1 (see Example 2-16).

See "Incremental Backups" for an explanation of incremental backups.

INCREMENTAL FROM SCN integerCreates an incremental backup of all specified datafiles that includes all datafile blocks changed at SCNs greater than or equal to the specified SCN.

One use of this option is to refresh a standby database with changes from the primary database (see Example 2-24, and the chapter on RMAN backups in Oracle Data Guard Concepts and Administration). This backup contains all changed blocks since the standby database was created or last synchronized. At the standby database, you can use RECOVER with NOREDO to apply the incremental backup. All changed blocks captured in the incremental backup are applied at the standby database, bringing it current with the primary database.

If you are not making incremental backups based on Volume Shadow Copy Service (VSS) snapshots, then you should specify formatSpec when you specify INCREMENTAL FROM SCN. The FORMAT string should include substitution variables such as %U because RMAN generates a control file backup.

If you specify FROM SCN with the NOKEEP option, and if you do not specify formatSpec when you specify INCREMENTAL FROM SCN, then RMAN creates incremental backups in the flash recovery area so that you can create incremental backups based on VSS snapshots in a Windows environment. In this way, you can use incremental backup sets and VSS shadow copies in conjunction. The checkpoint SCN value specified in the FROM SCN parameter should be same as the BACKUP_CHECKPOINT value in the VSS backup metadata document. If block change tracking is enabled, then the backups will use the change tracking mechanism, which significantly reduces the time taken to create incremental backups. RMAN can apply incremental backups from the flash recovery area during recovery transparently.

Note: You cannot use PLUS ARCHIVELOG when also specifying INCREMENTAL FROM SCN.

See Also: Oracle Database Platform Guide for Microsoft Windows to learn about making backups with VSS

keepOption
Overrides any configured retention policy for this backup so that the backup is not considered obsolete, as shown in Example 2-26.

You can use the KEEP syntax to generate archival database backups that satisfy business or legal requirements. The KEEP setting is an attribute of the backup set (not individual backup piece) or image copy.

Note: You cannot use KEEP with BACKUP BACKUPSET.

With the KEEP syntax, you can keep the backups so that they are considered obsolete after a specified time (KEEP UNTIL), or make them never obsolete (KEEP FOREVER). As shown in Example 2-27, you must be connected to a recovery catalog when you specify KEEP FOREVER.

Note: You can use CHANGE to alter the status of a backup generated with KEEP.

See Also: keepOption for more information about backups made with the KEEP option

MAXSETSIZE sizeSpecSpecifies a maximum size for a backup set (as shown in Example 2-17). RMAN limits all backup sets to this size.

It is possible for a backup set to span multiple tapes, so blocks from each datafile are written to multiple tapes. If one tape of a multivolume backup set fails, then you lose the data on all the tapes rather than just one. Because a backup set always include a whole file rather than part of a file, you can use MAXSETSIZE to specify that each backup set should fit on one tape.

Specify size in bytes (default), kilobytes (K), megabytes (M), or gigabytes (G). For example, 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 determined by FILESPERSET, which defaults to 64. When you specify MAXSETSIZE, 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 MAXSETSIZE.

Note: This option results in an error message if used with BACKUP AS COPY. If you run BACKUP AS COPY on a channel that has MAXSETSIZE set, then MAXSETSIZE is silently ignored.

notBackedUpSpec
Limits the set of archived redo log files to be backed up according to whether a specified number of backups are already present (and not obsolete), or whether the logs have been backed up since a specified date.

See Also: notBackedUpSpec

NOCHECKSUMSuppresses block checksums during the backup.

A checksum is a number that is computed from the contents of a data block. DB_BLOCK_CHECKSUM is a database initialization parameter that controls the writing of checksums for the blocks in datafiles in the database (not backups). If DB_BLOCK_CHECKSUM is typical, then the database computes a checksum for each block during normal operations and stores it in the block before writing it to disk. When the database reads the block from disk later, it recomputes the checksum and compares it to the stored value. If they do not match, then the block is damaged.

Note: You cannot disable checksums for datafiles in the SYSTEM tablespace even if DB_BLOCK_CHECKSUM=false.

By default, the BACKUP command computes a checksum for each block and stores it in the backup. The BACKUP command ignores the values of DB_BLOCK_CHECKSUM because this initialization parameter applies to datafiles in the database, not backups. If you specify the NOCHECKSUM option, then RMAN does not perform a checksum of the blocks when writing the backup.

When restoring a backup datafile, RMAN honors the DB_BLOCK_CHECKSUM initialization parameter setting. RMAN clears the checksum if DB_BLOCK_CHECKSUM is set to false. If set to typical, then RMAN verifies the checksum when restoring from the backup and writing to the datafile.

Note: You can turn off checksum checking by specifying NOCHECKSUM, but other physical consistency checks, such as checks of the block headers and footers, cannot be disabled.

See Also: Oracle Database Reference for more information about the DB_BLOCK_CHECKSUM initialization parameter

NOEXCLUDEWhen specified on a BACKUP DATABASE or BACKUP COPY OF DATABASE command, RMAN backs up all tablespaces, including any for which a CONFIGURE EXCLUDE command has been entered. This option does not override SKIP OFFLINE or SKIP READONLY.
POOL integerSpecifies the media pool in which the backup should be stored. Consult your media management documentation to see whether POOL is supported.

Note: This option does not work with AS COPY and results in an error.

PROXYBacks 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 manager‚ÄĒnot RMAġN‚ÄĒdecides how and when to move data.

When you run BACKUP with the PROXY option, RMAN performs these steps:

Searches for a channel of the specified device type that is proxy-capable. If no such channel is found, then RMAN issues a warning and attempts a a conventional (that is, non-proxy) backup of the specified files.

If RMAN locates a proxy-capable channel, then it calls the media manager to check if it can proxy copy the files. If the media manager cannot proxy copy, then RMAN uses conventional backup sets to back up the files.

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 does not work with AS COPY and results in an error.

   ONLYCauses the database to issue an error message when it cannot proxy copy rather than creating conventional backup sets. If you do not want RMAN to try a conventional copy when a proxy copy fails, use the ONLY option
REUSEEnables RMAN to overwrite an already existing backup or copy with the same filename as the file that BACKUP is currently creating.
SECTION SIZE sizeSpecSpecifies the size of each backup section produced during a datafile or datafile copy backup.

By setting this parameter, RMAN can create a multisection backup. In a multisection backup, RMAN creates a backup piece that contains one file section, which is a contiguous range of blocks in a file. All sections of a multisection backup are the same size.

File sections enable RMAN to create multiple steps for the backup of a single large datafile. RMAN channels can process each step independently and in parallel, with each channel producing one section of a multisection backup set.

If you specify a section size that is larger than the size of the file, then RMAN does not use multisection backup for the file. If you specify a small section size that would produce more than 256 sections, then RMAN increases the section size to a value that results in exactly 256 sections.

Note: Depending on where you specify this parameter in the RMAN syntax, you can specify different section sizes for different files in the same backup job.

Note: You cannot use SECTION SIZE in conjunction with MAXPIECESIZE.

skipSpec
Excludes datafiles or archived redo logs from the backup if they are inaccessible, offline, or read-only.

See Also: skipSpec for details.

TAG tag_nameSpecifies a user-specified tag name for a backup set, proxy copy, datafile copy, or control file copy. The tag is applied to the output files generated by the BACKUP command.

The tag name is not case-sensitive. The name must be 30 characters or less. The characters are limited to the characters that are valid in filenames on the target file system. For example, ASM does not support the use of the hyphen (-) character in the filenames it uses internally, so weekly-incremental is not a valid tag name for backups in ASM disk groups. Environment variables are not valid in the TAG parameter.

Typically, a tag name is a meaningful name such as MON_PM_BKUP or WEEKLY_FULL_BKUP. Tags are reusable, so that backup set 100 can have the tag MON_PM_BKUP one week while backup set 105 has the same tag the next week.

If you do not specify a tag name, then by default RMAN creates a tag for backups (except for control file autobackups). The default tag uses 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 might receive the tag TAG20070208T133437. 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.

You can also specify the tag at the backupSpec level. If you specify the tag at:

  • 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.

Note: A tag is an attribute of 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 backup piece 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.

VALIDATEScans the specified files and verifies their contents, testing whether this file can be backed up and whether the data blocks are corrupt.

RMAN creates no output files. This option is equivalent to using the VALIDATE command on the database files specified in the backup.

If you do not specify CHECK LOGICAL, then BACKUP VALIDATE checks for physical corruption only. If you specify CHECK LOGICAL, then BACKUP VALIDATE checks for both physical and logical corruption. RMAN populates the V$DATABASE_BLOCK_CORRUPTION view with any corruptions that it finds.

You can use the SET MAXCORRUPT command to set a limit for the number of corrupt blocks tolerated during the backup validation. The default is zero.

If you execute BACKUP INCREMENTAL with VALIDATE, then the behavior depends on whether block change tracking is enabled. If change tracking is enabled, then RMAN validates only changed blocks; otherwise, RMAN validates all blocks in the files included in the backup.

Note: You cannot validate backups of backup sets.


backupSpec

This subclause specifies a list of one or more objects to be backed up. Each backupSpec clause generates one or more backup sets (AS BACKUPSET) or image copies (AS COPY). For AS BACKUPSET, the backupSpec clause generates multiple backup sets if the number of datafiles specified in or implied by its list of objects exceeds the default limit of 4 datafiles or 16 archived logs in each backup set. Refer to backupSpec::= for the syntax diagram.

Syntax ElementDescription
archivelogRecordSpecifier
Specifies a range of archived redo logs to be backed up.

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.

RMAN does not signal an error if the command finds no logs to back up, since this situation probably exists because no new logs were generated after the previous BACKUP ARCHIVELOG ALL DELETE INPUT command. The only exception to this behavior is when the SEQUENCE number clause is specified. In this scenario, RMAN signals the RMAN-06004 error if an archived redo log file of the specified sequence is not found.

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 number‚ÄĒnot 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 for syntax, and Oracle Database Backup and Recovery User's Guide explanations of backup failover for logs and automatic log switching

BACKUPSETSpecifies a backup of backup sets. Use this parameter in conjunction with the DEVICE TYPE sbt clause to offload backups on disk to tape (as shown in Example 2-21). You cannot back up from tape to tape or from tape to disk: only from disk to disk or disk to tape.

If you specify the DELETE INPUT option on the BACKUP BACKUPSET command, then RMAN deletes all copies of the backup set that exist on disk. For example, if you duplexed a backup to 4 locations, then RMAN deletes all 4 backup sets. The ALL option does not add any functionality.

RMAN performs backup set failover when backing up backup sets. RMAN searches for all available backup copies when the copy that it is trying to back up is corrupted or missing. This behavior is similar to RMAN's behavior when backing up archived logs that exist in multiple archiving destinations.

If backup optimization is enabled when you back up a backup set, and if the identical backup set has already been backed up to the same device type, then RMAN skips the backup of this backup set.

Note: You can duplex backups of backup sets with BACKUP COPIES and SET BACKUP COPIES.

Note: When you use BACKUP BACKUPSET command with encrypted backup sets, the backup sets are backed up in their encrypted form. Because BACKUP BACKUPSET just copies an already-encrypted backup set to disk or tape, no decryption key is needed during a BACKUP BACKUPSET operation. The data is never decrypted during any part of the operation. The BACKUP BACKUPSET command can neither encrypt nor decrypt backup sets.

   ALLSpecifies all backup sets.
   completedTimeSpec
Identifies backup sets according to completion time.

See Also: completedTimeSpec

   integerSpecifies backup sets according to primary key. You can obtain the primary keys for backup sets from the output of the LIST BACKUP command.
CONTROLFILECOPYSpecifies one or more control file copies for backups.

A control file copy can be created with the BACKUP AS COPY CURRENT CONTROLFILE command or the SQL statement ALTER DATABASE BACKUP CONTROLFILE TO '...'.

Note: A control file autobackup is not a control file copy.

   'filename'Specifies a control file copy by filename.
   ALLSpecifies all control file copies.
   LIKE 'string_pattern'Specifies a control file copy by a filename pattern. The percent sign (%) as a wildcard meaning 0 o r more characters; an underscore (_) is a wildcard meaning 1 character.
copyOfSpec
Makes a backup of previous image copies of datafiles and possibly control files.

See Also: copyOfSpec

CURRENT CONTROLFILESpecifies the current control file.
DATABASECreates a backup of 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 CONFIGURE 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.

Full database backups should usually be either image copies or compressed backup sets. Image copies are more flexible than backup sets for some purposes (such as use in an incrementally updated backups strategy), and compressed backup sets make more efficient use of storage space, if the CPU overhead involved in creating them is tolerable.

Note: To force RMAN to include the current control file in the backup when CONTROLFILE AUTOBACKUP is ON, specify the INCLUDE CURRENT CONTROLFILE clause.

See Also: The TABLESPACE description to learn about backup behavior when the database includes bigfile tablespaces

datafileCopySpec
Specifies the filenames of one or more datafile image copies.

See Also: datafileCopySpec for details

DATAFILE datafileSpecSpecifies a list of one or more datafiles. Refer to description of BACKUP DATABASE for RMAN behavior when datafile 1 is backed up.

See Also: datafileSpec

RECOVERY AREABacks up recovery files created in the current and all previous flash recovery area destinations. The backup must go to SBT.

Recovery files are full and incremental backup sets, control file autobackups, datafile copies, and archived redo logs. If an archived redo log file is missing or corrupted, then RMAN looks outside of the recovery area for a good copy of the log that it can use for the backup. Flashback logs, the current control file, and online redo logs are not backed up.

By default, backup optimization is enabled for this command even if the CONFIGURE BACKUP OPTIMIZATION setting is OFF. You can disable backup optimization for BACKUP RECOVERY AREA by specifying FORCE.

Note: If the flash recovery area is not enabled but has been enabled in the past, then files created in the previous flash recovery area location are backed up.

DB_RECOVERY_FILE_DESTRECOVERY AREA and DB_RECOVERY_FILE_DEST are synonyms.
RECOVERY FILESBacks up all recovery files on disk, whether they are stored in the flash recovery area or other locations on disk. The backup must go to SBT.

Recovery files include full and incremental backup sets, control file autobackups, archived redo log files, and datafile copies.

By default, backup optimization is enabled for this command even if the CONFIGURE BACKUP OPTIMIZATION setting is OFF. You can disable backup optimization for RECOVERY FILES by specifying FORCE.

SPFILESpecifies that the server parameter file should be included in a backup set. The AS COPY option is not supported for server parameter file backups.

RMAN backs up the server parameter file currently in use by the target database. RMAN 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
Specifies the names of one or more tablespaces. RMAN translates tablespace names internally into a list of datafiles, then 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 also creates a copy of the control file.

You cannot back up locally-managed temporary tablespaces, although you can back up dictionary-managed tablespaces.

If the following conditions are met, then RMAN can back up transportable tablespaces that have not been made read/write after being transported:

  • The COMPATIBLE initialization parameter is set to 11.0.0 or higher.

  • You are using an Oracle Database 11g RMAN client.

If any of the preceding conditions is not met, then RMAN automatically skips transportable tablespaces that have not yet been made read/write. Note that if you specify a transportable tablespace explicitly when any of the conditions is not met, then RMAN issues an error saying that the tablespace does not exist.

Note: If you rename a tablespace, then RMAN detects that the tablespace has changed its name and updates the recovery catalog on the next resynchronization.

backupSpecOperand
The backupSpecOperand that follows a backupSpec specifies options that apply to the backupSpec.

backupSpecOperand

This subclause specifies a variety of options and parameters that affect the backupSpec clause. Many subclauses are also used with backupOperand. Options that are not shared in common with backupOperand are listed here. Refer to backupSpecOperand::= for the syntax diagram.

Syntax ElementDescription
DELETE [ALL] INPUTDeletes the input files after successfully backing them up.

Specify this option only when backing up archived redo logs, datafile copies (COPY OF or DATAFILECOPY), or backup sets. 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.

Specifying the DELETE INPUT option is equivalent to issuing the DELETE command for the input files. When backing up archived redo logs, RMAN uses the configured settings to determine whether an archived redo log can be deleted (CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP).

The ALL option applies only to archived redo 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 in the BACKUP command (as shown in Example 2-19). For example, if you specify the SEQUENCE n clause, then RMAN deletes all archived redo logs with same sequence number n.

Note: The database retains archived redo logs in the flash recovery as long as possible and deletes them automatically when additional disk space is required. You can use the BACKUP DELETE INPUT, DELETE ARCHIVELOG, and DELETE OBSOLETE commands to delete logs manually from locations inside or outside the recovery area. You do not need to specify BACKUP DELETE INPUT when backing up the recovery area because the database automatically deletes logs based on the archived log deletion policy and other flash recovery area rules.

FROM TAG tag_nameIdentifies files by tag name (see Example 2-18). Defined in context with several other commands.
INCLUDE CURRENT CONTROLFILECreates a snapshot of the current control file and places it into one of backup sets produced by the BACKUP command.

Note: This option does not apply with AS COPY and results in an error message.


backupTypeSpec

This subclause specifies the form of the BACKUP command output: backup set or image copy. Refer to backupTypeSpec::= for the syntax diagram.

Syntax ElementDescription
AS BACKUPSETCreates backup sets on the specified device. This is the default backup type.

AS BACKUPSET is the only possibility when backing up to tape, and for creating level 1 incremental backups to any destination. Backup sets are RMAN-specific logical structures. The backup set is the smallest unit of a backup.

The FILESPERSET parameter of the BACKUP command determines the maximum number of files in each backup set. Archived logs and datafiles are never combined into a single backup set.

When using encrypted backups (see "Encryption of Backup Sets"), datafiles from tablespaces with different encryption settings are never written into the same backup set.

RMAN cannot back up files with different block sizes into the same backup set. RMAN can back up tablespaces with different block sizes, but puts each differently sized datafile into its own backup set.

RMAN backup sets automatically use unused block compression. Skipping unused data blocks where possible enables RMAN to back up datafiles using less space, and can make I/O more efficient. When backing up datafiles into backup sets, RMAN does not include data blocks that have never been allocated. RMAN also skips datafile blocks that do not currently contain data, but only if all of the following conditions apply:

  • The COMPATIBLE initialization parameter is set to 10.2 or higher.

    Note that if COMPATIBLE is 10.2, then only tablespaces created with 10.2 compatibility will be optimized to exclude blocks that do not currently contain data. If COMPATIBLE is 11.0.0 or higher, however, then the first backup that produces backup sets after COMPATIBLE is set to 11.0.0 or higher will update the headers of all locally managed datafiles so that all locally managed datafiles can be optimized.

  • There are currently no guaranteed restore points defined for the database.

  • The datafile is locally managed.

  • 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 created on disk or Oracle Secure Backup is the media manager. Thus, when backing up to a media manager other than Oracle Secure Backup, RMAN does not skip datafile blocks that do not currently contain data.

Note: If RMAN does not read a block because of unused block compression, and if the block is corrupt, then RMAN does not detect the corruption. A corrupt unused block is not harmful.

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 in which the entire data transfer is conducted by a media manager.

RMAN only records complete backup sets in the RMAN repository. There are no partial backup sets. When a BACKUP command creates backup pieces but does not produce a complete backup set, the backup pieces are discarded.

Note: You cannot stripe a single backup set across multiple channels. You also cannot stripe a single input file across multiple backup sets.

See Also: Oracle Secure Backup Administrator's Guide to learn how to use Oracle Secure Backup with RMAN

   COMPRESSEDEnables binary compression.

RMAN compresses the data written into the backup set 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.

RMAN applies a binary compression algorithm as it writes data to backup sets. This compression is similar to the compression provided by many media manager vendors. When backing up to a locally attached tape device, compression provided by the media management vendor is usually preferable to the binary compression provided by BACKUP AS COMPRESSED BACKUPSET. Therefore, use uncompressed backup sets and turn on the compression provided by the media management vendor when backing up to locally attached tape devices. You should not use RMAN binary compression and media manager compression together.

Some CPU overhead is associated with compressing backup sets. If the target database is running at or near its maximum load, then you may find the overhead unacceptable. In most other circumstances, compressing backup sets saves enough disk space to be worth the CPU overhead.

AS COPYCreates image copies (rather than backup sets).

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.When using incrementally updated backups, the level 0 incremental must be an image copy backup.

By default, BACKUP generates backup sets. You can change the default backup type for disk backups to image copies using the CONFIGURE DEVICE TYPE ... BACKUP TYPE TO COPY command.

RMAN chooses a location for the copy according to the following rules, listed in order of precedence:

FORMAT specified on BACKUP command for the object being backed up

FORMAT specified for the BACKUP command

fileNameConversionSpec setting for BACKUP command

CONFIGURE CHANNEL integer ... FORMAT

CONFIGURE CHANNEL DEVICE TYPE ... FORMAT

Platform-specific default FORMAT (which includes a %U for generating a unique filename)

You can create and restore image copy backups with RMAN or use a native operating system command for copying files. When you use RMAN, copies are recorded in the RMAN repository and are more easily available for use in restore and recovery. Otherwise, you must use the CATALOG command to add the user-managed copies to the RMAN repository so that RMAN can use them.

You cannot make a copy of a backup set, although you can make an image copy of an image copy. To back up a backup set, use BACKUP BACKUPSET.


copyOfSpec

This subclause specifies the form of the BACKUP command output: backup set or image copy. Refer to copyOfSpec::= for the syntax diagram.

Syntax ElementDescription
COPY OF DATABASEMakes 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, 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 DATAFILE datafileSpecMakes 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

COPY OF TABLESPACE tablespace_nameMakes a backup of previous image copies of the datafiles in one or more specified tablespaces. All datafiles that would normally be included by BACKUP TABLESPACE should 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.

Specify the tablespaces in the list by tablespace name (for example, users) or specify a particular copy by tag name (for example, 0403_CPY_OF_USERS). If you do not specify TAG, then RMAN backs up the most recent datafile copy for each datafile in the tablespace.

Note: The output of this command can be image copies or backup sets.


datafileCopySpec

This subclause specifies datafile copies. Refer to datafileCopySpec::= for the syntax diagram.

Syntax ElementDescription
'filename'Specifies the filenames of one or more datafile image copies.
ALLSpecifies that all datafile image copies should be backed up.
LIKE 'string_pattern'Specifies a filename pattern. The percent sign (%) is a wildcard that means zero or more characters; an underscore (_) is a wildcard that means one character.
FROM TAG tag_nameSpecifies a list of one or more datafile copies, identified by the tag name. If multiple datafile copies with this tag exist, then RMAN backs up only the most current datafile copy of any particular datafile. Tags are not case sensitive.
   NODUPLICATESPrevents the inclusion of identical datafile copies in a backup operation (Example 2-29). For each set of duplicate datafile copies, the file with the most recent timestamp will be selected.

duration

This subclause specifies datafile copies. Refer to duration::= for the syntax diagram.

Syntax ElementDescription
DURATION hh:mmSpecifies a maximum time for a backup command to run. If a backup command does not complete in the specified duration, then the backup stops.

Without the PARTIAL option, the backup command is considered to have failed if it does not complete in the specified duration, and RMAN reports an error. If the backup command is part of a RUN block, then subsequent commands in the RUN block do not execute.


   MINIMIZE
¬†¬†¬†{LOAD¬†‚Ēā¬†TIME}
With disk backups, you can use MINIMIZE TIME run the backup at maximum speed (default), or MINIMIZE LOAD to slow the rate of backup to lessen the load on the system. With MINIMIZE LOAD the backup will take the full specified duration.

If you specify TIME, then file most recently backed up is given the lowest priority to back up. This scheduling mechanism provides for the eventual complete backup of the database during successive backup windows, as different datafiles are backed up in round-robin fashion.

   PARTIALWith the PARTIAL option, the command is considered to have completed successfully and no error is reported by RMAN even if the whole backup is not completed in the specified duration.

Without the PARTIAL option, the backup command is considered to have failed if it does not complete in the specified duration, and RMAN reports an error. If the backup command is part of a RUN block, then subsequent commands in the RUN block do not execute.

Whether PARTIAL is used or not, all backup sets completed before the backup is interrupted are retained and can be used in RESTORE and RECOVER operations.


forRecoveryOfSpec

This subclause specifies that a backup should be used in an incrementally updated backup strategy. You must specify INCREMENTAL LEVEL 1 when specifying FOR RECOVER OF. Refer to forRecoveryOfSpec::= for the syntax diagram.

Syntax ElementDescription
FOR RECOVER OF COPYSpecifies that this incremental backup should contain all changes since the SCN of a specified datafile copy (level 0 incremental backup) of the target database (see Example 2-20).

A BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY command can create backup sets or image copies. RMAN creates backup sets if an incremental level 0 image copy already exists, but otherwise creates image copies.

The datafile copies should be identified with either a DATAFILE COPY or WITH TAG clause, to separate the incremental backup strategy for which this backup will be used from the rest of your backup strategies. Otherwise, the most recent copy of each datafile will be used as the basis for the incremental backup.

See Also: Oracle Database Backup and Recovery User's Guide to learn how to make incrementally updated backups

   WITH TAG tag_nameSpecifies the tag of the level 0 incremental backup serving as the basis of the incremental backup.

If no level 0 backup with the tag specified in the WITH TAG parameter is found in either the current or parent database incarnation, then FOR RECOVER OF COPY option creates a level 0 datafile copy tagged with the value specified in the WITH TAG parameter.

By using the BACKUP INCREMENTAL ... FOR RECOVER OF COPY WITH TAG syntax, you can create level 1 incremental backups suitable for rolling forward a level 0 incremental image copy backup of your database. You can then use RECOVER COPY OF ... WITH TAG to perform incremental updates of a backup. This technique is used in the Enterprise Manager strategy for backups to disk.


   DATAFILECOPY
   FORMAT formatSpec
Specifies a pattern for naming the output image copies.

FOR RECOVER OF TAG
tag_name
Backs up the archived redo log files or incremental backups that are intended to recover the level 0 incremental backup specified by tag_name.

For example, the BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF TAG wholedb ARCHIVELOG ALL command backs up all archived redo log files needed to recover the level 0 incremental backup tagged wholedb.


notBackedUpSpec

This subclause specifies that RMAN should only back up files that have not yet been backed up. Refer to notBackedUpSpec::= for the syntax diagram.

Syntax ElementDescription
NOT¬†BACKED¬†UPBacks up only those files‚ÄĒof the files specified on the BACKUP command‚ÄĒthat RMAN has never backed up (see Example 2-28).

This subclause is a convenient way to back up new datafiles after adding them to the database. Note that RMAN does not examine datafile checkpoints, but backs up any datafile that is not already backed up. You can also specify NOT BACKED UP when backing up backup sets.

Using BACKUP with this clause does manually what an archived redo log deletion policy can do automatically. If you specify the CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP integer TIMES command, then a BACKUP ARCHIVELOG ALL command copies all logs unless integer backups already exist on the specified device type. If integer backups of the logs exist, then the BACKUP command skips the logs. In this way, the archived log deletion policy functions as a default NOT BACKED UP integer TIMES clause on the BACKUP command.

Note: This clause overrides backup optimization (CONFIGURE BACKUP OPTIMIZATION) and archived log deletion policies (CONFIGURE ARCHIVELOG DELETION POLICY).

   integer TIMESBacks up only those archived redo log files that have not been backed up at least integer times.

Note: You can only specify NOT BACKED UP integer TIMES when backing up archived redo log files into backup sets.

To determine 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 archived logs on a specified media. For example, you want to keep at least three copies of each log on tape.


   SINCE TIME
    'date_string'
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 datafiles 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 specified, 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.


sizeSpec

This subclause specifies the size of data. Refer to sizeSpec::= for the syntax diagram.

Syntax ElementDescription
integer¬†[G¬†‚Ēā¬†K¬†‚Ēā¬†M]Specifies the size of data in gigabytes (G), kilobytes (K), or megabytes (M).

skipSpec

This subclause specifies which files to skip. Refer to skipSpec::= for the syntax diagram.

Syntax ElementDescription
SKIPExcludes 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.

   INACCESSIBLESpecifies 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.

   OFFLINESpecifies that offline datafiles should be excluded from the backup.
   READONLYSpecifies that read-only datafiles should be excluded from the backup.

Examples

Example 2-15 Backing Up a Database

This example starts the RMAN client from the operating system command line and then connects to a target database using operating system authentication. The BACKUP command backs up all datafiles, the current control file, the server parameter file, and archived redo log files to the default storage device:

% rman
RMAN> CONNECT TARGET /
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Example 2-16 Performing a Cumulative Incremental Backup

This example backs up all blocks changed in the database since the most recent level 0 incremental backup. If no level 0 backup exists when you run a level 1 backup, then RMAN makes a level 0 backup automatically. Any inaccessible files are skipped.

BACKUP 
  INCREMENTAL LEVEL 1 CUMULATIVE
  SKIP INACCESSIBLE 
  DATABASE;

Example 2-17 Distributing a Backup Across Multiple Disks

This example backs up tablespaces to two different disks and lets RMAN perform automatic parallelization of the backup. The %U in the FORMAT string is a substitution variable that generates a unique filename for each output image copy.

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;
}

Example 2-18 Identifying Datafile Copies by Tag

In this example, you back up datafile image copies to tape. The BACKUP command locates all datafile copies with the tag LATESTCOPY, backs them up to tape, and names the backups by means of substitution variables. The variable %f specifies the absolute file number, whereas %d specifies the name of the database. After the datafile copies are on tape, the example deletes all image copies with the tag LATESTCOPY.

BACKUP 
  DEVICE TYPE sbt
  DATAFILECOPY 
    FROM TAG 'LATESTCOPY'
  FORMAT 'Datafile%f_Database%d';
DELETE COPY TAG 'LATESTCOPY';

Example 2-19 Backing Up and Deleting Archived Redo Logs

This example assumes that you have two archiving destinations set: /disk2/PROD/archivelog/ and /disk1/arch/. The command backs up one archived redo log for each unique sequence number. For example, if archived redo log 1000 is in both directories, then RMAN only backs up one copy this log. The DELETE INPUT clause with the ALL keyword specifies that RMAN should delete all archived redo log files from both archiving directories after the backup.

BACKUP DEVICE TYPE sbt
  ARCHIVELOG LIKE '/disk%arc%'
  DELETE ALL INPUT;

Sample output for the preceding command appears as follows:

Starting backup at 12-MAR-07
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=150 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup
channel ORA_SBT_TAPE_1: starting archived log backup set
channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=4 RECID=4 STAMP=616789551
input archived log thread=1 sequence=5 RECID=5 STAMP=616789551
input archived log thread=1 sequence=6 RECID=6 STAMP=616789554
input archived log thread=1 sequence=7 RECID=7 STAMP=616789731
input archived log thread=1 sequence=8 RECID=8 STAMP=616789825
input archived log thread=1 sequence=9 RECID=10 STAMP=616789901
input archived log thread=1 sequence=10 RECID=12 STAMP=616789985
channel ORA_SBT_TAPE_1: starting piece 1 at 12-MAR-07
channel ORA_SBT_TAPE_1: finished piece 1 at 12-MAR-07
piece handle=0vice0g7_1_1 tag=TAG20070312T105917 comment=API Version 2.0,MMS Version 10.1.0.3
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
channel ORA_SBT_TAPE_1: deleting archived log(s)
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_4_2z45sgrc_.arc RECID=4 STAMP=616789551
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_5_2z45sgrc_.arc RECID=5 STAMP=616789551
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_6_2z45sl3g_.arc RECID=6 STAMP=616789554
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_7_2z45z2kt_.arc RECID=7 STAMP=616789731
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_8_2z4620sk_.arc RECID=8 STAMP=616789825
archived log file name=/disk1/arch/archiver_1_8_616789153.arc RECID=9 STAMP=616789825
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_9_2z464dhk_.arc RECID=10 STAMP=616789901
archived log file name=/disk1/arch/archiver_1_9_616789153.arc RECID=11 STAMP=616789901
archived log file name=/disk2/PROD/archivelog/2007_03_09/o1_mf_1_10_2z4670gr_.arc RECID=12 STAMP=616789985
archived log file name=/disk1/arch/archiver_1_10_616789153.arc RECID=13 STAMP=616789985
Finished backup at 12-MAR-07
 
Starting Control File and SPFILE Autobackup at 12-MAR-07
piece handle=c-28643857-20070312-02 comment=API Version 2.0,MMS Version 10.1.0.3
Finished Control File and SPFILE Autobackup at 12-MAR-07

Example 2-20 Scripting Incrementally Updated Backups

By incrementally updating backups, you can avoid the overhead of making full image copy backups of datafiles, while also minimizing time required for media recovery of your database. For example, if you run a daily backup script, then you never have more than one day of redo to apply for media recovery.

Assume you run the following script daily. On first execution, the script creates an image copy backup of the database on disk with the specified tag. On second execution, the script creates a level 1 backup of the database. On every subsequent execution, RMAN applies the level 1 incremental to the datafile copy and then makes a new level 1 backup.

RUN
{
  RECOVER COPY OF DATABASE 
    WITH TAG 'incr_update';
  BACKUP
    INCREMENTAL LEVEL 1
    FOR RECOVER OF COPY WITH TAG 'incr_update'
    DATABASE;
}

Example 2-21 Backing Up Disk-Based Backup Sets to Tape

Assume your goal is to keep recent backup sets on disk and older backup sets on tape. Also, you want to avoid keeping copies of the same backup set on disk and tape simultaneously. This example backs up backup sets created more than two weeks ago to tape and then deletes the backup pieces from disk.

BACKUP
  DEVICE TYPE sbt 
  BACKUPSET
    COMPLETED BEFORE 'SYSDATE-14' 
  DELETE INPUT;

Example 2-22 Duplexing a Database Backup

This example uses the COPIES parameter to create two compressed backups of the database, with each backup on a separate disk. The output locations are specified in the FORMAT parameter.

BACKUP AS COMPRESSED BACKUPSET
  DEVICE TYPE DISK 
  COPIES 2
  DATABASE
  FORMAT '/disk1/db_%U', '/disk2/db_%U';

Example 2-23 Specifying How Channels Divide Workload

This example explicitly parallelizes a backup by using the CHANNEL parameter to specify which channels should back up which files and to which locations.

RUN
{
  ALLOCATE CHANNEL ch1 DEVICE TYPE sbt
    PARMS 'ENV=(OB_DEVICE_1=stape1)';
  ALLOCATE CHANNEL ch2 DEVICE TYPE sbt
    PARMS 'ENV=(OB_DEVICE_1=stape2)';
  BACKUP 
    (DATABASE        # ch1 backs up database to tape drive stape1
      CHANNEL ch1)
    (ARCHIVELOG ALL
      CHANNEL ch2);  # ch2 backs up archived redo logs to tape drive stape2
}

Example 2-24 Creating an Incremental Backup for Refresh of a Standby Database

In this example, your goal is make an incremental backup of the primary database and use it to update an associated standby database. You start the RMAN client, CONNECT to the primary database as TARGET, and then connect to the recovery catalog. The BACKUP command creates an incremental backup of the primary database that can be applied at a standby database to update it with changes since the specified SCN.

RMAN> CONNECT TARGET /

connected to target database: PROD (DBID=39525561)

RMAN> CONNECT CATALOG rman@catdb

recovery catalog database Password: password
connected to recovery catalog database

RMAN> BACKUP DEVICE TYPE DISK
2> INCREMENTAL FROM SCN 404128 DATABASE
3>  FORMAT '/disk1/incr_standby_%U';

Example 2-25 Specifying Corruption Tolerance for Datafile Backups

This example assumes a database that contains 5 datafiles. It uses the SET MAXCORRUPT command to indicate than no more than 1 corruption should be tolerated in each datafile. Because the CHECK LOGICAL option is specified on the BACKUP command, RMAN checks for both physical and logical corruption.

RUN
{
  SET MAXCORRUPT FOR DATAFILE 1,2,3,4,5 TO 1;
  BACKUP CHECK LOGICAL
    DATABASE;
}

Example 2-26 Creating a Consistent Database Backup for Archival Purposes

This example uses a keepOption to create an archival backup set that cannot be considered obsolete for one year. The example backs up the database, archives the redo in the current online logs to ensure that this new backup is consistent, and backs up only those archived logs needed to restore the datafile backup to a consistent state.

The BACKUP command also creates a restore point to match the SCN at which this backup will be consistent. Note that the FORMAT parameter must be capable of creating multiple backup pieces in multiple backup sets.

BACKUP DATABASE
  FORMAT '/disk1/archival_backups/db_%U.bck' 
  TAG quarterly
  KEEP UNTIL TIME 'SYSDATE + 365'
  RESTORE POINT Q1FY06;

Example 2-27 Exempting Copies from the Retention Policy

The following example copies two datafiles and exempts them from the retention policy forever. (Note that KEEP FOREVER requires a recovery catalog.) The control file and server parameter file will also be backed up, even with autobackup off.

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP
  KEEP FOREVER
  FORMAT '?/dbs/%U_longterm.cpy'
  TAG LONGTERM_BCK
  DATAFILE 1 DATAFILE 2;
ALTER DATABASE OPEN;

Example 2-28 Backing Up Files That Need Backups

Assume that you back up the database and archived logs every night to tape by running the following command.

BACKUP
  MAXSETSIZE 500M
  DATABASE PLUS ARCHIVELOG;

The preceding command sets an upper limit to the size of each backup set so that RMAN produces multiple backup sets. Assume that the media management device fails halfway through the backup and is then restarted. The next day you discover that only half the backup sets completed. In this case, you can run the following command in the evening:

BACKUP 
  NOT BACKED UP SINCE TIME 'SYSDATE-1'
  MAXSETSIZE 500M
  DATABASE PLUS ARCHIVELOG;

With the preceding command, RMAN backs up only files not backed up during in the previous 24 hours. When RMAN determines that a backup from the specified time window is available, it displays output like the following:

skipping datafile 1; already backed up on 18-JAN-07
skipping datafile 2; already backed up on 18-JAN-07
skipping datafile 3; already backed up on 18-JAN-07

If you place the NOT BACKED UP SINCE clause immediately after the BACKUP command, then it affects all objects to be backed up. You can also place it after individual backupSpec clauses to cause only backups for those objects described by the backupSpec to be subject to the limitation.

Example 2-29 Using NODUPLICATES To Back Up Datafile Copies

This example creates a datafile copy of datafile 2 named /disk2/df2.cpy. The example then backs up this datafile copy to the /disk1 and /disk3 directories. The NODUPLICATES option on the final BACKUP command indicates that only one copy of datafile 2 should be backed up.

BACKUP AS COPY
  DATAFILE 2
  FORMAT '/disk2/df2.cpy' TAG my_tag;
BACKUP AS COPY
  DATAFILECOPY '/disk2/df2.cpy' 
  FORMAT '/disk1/df2.cpy';
BACKUP AS COPY
  DATAFILECOPY '/disk1/df2.cpy' 
  FORMAT '/disk3/df2.cpy';
BACKUP
  DEVICE TYPE sbt
  DATAFILECOPY ALL NODUPLICATES; # backs up only copy of datafile 2
PKx#SřHŇHPKHiUIOEBPS/rcviews010.htmŘ*$’ RC_BACKUP_CORRUPTION

RC_BACKUP_CORRUPTION

This view lists corrupt block ranges in datafile backups, which may be detected when BACKUP VALIDATE is used or the MAXCORRUPT parameter is greater than 0. 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.

ColumnDatatypeDescription
DB_KEYNUMBERThe primary key for this database in the recovery catalog. Use this column to join with almost any other catalog view.
DBINC_KEYNUMBERThe primary key for the incarnation of the target database. Use this column to join with RC_DATABASE_INCARNATION.
DB_NAMEVARCHAR2(8)The DB_NAME of the database incarnation to which this record belongs.
RECIDNUMBERThe record identifier from V$BACKUP_CORRUPTION. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
STAMPNUMBERThe stamp propagated from V$BACKUP_CORRUPTION. RECID and STAMP form a concatenated primary key that uniquely identifies this record in the target database control file.
BS_KEYNUMBERThe primary key of the backup set to which this record belongs in the recovery catalog. Use this column to join with RC_BACKUP_SET or RC_BACKUP_PIECE.
SET_STAMPNUMBERThe SET_STAMP value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
SET_COUNTNUMBERThe SET_COUNT value from V$BACKUP_SET. SET_STAMP and SET_COUNT form a concatenated key that uniquely identifies the backup set to which this record belongs in the target database control file.
PIECE#NUMBERThe backup piece that contains this corrupt block.
BDF_KEYNUMBERThe 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 RMAN is connected to the recovery catalog, then this value appears in the KEY column of the output.
BDF_RECIDNUMBERThe RECID value from V$BACKUP_DATAFILE.
BDF_STAMPNUMBERThe STAMP value from V$BACKUP_DATAFILE.
FILE#NUMBERThe absolute file number for the datafile that contains the corrupt blocks.
CREATION_CHANGE#NUMBERThe creation SCN of the datafile containing the corrupt blocks.
BLOCK#NUMBERThe block number of the first corrupted block in this range of corrupted blocks.
BLOCKSNUMBERThe number of corrupted blocks found beginning with BLOCK#.
CORRUPTION_CHANGE#NUMBERFor 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_CORRUPTVARCHAR2(3)YES if this corruption was not previously detected by Oracle, or NO if Oracle had already discovered this corrupt block and marked it as corrupt in the database. Note that when a corrupt block is encountered in a backup, and was not already marked corrupt by Oracle, then the backup process does not mark the block as corrupt in the production datafile. Thus, this field may be YES for the same block in more than one backup set.
CORRUPTION_TYPEVARCHAR2(9)Same as RC_DATABASE_BLOCK_CORRUPTION.CORRUPTION_TYPE.

PK:0ĢRŗ*Ř*PKHiUIOEBPS/rcmsubcl018.htm¬=„ untilClause

untilClause

Purpose

Use the