Oracle RMAN 11g Backup and Recovery (181 page)

604
Part V: Appendixes

setRmanOrRunOption Parameter Syntax Diagram

AUXILIARY INSTANCE PARAMETER FILE TO


filename


COMMAND ID TO ’

string


CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier

TO

formatSpec



DATABASE

database_name

DBID

integer

INCARNATION primaryKey

Chapter Reference

The
set
command is documented in Chapter 12.

Examples

set dbid 676549873;

set until time '1/10/2006 13:45:00';

set controlfile autobackup format for device type disk

to '/u01/oraback/cntrlf %f.bak';

show Command

The
show
command is used to display the current persistent configuration settings for the database that RMAN is connected to. These settings come from the control file of that database.

Appendix A: RMAN Syntax Reference Guide
605

Syntax Diagram

ALL

BACKUP COPIES

ARCHIVELOG

DELETION POLICY

AUXNAME

BACKUP OPTIMIZATION

AUXILIARY

FOR DEVICE TYPE

deviceSpecifier

CHANNEL

COMPRESSION ALGORITHM

FORMAT

CONTROLFILE AUTOBACKUP

forDbUniqueNameOption

SHOW

DATAFILE BACKUP COPIES

;

DB_UNIQUE_NAME

DEFAULT

DEVICE TYPE

ALGORITHM

ENCRYPTION

DATABASE

FOR

TABLESPACE

EXCLUDE

MAXSETSIZE

RETENTION POLICY

SNAPSHOT CONTROLFILE NAME

forDbUniqueNameOption Parameter Syntax Diagram

DB_UNIQUE_NAME ALL

FOR



DB_UNIQUE_NAME

db_unique_name

Chapter Reference

The
show
command is documented in Chapter 3.

Examples

show all;

show retention policy;

606
Part V: Appendixes

shutdown Command

The
shutdown
command is used to shut down the target database and is equivalent to the SQL*Plus
shutdown
command.

Syntax Diagram

ABORT

IMMEDIATE

NORMAL

TRANSACTIONAL

;

SHUTDOWN

Chapter References

The
shutdown
command is demonstrated in several chapters in this book.

Examples

shutdown abort;

shutdown immediate;

spool Command

The
spool
command is used to spool the output of RMAN operations to an operating system file.

Syntax Diagram

OFF

APPEND

;

SPOOL LOG

TO

filename

Example

spool log to 'rmanoutput.log'

SQL Command

The
SQL
command is used to execute a SQL statement from the RMAN prompt. Single SQL

statements are placed within single quotes.

Syntax Diagram



CHANNEL

channel_id

SQL


command


;

Appendix A: RMAN Syntax Reference Guide
607

Chapter References

This command is documented in many places in this book.

Example

sql 'alter tablespace mytbs offline immediate';

startup Command

The
startup
command is used to start the target database and is equivalent to the SQL*Plus
startup
command.

Syntax Diagram

DBA

FORCE

MOUNT

NOMOUNT



PFILE

filename

;

STARTUP

Chapter References

The
startup
command is documented in several chapters of this book.

Examples

startup nomount;

startup;

switch Command

The
switch
command causes an RMAN datafile copy to become the current database datafile.

This command is used frequently if the database datafiles must be restored to a location other than their original location, and is generally associated with an RMAN
set newname
command.

This command is equivalent to the SQL statement
alter database rename file
when applied to database datafiles.

Syntax Diagram

DATABASE

,

DATAFILE

datafileSpec

SWITCH

TO COPY

;

,



TABLESPACE

tablespace_name

608
Part V: Appendixes

switchFile Parameter Syntax Diagram

DATAFILE ALL


filename


TO DATAFILECOPY



TAG

tag_name

SWITCH

;

DATAFILE

datafileSpec

TEMPFILE ALL

TO


filename


TEMPFILE

tempfileSpec

Chapter Reference

Chapter 14 provides details on this command.

Example

run

{

set newname for datafile '/disk7/oracle/tbs11.f'

to '/disk9/oracle/tbs11.f';

restore tablespace tbs 1;

switch datafile all;

recover tablespace tbs 1;

sql "alter tablespace tbs 1 online";

}

transport tablespace Command

The
transport tablespace
command is used to create transportable tablespace sets from RMAN

backups, instead of using the actual datafiles of the source database. You can also use the
transport
tablespace
command to create transportable tablespace sets that can be recovered to a specific point in time.

Syntax Diagram

,



transpt_tbs_optList

TRANSPORT TABLESPACE

tablespace_name

;

Appendix A: RMAN Syntax Reference Guide
609

Other books

Purposes of Love by Mary Renault
Ripper's Torment by Sam Crescent
THE LYIN’ KING by Vertell Reno'Diva Simato
Survival by Joe Craig
The Osage Orange Tree by William Stafford
Charmed by Trent, Emily Jane
Absolute Hush by Sara Banerji
The Boy From Reactor 4 by Stelmach, Orest