ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN备份语法

RMAN备份语法

原创 Linux操作系统 作者:liu_qingwei2008 时间:2011-04-28 17:22:40 0 删除 编辑
RMAN备份语法

archivelogRecordSpecifier
This subclause specifies a range of archived redo logs.
 
001 ARCHIVELOG 
002 { ALL 
003  LIKE 'string_pattern'
004  archlogRange [LIKE 'string_pattern' [THREAD [=] integer]] 
005 } 
006 { { { UNTIL TIME  FROM TIME } [=] 'date_string'
007  { TIME BETWEEN 'date_string' AND 
008  FROM TIME [=] 'date_string' UNTIL TIME [=] 
009 16 
010 } 
011 'date_string'
012  UNTIL SCN [=] integer 
013  SCN BETWEEN integer AND integer 
014  FROM SCN [=] integer [UNTIL SCN [=] integer] 
015 } 
016 [THREAD [=] integer] 
017  { UNTIL SEQUENCE [=] integer 
018  FROM SEQUENCE [=] integer [UNTIL SEQUENCE [=] integer] 
019  SEQUENCE [BETWEEN integer AND] integer 
020 } 
021 [THREAD [=] integer] 
022 }  
023   
024 BACKUP 
025 Backs up database files, archived logs, backups, and copies. 
026 BACKUP 
027 [ ( 
028 (FULL  INCREMENTAL LEVEL [=] integer) 
029  [ (FULL  INCREMENTAL LEVEL [=] integer) ] 
030 AS (COPY  BACKUPSET) 
031  AS (COPY  BACKUPSET) 
032 (FULL  INCREMENTAL LEVEL [=] integer) 
033 ) 
034 ] 
035 [backupOperand [backupOperand]...] backupSpec [backupSpec]... 
036 [PLUS ARCHIVELOG [backupSpecOperand [backupSpecOperand]...]]; 
037 backupOperand::= 
038 { FORMAT [=] 'format_string' [, 'format_string']... 
039  CHANNEL ['] channel_id ['] 
040  CUMULATIVE 
041  MAXSETSIZE [=] integer [ K  M  G ] 
042  TAG [=] ['] tag_name ['] 
043  keepOption 
044  SKIP { OFFLINE  READONLY  INACCESSIBLE } 
045  VALIDATE 
046  NOT BACKED UP [SINCE TIME [=] 'date_string'] 
047  COPIES [=] integer 
048  DEVICE TYPE deviceSpecifier 
049 . 
050 . 
051 . 
052 } 
053 backupSpec::= 
054 [(] 
055 { BACKUPSET 
056 { {ALL  completedTimeSpec } 
057  primary_key) [, primary_key]... 
058 } 
059  COPY OF { DATABASE 
060  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
061  DATAFILE datafileSpec [, datafileSpec]... 
062 } 
063  DATAFILE datafileSpec [, datafileSpec]... 
064  DATAFILECOPY 'filename' [, 'filename']... 
065 17 
066  DATAFILECOPY FROM TAG [=] ['] tag_name ['] [, ['] tag_name [']]... 
067  DATAFILECOPY { ALL  LIKE 'string_pattern' } 
068  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
069  DATABASE 
070  archivelogRecordSpecifier 
071  CURRENT CONTROLFILE [FOR STANDBY] 
072  CONTROLFILECOPY 'filename'
073  SPFILE 
074 } 
075 [backupSpecOperand [backupSpecOperand]...] 
076 backupSpecOperand::= 
077 { FORMAT [=] 'format_string' [, 'format_string']... 
078  CHANNEL ['] channel_id ['] 
079  CUMULATIVE 
080  MAXSETSIZE [=] integer [ K  M  G ] 
081  TAG [=] ['] tag_name ['] 
082  keepOption 
083  SKIP { OFFLINE  READONLY  INACCESSIBLE } 
084  NOT BACKED UP [ SINCE TIME [=] 'date_string'
085  integer TIMES 
086 ] 
087  DELETE [ALL] INPUT 
088 . 
089 . 
090 . 
091 }  
092   
093 CHANGE 
094 Updates status of a backup or copy in the RMAN repository. 
095 CHANGE 
096 { { BACKUP  COPY } [OF listObjList] [ maintQualifier [maintQualifier]...] 
097  archivelogRecordSpecifier 
098  recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...] 
099 } 
100 { AVAILABLE  UNAVAILABLE  UNCATALOG  keepOption } 
101 [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]; 
102 completedTimeSpec 
103 COMPLETED 
104 { AFTER [=] 
105  BETWEEN 'date_string' AND  BEFORE [=] } 'date_string'
106 CONFIGURE 
107 Change persistent RMAN configuration settings. 
108 CONFIGURE 
109 { deviceConf 
110  backupConf 
111  { AUXNAME FOR DATAFILE datafileSpec 
112  SNAPSHOT CONTROLFILE NAME 
113 } 
114 { TO 'filename'  CLEAR } 
115  cfauConf 
116 }; 
117 deviceCon::= 
118 { DEFAULT DEVICE TYPE { TO deviceSpecifier  CLEAR } 
119  DEVICE TYPE deviceSpecifier { PARALLELISM integer  CLEAR } 
120  [AUXILIARY] CHANNEL [integer] DEVICE TYPE deviceSpecifier 
121 { allocOperandList  CLEAR } 
122 } 
123 allocOperandList::= 
124 { PARMS [=] 'channel_parms'
125  FORMAT [=] 'format_string' [, 'format_string']... 
126  { MAXPIECESIZE [=] integer  RATE [=] integer } [ K  M  G ] 
127 . 
128 . 
129 . 
130 }... 
131 connectStringSpec::= 
132 ['] [userid] [/ [password]] [@net_service_name] ['] 
133 backupConf::= 
134 { RETENTION POLICY { TO { RECOVERY WINDOW OF integer DAYS 
135  REDUNDANCY [=] integer 
136  NONE 
137 } 
138  CLEAR
139 } 
140  MAXSETSIZE { TO { integer [ K  M  G ] 
141  UNLIMITED 
142 } 
143  CLEAR
144 } 
145  { ARCHIVELOG  DATAFILE } 
146 BACKUP COPIES FOR DEVICE TYPE deviceSpecifier 
147 { TO integer  CLEAR } 
148  BACKUP OPTIMIZATION { ON  OFF  CLEAR } 
149  EXCLUDE FOR TABLESPACE tablespace_name [CLEAR] 
150 } 
151 cfauConf::== 
152 CONTROLFILE AUTOBACKUP 
153 { ON 
154  OFF 
155  CLEAR
156  FORMAT FOR DEVICE TYPE deviceSpecifier { TO 'format string'  CLEAR } 
157 }  
158     
159 CROSSCHECK 
160 Checks whether backup pieces, proxy copies, and disk copies still exist. 
161 CROSSCHECK 
162 { 
163 { BACKUP [OF listObjList] 
164  COPY [OF listObjList] 
165  archivelogRecordSpecifier 
166 } [maintQualifier [maintQualifier]...] 
167  recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...] 
168 }; 
169 listObjList::= 
170 [ DATAFILE datafileSpec [, datafileSpec]... 
171  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
172  archivelogRecordSpecifier 
173  DATABASE [SKIP TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name 
174 [']]...] 
175  CONTROLFILE 
176  SPFILE 
177 ]... 
178 recordSpec::= 
179 { { BACKUPPIECE  PROXY } 
180 { 'media_handle' [, 'media_handle']... 
181  primary_key [, primary_key]... 
182  TAG [=] ['] tag_name ['] 
183 } 
184  BACKUPSET primary_key [, primary_key]... 
185  { CONTROLFILECOPY  DATAFILECOPY } 
186 { { primary_key [, primary_key]... 
187  'filename' [, 'filename']... 
188 } 
189  TAG [=] ['] tag_name ['] [, ['] tag_name [']]... 
190 } 
191  ARCHIVELOG 
192 { primary_key [, primary_key]... 
193  'filename' [, 'filename']... 
194 } 
195 } 
196 datafileSpec 
197 datafileSpec::= 
198 { 'filename' integer } 
199 DELETE 
200 Deletes backups and copies from disk or tape media, and updates the RMAN 
201 repository accordingly. 
202 DELETE [FORCE] [NOPROMPT] 
203 { [EXPIRED] 
204 { 
205 { BACKUP [OF listObjList] 
206  COPY [OF listObjList] 
207  archivelogRecordSpecifier 
208 } [maintQualifier [maintQualifier]...] 
209  recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...] 
210 } 
211  OBSOLETE [obsOperandList] 
212 [DEVICE TYPE (deviceSpecifier [, deviceSpecifier]...] 
213 }; 
214 obsOperandList::= 
215 [ REDUNDANCY [=] integer  RECOVERY WINDOW OF integer DAYS ]... 
216 deviceSpecifier 
217 deviceSpecifier::= 
218 { DISK  ['] media_device ['] } 
219 LIST 
220 Lists the backups and copies recorded in the repository. 
221 LIST 
222 { INCARNATION [OF DATABASE [['] database_name [']]] 
223  [EXPIRED] 
224 { listObjectSpec 
225 [ maintQualifier  RECOVERABLE [untilClause] ]... 
226  recordSpec 
227 } 
228 }; 
229 listObjectSpec::= 
230 { BACKUP [OF listObjList] [listBackupOption] 
231  COPY [OF listObjList] 
232  archivelogRecordSpecifier 
233 } 
234 listObjectList::= 
235 [ DATAFILE datafileSpec [, datafileSpec]... 
236  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
237  archivelogRecordSpecifier 
238  DATABASE [SKIP TABLESPACE ['] tablespace_name ['] 
239 [, ['] tablespace_name [']]...] 
240  CONTROLFILE 
241  SPFILE 
242 ]... 
243 listBackupOption::= 
244 [ [BY BACKUP] [VERBOSE] 
245  SUMMARY 
246  BY { BACKUP SUMMARY  FILE } 
247 ] 
248 maintQualifier 
249 { TAG [=] ['] tag_name ['] 
250  completedTimeSpec 
251  LIKE 'string_pattern'
252  DEVICE TYPE deviceSpecifier [, deviceSpecifier]... 
253  BACKED UP integer TIMES TO DEVICE TYPE deviceSpecifier 
254 } 
255 RECOVER 
256 Performs media recovery from RMAN backups and copies. 
257 RECOVER [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...] 
258 recoverObject [recoverOptionList]; 
259 recoverObject::= 
260 { DATABASE 
261 [ untilClause 
262  [untilClause] SKIP [FOREVER] TABLESPACE 
263 ['] tablespace_name ['] [, ['] tablespace_name [']]... 
264 ] 
265  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
266  DATAFILE datafileSpec [, datafileSpec]... 
267 } 
268 recoverOptionList::= 
269 { DELETE ARCHIVELOG [MAXSIZE {integer [K  M  G]}] 
270  CHECK READONLY 
271  NOREDO 
272  { FROM TAG  ARCHIVELOG TAG } [=] ['] tag_name ['] 
273 . 
274 . 
275 . 
276 }...  
277     
278 REPORT 
279 Reports backup status of your database: which files are in the database, which 
280 files need backups, and which backups are obsolete or unrecoverable. 
281 REPORT 
282 { { NEED BACKUP [ { INCREMENTAL  DAYS } [=] integer 
283  REDUNDANCY [=] integer 
284  RECOVERY WINDOW OF integer DAYS) 
285 ] 
286  UNRECOVERABLE 
287 } 
288 reportObject 
289  SCHEMA [atClause] 
290  OBSOLETE [obsOperandList] 
291 } 
292 [ DEVICE TYPE deviceSpecifier [,deviceSpecifier]... ] 
293 reportObject::= 
294 [ DATAFILE datafileSpec [, datafileSpec]... 
295  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
296  DATABASE [SKIP TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name 
297 [']]...] 
298 ] 
299 atClause::= 
300 { AT TIME [=] 'date_string'
301  AT SCN [=] integer 
302  AT SEQUENCE [=] integer THREAD [=] integer 
303 } 
304 obsOperandList::= 
305 [ REDUNDANCY [=] integer  RECOVERY WINDOW OF integer DAYS ]... 
306 RESTORE 
307 Restores RMAN backups and copies. 
308 RESTORE 
309 [(] restoreObject [(restoreSpecOperand [restoreSpecOperand]...] [)]... 
310 [ CHANNEL ['] channel_id ['] 
311  PARMS [=] 'channel_parms'
312  FROM { BACKUPSET  DATAFILECOPY } 
313  untilClause 
314  FROM TAG [=] ['] tag_name ['] 
315  VALIDATE 
316  DEVICE TYPE deviceSpecifier [, deviceSpecifier]... 
317 . 
318 . 
319 . 
320 ]...; 
321 restoreObject::= 
322 { CONTROLFILE [TO 'filename'] 
323  DATABASE 
324 [SKIP [FOREVER] TABLESPACE 
325 ['] tablespace_name ['] [, ['] tablespace_name [']]... 
326 ] 
327  DATAFILE datafileSpec [, datafileSpec]... 
328  TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
329  archivelogRecordSpecifier 
330  SPFILE [TO [PFILE] 'filename'] 
331 } 
332 restoreSpecOperand::= 
333 { CHANNEL ['] channel_id ['] 
334  FROM TAG [=] ['] tag_name ['] 
335  PARMS [=] 'channel_parms'
336  FROM 
337 { AUTOBACKUP 
338 [{ MAXSEQ  MAXDAYS } [=] integer)]... 
339  'media_handle'
340 } 
341 }  
342   
343 RUN 
344 Some RMAN commands are only valid inside a RUN block. 
345 RUN { 
346 ... 
347 } 
348 SET
349 Creates settings that apply only to the current RMAN session. 
350 SET { set_rman_option [;]  set_run_option; } 
351 set_rman_option::= 
352 { ECHO { ON  OFF } 
353  DBID [=] integer 
354  CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'frmt_ 
355 string' 
356 set_run_option::= 
357 { NEWNAME FOR DATAFILE datafileSpec TO { 'filename'  NEW } 
358  ARCHIVELOG DESTINATION TO 'log_archive_dest'
359  untilClause 
360  COMMAND ID TO 'string'
361  CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'frmt_ 
362 string' 
363 . 
364 . 
365 . 
366 }  
367   
368 SHOW 
369 Displays the currently enabled CONFIGURE commands. 
370 SHOW 
371 { RETENTION POLICY 
372  [DEFAULT] DEVICE TYPE
373  [AUXILIARY] CHANNEL [FOR DEVICE TYPE deviceSpecifier] 
374 MAXSETSIZE 
375  { DATAFILE  ARCHIVELOG } BACKUP COPIES 
376  BACKUP OPTIMIZATION 
377  SNAPSHOT CONTROLFILE NAME 
378  AUXNAME 
379  EXCLUDE 
380  CONTROLFILE AUTOBACKUP [FORMAT] 
381  ALL 
382 }; 
383 untilClause 
384 { UNTIL TIME [=] 'date_string'
385  UNTIL SCN [=] integer 
386  UNTIL SEQUENCE [=] integer THREAD [=] integer 
387 }
文章出处:飞诺网(www.firnow.com):http://dev.firnow.com/course/7_databases/oracle/oraclejs/200873/130036.html

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23898243/viewspace-694035/,如需转载,请注明出处,否则将追究法律责任。

上一篇: rman backup
请登录后发表评论 登录
全部评论

注册时间:2010-05-12

  • 博文量
    37
  • 访问量
    86639