Oracle RMAN 11g Backup and Recovery (180 page)

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

Syntax Diagram

(

restoreSpecOperand

)

RESTORE

restoreObject



CHANNEL

channel_id

CHECK LOGICAL

,

DEVICE TYPE

deviceSpecifier

FORCE

BACKUPSET

FROM

DATAFILECOPY



FROM TAG

tag_name

RECALL

SUMMARY

PREVIEW

SKIP READONLY

TO RESTORE POINT

restore_point_name

untilClause

HEADER

VALIDATE

;

598
Part V: Appendixes

restoreObject Parameter Syntax Diagram

archivelogRecordSpecifier

TO


filename


CONTROLFILE

,

FOREVER



SKIP

TABLESPACE

tablespace_name

DATABASE

,

DATAFILE

datafileSpec

TO


filename


PRIMARY CONTROLFILE

PFILE



TO


filename


FOR DB_UNIQUE_NAME

db_unique_name

SPFILE

TO


filename


STANDBY CONTROLFILE

,



TABLESPACE

tablespace_name

restoreSpecOperand Parameter Syntax Diagram



CHANNEL

channel_id

autoBackupOptList

AUTOBACKUP

FROM


media_handle




FROM TAG

tag_name

autoBackupOptList Parameter Syntax Diagram



DB_NAME

database_name

MAXDAYS

integer

MAXSEQ



DB_NAME

database_name

RECOVERY AREA

quoted_string



DB_RECOVERY_FILE_DEST

DB_UNIQUE_NAME

db_unique_name

Appendix A: RMAN Syntax Reference Guide
599

Chapter References

The
restore
command is covered in detail in Chapters 12 and 14.

Examples

restore database;

restore tablespace user data, user index;

restore datafile 1,2,3,4,5;

CONNECT TARGET /

STARTUP NOMOUNT;

SET DBID 660055374;

RESTORE CONTROLFILE FROM TAG 'monday cf backup';

ALTER DATABASE MOUNT;

RMAN> RUN

{

SET ARCHIVELOG DESTINATION TO '/oratmp/arch restore';

RESTORE ARCHIVELOG ALL;

}

resync catalog Command

The
resync catalog
command is used to resynchronize the recovery catalog with the database control file.

Syntax Diagram

FROM CONTROLFILECOPY


filename


RESYNC CATALOG

DB_UNIQUE_NAME ALL

;

FROM



DB_UNIQUE_NAME

db_unique_name

Chapter Reference

Chapter 10 contains information on the
resync
command.

Example

resync catalog;

revoke Command

The
revoke
command is associated with the RMAN recovery catalog and a feature called a virtual private catalog. This feature provides the ability to restrict access to recovery catalog records by user. The
revoke
command provides the means to remove previously granted privileges from users to see records in the recovery catalog when a virtual private catalog has been configured.

600
Part V: Appendixes

Syntax Diagram



database_name

CATALOG FOR DATABASE

integer

REVOKE

REGISTER DATABASE

FROM

userid

;

ALL PRIVILEGES

Chapter Reference

Chapter 10 contains information on the
revoke
command and using a virtual private catalog.

Examples

revoke catalog for database mydb from operator1;

revoke all privileges from operator2;

run Command

The
run
command is used to compile and execute one or more RMAN commands. The commands to be executed are contained within a set of braces, called a
run
block. An opening brace is used, followed by RMAN commands. Once the final RMAN command is listed, a closing brace causes the entire set of commands to execute when you press ENTER.

Syntax Diagram

backupCommands

maintenanceCommands

RUN

{

}

miscellaneousCommands

restoreCommands

backupCommands Parameter Syntax Diagram

backup

convert

maintenanceCommands Parameter Syntax Diagram

catalog

change

configure

crosscheck

delete

report

show

validate

Appendix A: RMAN Syntax Reference Guide
601

miscellaneousCommands Parameter Syntax Diagram

allocate

alterDatabase

executeScript

host

release

resync

send

set

shutdown

sql

startup

restoreCommands Parameter Syntax Diagram

advise

duplicate

flashback

recover

repair

restore

switchFile

transpt_tbs

Chapter References

The
run
command is demonstrated in many chapters in this book, such as Chapter 11.

Example

RMAN> RUN

{

set archivelog destination to '/oratmp/arch restore';

restore archivelog all;

}

send Command

The
send
command is used to send a vendor-specific string to one or more channels. Because these strings are vendor specific, they should be documented in your vendor-supplied media management layer documentation.

602
Part V: Appendixes

Syntax Diagram

,



CHANNEL

channel_id

SEND

,


command


DEVICE TYPE

deviceSpecifier

PARMS


channel_parms


;

Chapter References

See Chapters 4 through 9 for more on the MML layer and valid vendor strings.

Example

send 'env serv bck01';

set Command

The
set
command configures RMAN settings for the current RMAN session. It is used to configure settings that are not persistent, or to temporarily change persistent settings for a given session. The
set
command comes in two different flavors. The
set_run_option
parameters can be used within the confines of a
run
block. The
set_rman_option
parameters are set from the RMAN prompt.

Syntax Diagram

setRmanOption

;

SET

setRunOption

setRmanOrRunOption

Appendix A: RMAN Syntax Reference Guide
603

setRmanOption Parameter Syntax Diagram

TRUE

OPTIMIZE FOR LOAD

FALSE

AS OF RELEASE

quoted_string

COMPRESSION ALGORITHM quoted_string

,

DECRYPTION IDENTIFIED BY

password

OFF

ECHO

ON

ALGORITHM quoted_string

ONLY

ENCRYPTION

IDENTIFIED BY

password

OFF

FOR ALL TABLESPACES

ON

setRunOption Parameter Syntax Diagram

ARCHIVELOG DESTINATION TO ’

log_archive_dest


BACKUP COPIES

integer

,

MAXCORRUPT FOR DATAFILE

datafileSpec

TO

integer

DATABASE

DATAFILE

datafileSpec


filename


NEWNAME FOR



TO

NEW

TABLESPACE

tablespace_name

TEMPFILE

tempfileSpec

TO RESTORE POINT

restore_point_name

untilClause

Other books

AlphaMountie by Lena loneson
Winter's Night by Sherrilyn Kenyon
Tainted Trail by Wen Spencer
The Elves of Cintra by Terry Brooks
The Shells Of Chanticleer by Patrick, Maura
Silver Brumby Kingdom by Elyne Mitchell