Oracle RMAN 11g Backup and Recovery (175 page)

BOOK: Oracle RMAN 11g Backup and Recovery
6.34Mb size Format: txt, pdf, ePub

Syntax Diagram

AUXILIARY



ALLOCATE

CHANNEL

channel_id

allocOperandList

DEVICE TYPE deviceSpecifier

;

Chapter References

Several chapters reference the
allocate channel
command. Chapter 3 discusses automatic channel configuration, which eliminates the need for
allocate channel
most of the time. Chapters 11, 12, and 14 in particular provide direction on the use of the
allocate channel
command.

Examples

allocate channel c1 device type disk format '/u01/orabackup/robprod/robprod %U'; allocate channel t1 DEVICE TYPE 'SBT TAPE' PARMS

'ENV (TDPO OPTFILE /opt/oraback/rman/delta ${ORACLE SID}.opt)'

RATE 1 G FORMAT '${ORACLE SID} %U' MAXPIECESIZE 20 G MAXOPENFILES 64;

allocate channel for maintenance Command

The
allocate channel for maintenance
command is used to allocate a channel in preparation for issuing maintenance commands such as
change
,
crosscheck
, or
delete
. If you have automated channels configured, you should not need to use this command.

Syntax Diagram

ALLOCATE CHANNEL FOR MAINTENANCE

allocOperandList

DEVICE TYPE

deviceSpecifier

;

Chapter Reference

We do not cover the
allocate channel for maintenance
command in this book, since we expect you are using automated channel allocation. Automated channel allocation is recommended by Oracle.

Example

allocate channel for maintenance device type sbt;

566
Part V: Appendixes

alter database Command

The
alter database
command allows you to mount or open the target database that RMAN is connected to.

Syntax Diagram

MOUNT

ALTER DATABASE

;

RESETLOGS

OPEN

Chapter References

The
alter database
command is demonstrated in Chapters 11, 12, and 14.

Example

alter database open resetlogs;

backup Command

The
backup
command allows you to back up the database. The
backup
command supports online and offline backups and also supports backups of database files, copies of database files, archived logs, and backup sets.

Syntax Diagram

backupOperand

BACKUP

backupSpec

backupSpecOperand

PLUS ARCHIVELOG

;

Appendix A: RMAN Syntax Reference Guide
567

backupOperand Parameter Syntax Diagram

backupTypeSpec



CHANNEL

channel_id

CHECK LOGICAL

COPIES

integer

CUMULATIVE

DEVICE TYPE

deviceSpecifier

DISKRATIO

integer

duration

fileNameConversionSpec

FILESPERSET

integer

FORCE

,

formatSpec

AUXILIARY FORMAT

NEW

,

FORMAT

formatSpec

,

TO DESTINATION

toDestSpec

forRecoveryOfSpec

FULL

LEVEL

INCREMENTAL

integer

FROM SCN

keepOption

MAXSETSIZE

sizeSpec

notBackedUpSpec

NOCHECKSUM

NOEXCLUDE

POOL

integer

ONLY

PROXY

REUSE

SECTION SIZE

sizeSpec

skipSpec



TAG

tag_name

VALIDATE

568
Part V: Appendixes

backupSpec Parameter Syntax Diagram

archivelogRecordSpecifier

ALL

completedTimeSpec

,



BACKUPSET

FROM TAG

tag_name

,

primaryKey


filename


CONTROLFILECOPY

ALL

LIKE


string_pattern


(

copyOfSpec

backupSpecOperand

)

CURRENT CONTROLFILE

DATABASE

datafileCopySpec

,

DATAFILE

datafileSpec

RECOVERY AREA

DB_RECOVERY_FILE_DEST

RECOVERY FILES

SPFILE

,



TABLESPACE

tablespace_name

Appendix A: RMAN Syntax Reference Guide
569

backupSpecOperand Parameter Syntax Diagram



CHANNEL

channel_id

ALL

DELETE

INPUT

DISKRATIO

integer

FILESPERSET

integer

FORCE

,

formatSpec

AUXILIARY FORMAT

NEW

,

FORMAT

formatSpec

,

TO DESTINATION

toDestSpec



FROM TAG

