最近一直希望找一个RMAN语法手册去查查,终于在ORACLE 文档找到了,发出来共享一下,更多ORACLE资料可以到
http://blog.chinaunix.com/u/250下载
archivelogRecordSpecifier
This subclause specifies a range of archived redo logs.
ARCHIVELOG
{ ALL
| LIKE 'string_pattern'
| archlogRange [LIKE 'string_pattern' [THREAD [=] integer]]
}
{ { { UNTIL TIME | FROM TIME } [=] 'date_string'
| { TIME BETWEEN 'date_string' AND
| FROM TIME [=] 'date_string' UNTIL TIME [=]
16
}
'date_string'
| UNTIL SCN [=] integer
| SCN BETWEEN integer AND integer
| FROM SCN [=] integer [UNTIL SCN [=] integer]
}
[THREAD [=] integer]
| { UNTIL SEQUENCE [=] integer
| FROM SEQUENCE [=] integer [UNTIL SEQUENCE [=] integer]
| SEQUENCE [BETWEEN integer AND] integer
}
[THREAD [=] integer]
}
BACKUP
Backs up database files, archived logs, backups, and copies.
BACKUP
[ (
(FULL | INCREMENTAL LEVEL [=] integer)
| [ (FULL | INCREMENTAL LEVEL [=] integer) ]
AS (COPY | BACKUPSET)
| AS (COPY | BACKUPSET)
(FULL | INCREMENTAL LEVEL [=] integer)
)
]
[backupOperand [backupOperand]...] backupSpec [backupSpec]...
[PLUS ARCHIVELOG [backupSpecOperand [backupSpecOperand]...]];
backupOperand::=
{ FORMAT [=] 'format_string' [, 'format_string']...
| CHANNEL ['] channel_id [']
| CUMULATIVE
| MAXSETSIZE [=] integer [ K | M | G ]
| TAG [=] ['] tag_name [']
| keepOption
| SKIP { OFFLINE | READONLY | INACCESSIBLE }
| VALIDATE
| NOT BACKED UP [SINCE TIME [=] 'date_string']
| COPIES [=] integer
| DEVICE TYPE deviceSpecifier
.
.
.
}
backupSpec::=
[(]
{ BACKUPSET
{ {ALL | completedTimeSpec }
| primary_key) [, primary_key]...
}
| COPY OF { DATABASE
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATAFILE datafileSpec [, datafileSpec]...
}
| DATAFILE datafileSpec [, datafileSpec]...
| DATAFILECOPY 'filename' [, 'filename']...
17
| DATAFILECOPY FROM TAG [=] ['] tag_name ['] [, ['] tag_name [']]...
| DATAFILECOPY { ALL | LIKE 'string_pattern' }
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATABASE
| archivelogRecordSpecifier
| CURRENT CONTROLFILE [FOR STANDBY]
| CONTROLFILECOPY 'filename'
| SPFILE
}
[backupSpecOperand [backupSpecOperand]...]
backupSpecOperand::=
{ FORMAT [=] 'format_string' [, 'format_string']...
| CHANNEL ['] channel_id [']
| CUMULATIVE
| MAXSETSIZE [=] integer [ K | M | G ]
| TAG [=] ['] tag_name [']
| keepOption
| SKIP { OFFLINE | READONLY | INACCESSIBLE }
| NOT BACKED UP [ SINCE TIME [=] 'date_string'
| integer TIMES
]
| DELETE [ALL] INPUT
.
.
.
}
CHANGE
Updates status of a backup or copy in the RMAN repository.
CHANGE
{ { BACKUP | COPY } [OF listObjList] [ maintQualifier [maintQualifier]...]
| archivelogRecordSpecifier
| recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
}
{ AVAILABLE | UNAVAILABLE | UNCATALOG | keepOption }
[DEVICE TYPE deviceSpecifier [, deviceSpecifier]...];
completedTimeSpec
COMPLETED
{ AFTER [=]
| BETWEEN 'date_string' AND | BEFORE [=] } 'date_string'
CONFIGURE
Change persistent RMAN configuration settings.
CONFIGURE
{ deviceConf
| backupConf
| { AUXNAME FOR DATAFILE datafileSpec
| SNAPSHOT CONTROLFILE NAME
}
{ TO 'filename' | CLEAR }
| cfauConf
};
deviceCon::=
{ DEFAULT DEVICE TYPE { TO deviceSpecifier | CLEAR }
| DEVICE TYPE deviceSpecifier { PARALLELISM integer | CLEAR }
| [AUXILIARY] CHANNEL [integer] DEVICE TYPE deviceSpecifier
{ allocOperandList | CLEAR }
}
allocOperandList::=
{ PARMS [=] 'channel_parms'
| FORMAT [=] 'format_string' [, 'format_string']...
| { MAXPIECESIZE [=] integer | RATE [=] integer } [ K | M | G ]
.
.
.
}...
connectStringSpec::=
['] [userid] [/ [password]] [@net_service_name] [']
backupConf::=
{ RETENTION POLICY { TO { RECOVERY WINDOW OF integer DAYS
| REDUNDANCY [=] integer
| NONE
}
| CLEAR
}
| MAXSETSIZE { TO { integer [ K | M | G ]
| UNLIMITED
}
| CLEAR
}
| { ARCHIVELOG | DATAFILE }
BACKUP COPIES FOR DEVICE TYPE deviceSpecifier
{ TO integer | CLEAR }
| BACKUP OPTIMIZATION { ON | OFF | CLEAR }
| EXCLUDE FOR TABLESPACE tablespace_name [CLEAR]
}
cfauConf::==
CONTROLFILE AUTOBACKUP
{ ON
| OFF
| CLEAR
| FORMAT FOR DEVICE TYPE deviceSpecifier { TO 'format string' | CLEAR }
}
CROSSCHECK
Checks whether backup pieces, proxy copies, and disk copies still exist.
CROSSCHECK
{
{ BACKUP [OF listObjList]
| COPY [OF listObjList]
| archivelogRecordSpecifier
} [maintQualifier [maintQualifier]...]
| recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
};
listObjList::=
[ DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| archivelogRecordSpecifier
| DATABASE [SKIP TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name
[']]...]
| CONTROLFILE
| SPFILE
]...
recordSpec::=
{ { BACKUPPIECE | PROXY }
{ 'media_handle' [, 'media_handle']...
| primary_key [, primary_key]...
| TAG [=] ['] tag_name [']
}
| BACKUPSET primary_key [, primary_key]...
| { CONTROLFILECOPY | DATAFILECOPY }
{ { primary_key [, primary_key]...
| 'filename' [, 'filename']...
}
| TAG [=] ['] tag_name ['] [, ['] tag_name [']]...
}
| ARCHIVELOG
{ primary_key [, primary_key]...
| 'filename' [, 'filename']...
}
}
datafileSpec
datafileSpec::=
{ 'filename'| integer }
DELETE
Deletes backups and copies from disk or tape media, and updates the RMAN
repository accordingly.
DELETE [FORCE] [NOPROMPT]
{ [EXPIRED]
{
{ BACKUP [OF listObjList]
| COPY [OF listObjList]
| archivelogRecordSpecifier
} [maintQualifier [maintQualifier]...]
| recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
}
| OBSOLETE [obsOperandList]
[DEVICE TYPE (deviceSpecifier [, deviceSpecifier]...]
};
obsOperandList::=
[ REDUNDANCY [=] integer | RECOVERY WINDOW OF integer DAYS ]...
deviceSpecifier
deviceSpecifier::=
{ DISK | ['] media_device ['] }
LIST
Lists the backups and copies recorded in the repository.
LIST
{ INCARNATION [OF DATABASE [['] database_name [']]]
| [EXPIRED]
{ listObjectSpec
[ maintQualifier | RECOVERABLE [untilClause] ]...
| recordSpec
}
};
listObjectSpec::=
{ BACKUP [OF listObjList] [listBackupOption]
| COPY [OF listObjList]
| archivelogRecordSpecifier
}
listObjectList::=
[ DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| archivelogRecordSpecifier
| DATABASE [SKIP TABLESPACE ['] tablespace_name [']
[, ['] tablespace_name [']]...]
| CONTROLFILE
| SPFILE
]...
listBackupOption::=
[ [BY BACKUP] [VERBOSE]
| SUMMARY
| BY { BACKUP SUMMARY | FILE }
]
maintQualifier
{ TAG [=] ['] tag_name [']
| completedTimeSpec
| LIKE 'string_pattern'
| DEVICE TYPE deviceSpecifier [, deviceSpecifier]...
| BACKED UP integer TIMES TO DEVICE TYPE deviceSpecifier
}
RECOVER
Performs media recovery from RMAN backups and copies.
RECOVER [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
recoverObject [recoverOptionList];
recoverObject::=
{ DATABASE
[ untilClause
| [untilClause] SKIP [FOREVER] TABLESPACE
['] tablespace_name ['] [, ['] tablespace_name [']]...
]
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATAFILE datafileSpec [, datafileSpec]...
}
recoverOptionList::=
{ DELETE ARCHIVELOG [MAXSIZE {integer [K | M | G]}]
| CHECK READONLY
| NOREDO
| { FROM TAG | ARCHIVELOG TAG } [=] ['] tag_name [']
.
.
.
}...
REPORT
Reports backup status of your database: which files are in the database, which
files need backups, and which backups are obsolete or unrecoverable.
REPORT
{ { NEED BACKUP [ { INCREMENTAL | DAYS } [=] integer
| REDUNDANCY [=] integer
| RECOVERY WINDOW OF integer DAYS)
]
| UNRECOVERABLE
}
reportObject
| SCHEMA [atClause]
| OBSOLETE [obsOperandList]
}
[ DEVICE TYPE deviceSpecifier [,deviceSpecifier]... ]
reportObject::=
[ DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATABASE [SKIP TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name
[']]...]
]
atClause::=
{ AT TIME [=] 'date_string'
| AT SCN [=] integer
| AT SEQUENCE [=] integer THREAD [=] integer
}
obsOperandList::=
[ REDUNDANCY [=] integer | RECOVERY WINDOW OF integer DAYS ]...
RESTORE
Restores RMAN backups and copies.
RESTORE
[(] restoreObject [(restoreSpecOperand [restoreSpecOperand]...] [)]...
[ CHANNEL ['] channel_id [']
| PARMS [=] 'channel_parms'
| FROM { BACKUPSET | DATAFILECOPY }
| untilClause
| FROM TAG [=] ['] tag_name [']
| VALIDATE
| DEVICE TYPE deviceSpecifier [, deviceSpecifier]...
.
.
.
]...;
restoreObject::=
{ CONTROLFILE [TO 'filename']
| DATABASE
[SKIP [FOREVER] TABLESPACE
['] tablespace_name ['] [, ['] tablespace_name [']]...
]
| DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| archivelogRecordSpecifier
| SPFILE [TO [PFILE] 'filename']
}
restoreSpecOperand::=
{ CHANNEL ['] channel_id [']
| FROM TAG [=] ['] tag_name [']
| PARMS [=] 'channel_parms'
| FROM
{ AUTOBACKUP
[{ MAXSEQ | MAXDAYS } [=] integer)]...
| 'media_handle'
}
}
RUN
Some RMAN commands are only valid inside a RUN block.
RUN {
...
}
SET
Creates settings that apply only to the current RMAN session.
SET { set_rman_option [;] | set_run_option; }
set_rman_option::=
{ ECHO { ON | OFF }
| DBID [=] integer
| CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'frmt_
string'
set_run_option::=
{ NEWNAME FOR DATAFILE datafileSpec TO { 'filename' | NEW }
| ARCHIVELOG DESTINATION TO 'log_archive_dest'
| untilClause
| COMMAND ID TO 'string'
| CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'frmt_
string'
.
.
.
}
SHOW
Displays the currently enabled CONFIGURE commands.
SHOW
{ RETENTION POLICY
| [DEFAULT] DEVICE TYPE
| [AUXILIARY] CHANNEL [FOR DEVICE TYPE deviceSpecifier]
MAXSETSIZE
| { DATAFILE | ARCHIVELOG } BACKUP COPIES
| BACKUP OPTIMIZATION
| SNAPSHOT CONTROLFILE NAME
| AUXNAME
| EXCLUDE
| CONTROLFILE AUTOBACKUP [FORMAT]
| ALL
};
untilClause
{ UNTIL TIME [=] 'date_string'
| UNTIL SCN [=] integer
| UNTIL SEQUENCE [=] integer THREAD [=] integer
}
阅读(1292) | 评论(0) | 转发(0) |