RMAN中的%T,%D,%U是什么意思

来源:互联网 发布:怎么装修手机淘宝店铺 编辑:程序博客网 时间:2024/04/28 06:38
转自:http://blog.csdn.net/kai27ks/article/details/7719561

例如;backup incremental level 0 databaseformat='lev0_%d_%t_%u_%s_%p'
format=string文件路径和名称的格式串,其中的含义是:
%c copy ID
%p backup piece ID
%s backup set ID
%e log Sequence
%h log thread ID
%d database name
%n database name(x填充到8个字符)
%I DBID
%f file ID
%F DBID , day ,month ,year and sequence的复合格式 ---多用于全备份
%N tablespacename   ---表空间备份
%t timestamp
%M mh mm格式
%Y year yyyy格式
%D day dd格式
%u backup set time(x填充到8个字符))
%U %u_%p_%c   ---- 采用备份冗余时使用


以下来自另一文

转自:http://hunt1574.blog.51cto.com/1390776/862297

The following table lists RMAN substitution variables that arevalid in format strings.
Syntax ElementDescription%aSpecifies the activation ID of the database.%cSpecifies the copy number of the backup piece within aset of duplexed backup pieces. If you did not duplex a backup, thenthis variable is 1 for backup sets and 0 for proxy copies. If oneof these commands is enabled, then the variable shows the copynumber. The maximum valuefor %c is 256.%dSpecifies the name of the database(see Example3-22).%DSpecifies the current day of the month from theGregorian calendar informat DD.%eSpecifies the archived log sequence number.%fSpecifies the absolute file number(see Example3-22).%FCombines the DBID, day, month, year, and sequence intoa unique and repeatable generated name. This variable translatesinto c-IIIIIIIIII-YYYYMMDD-QQ, where:
  • IIIIIIIIII standsfor the DBID. The DBID is printed in decimal so that it can beeasily associated with the target database.
  • YYYYMMDD isa time stamp in the Gregorian calendar of the day the backup isgenerated
  • QQ is thesequence in hexadecimal number that starts with 00 and has amaximum of 'FF' (256)
%hSpecifies the archived redo log thread number.%ISpecifies the DBID.%MSpecifies the month in the Gregorian calendar informat MM.%NSpecifies the tablespace name. This substitutionvariable is only valid when backing up datafiles as imagecopies.%nSpecifies the name of the database, padded on theright with x characters to atotal length of eight characters. For example,if prod1 is thedatabase name, then the padded nameis prod1xxx.%pSpecifies the piece number within the backup set. Thisvalue starts at 1 for each backupset and is incremented by 1 as each backup piece is created.
Note: Ifyou specify PROXY, thenthe %p variable mustbe included in the FORMAT stringeither explicitly or implicitlywithin %U.
%sSpecifies the backup set number. This number is acounter in the control file that is incremented for each backupset. The counter value startsat 1 and is uniquefor the lifetime of the control file. If you restore a backupcontrol file, then duplicate values can result. Also,CREATECONTROLFILE initializesthe counter back to 1.%tSpecifies the backup set time stamp, which is a 4-bytevalue derived as the number of seconds elapsed since a fixedreference time. The combinationof %s and %t can beused to form a unique name for the backup set.%TSpecifies the year, month, and day in the Gregoriancalendar in this format: YYYYMMDD.%uSpecifies an 8-character name constituted bycompressed representations of the backup set or image copy numberand the time the backup set or image copy was created.%USpecifies a system-generated unique filename(default).
The meaningof %U is differentfor image copies and backup pieces. For a backuppiece, %Uspecifies aconvenient shorthand for %u_%p_%c thatguarantees uniqueness in generated backup filenames. For an imagecopy of a datafile, %U means thefollowing:
data-D-%d_id-%I_TS-%N_FNO-%f_%u
For an image copy of anarchived redo log, %U means thefollowing:
arch-D_%d-id-%I_S-%e_T-%h_A-%a_%u
For an image copy of acontrol file, %U means thefollowing:
cf-D_%d-id-%I_%u
%YSpecifies the year in thisformat: YYYY.%%Specifies the percent (%) character.For example, %%Y translates tothe string %Y.


OCP试题一道

You are using Oracle Database 10g. The LOG_ARCHIVE_FORMAT parameter is set to
'LOG%t_%s_%r.dbf'.
Why is %r used in the file name format?
A.to uniquely identify the archived log files with the restore operation
B.to uniquely identify the archived log files with the redo log group number
C.to uniquely identify the archived log files for each incarnation of the database
D.to uniquely identify the archived log files with the number of recovery operations performed
Answer: C
0 0
原创粉丝点击