tag_name

INCLUDE CURRENT CONTROLFILE

keepOption

MAXSETSIZE

sizeSpec

notBackedUpSpec

NOEXCLUDE

POOL

integer

REUSE

SECTION SIZE

sizeSpec

skipSpec



TAG

tag_name

570
Part V: Appendixes

backupTypeSpec Parameter Syntax Diagram

COMPRESSED

BACKUPSET

AS

COPY

copyOfSpec Parameter Syntax Diagram

DATABASE

,

DATAFILE

datafileSpec

COPY OF

,



TABLESPACE

tablespace_name

datafileCopySpec Parameter Syntax Diagram

,


filename


ALL

DATAFILECOPY

LIKE


string_pattern


NODUPLICATES

,



FROM TAG

tag_name

duration Parameter Syntax Diagram

LOAD

MINIMIZE

TIME

PARTIAL

DURATION integer

:

integer

Appendix A: RMAN Syntax Reference Guide
571

forRecoverOfSpec Parameter Syntax Diagram

DATAFILECOPY FORMAT formatSpec



WITH TAG

tag_name

COPY

FOR RECOVER OF



TAG

tag_name

notBackedUpSpec Parameter Syntax Diagram

integer

TIMES

SINCE TIME


date_string


NOT BACKED UP

sizeSpec Parameter Syntax Diagram

G

K

M

integer

skipSpec Parameter Syntax Diagram

INACCESSIBLE

SKIP

OFFLINE

READONLY

Chapter Reference

The
backup
command is covered in detail in Chapter 11.

Examples

backup database plus archivelog delete input;

backup tablespace users, system;

backup as copy datafile 1,2,3;

backup incremental level 0 check logical database plus archivelog;

572
Part V: Appendixes

catalog Command

The
catalog
command allows you to do the following:

■ Add metadata about backup pieces and image copies to the database control file and recovery catalog

■ Catalog valid backup sets, datafile copies, and archived redo logs in the flash recovery area (FRA)

■ Catalog valid backups in ASM, OMF, and user-defined disk locations

■ Record a datafile copy as a level 0 backup in the RMAN repository, so you can use that backup as the source of an incremental backup

Syntax Diagram

ARCHIVELOG

,

BACKUPPIECE

’ filename


CONTROLFILECOPY

LEVEL

integer

CATALOG

,



;

TAG

tag_name

DATAFILECOPY

’ filename


RECOVERY AREA

NOPROMPT

DB_RECOVERY_FILE_DEST

START WITH


string_pattern


Chapter Reference

Chapter 16 provides more information on the
catalog
command.

Examples

catalog recovery area noprompt;

catalog datafilecopy 'd:\oracle\oraback\system01.bak'

'd:\oracle\oraback\users01.bak' level 0;

Appendix A: RMAN Syntax Reference Guide
573

change Command

The
change
command is used to mark backup pieces, image copies, and archived redo logs with a status of AVAILABLE if they currently have a status of UNAVAILABLE. Additionally, this command can totally remove a backup or copy from a repository, and can also be used to modify the retention policy that is effective for a given backup or copy.

Syntax Diagram

AVAILABLE

,

keepOption

forDbUniqueNameOption

DEVICE TYPE

deviceSpecifier

maintSpec

resetDbUniqueNameOption

UNAVAILABLE

UNCATALOG

CHANGE

;

changeFailure





DB_UNIQUE_NAME FROM

db_unique_name

TO

db_unique_name

maintSpec Parameter Syntax Diagram

OF

listObjList

BACKUP

maintQualifier

archivelogRecordSpecifier

OF

listObjList

COPY

foreignlogRecordSpecifier

,

DEVICE TYPE

deviceSpecifier

recordSpec

forDbUniqueNameOption Parameter Syntax Diagram

DB_UNIQUE_NAME ALL

FOR



DB_UNIQUE_NAME

db_unique_name

574
Part V: Appendixes

resetDbUniqueNameOption Parameter Syntax Diagram

Other books

Undead and Unwelcome by MaryJanice Davidson
A Dangerous Fiction by Barbara Rogan
Four Summers by Nyrae Dawn
Freeman by Leonard Pitts Jr.