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

转自: http://blog.csdn.net/kai27ks/article/details/7719561

例如;backup incremental level 0 database format='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 tablespace name      ---表空间备份
%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 are valid in format strings.
Syntax ElementDescription
%aSpecifies the activation ID of the database.
%cSpecifies the copy number of the backup piece within a set of duplexed backup pieces. If you did not duplex a backup, then this variable is 1 for backup sets and 0 for proxy copies. If one of these commands is enabled, then the variable shows the copy number. The maximum value for %c is 256.
%dSpecifies the name of the database (see Example 3-22).
%DSpecifies the current day of the month from the Gregorian calendar in format DD.
%eSpecifies the archived log sequence number.
%fSpecifies the absolute file number (see Example 3-22).
%FCombines the DBID, day, month, year, and sequence into a unique and repeatable generated name. This variable translates into c-IIIIIIIIII-YYYYMMDD-QQ, where:
  • IIIIIIIIII  stands for the DBID. The DBID is printed in decimal so that it can be easily associated with the target database.
  • YYYYMMDD  is a time stamp in the Gregorian calendar of the day the backup is generated
  • QQ  is the sequence in hexadecimal number that starts with 00 and has a maximum of 'FF' (256)
%hSpecifies the archived redo log thread number.
%ISpecifies the DBID.
%MSpecifies the month in the Gregorian calendar in format MM.
%NSpecifies the tablespace name. This substitution variable is only valid when backing up datafiles as image copies.
%nSpecifies the name of the database, padded on the right with x characters to a total length of eight characters. For example, if prod1 is the database name, then the padded name is prod1xxx.
%pSpecifies the piece number within the backup set. This value starts at 1 for each backup set and is incremented by 1 as each backup piece is created.
Note:  If you specify   PROXY, then the   %p  variable must be included in the   FORMAT  string either explicitly or implicitly within   %U.
%sSpecifies the backup set number. This number is a counter in the control file that is incremented for each backup set. The counter value starts at 1 and is unique for the lifetime of the control file. If you restore a backup control file, then duplicate values can result. Also,CREATE CONTROLFILE initializes the counter back to 1.
%tSpecifies the backup set time stamp, which is a 4-byte value derived as the number of seconds elapsed since a fixed reference time. The combination of %s and %t can be used to form a unique name for the backup set.
%TSpecifies the year, month, and day in the Gregorian calendar in this format: YYYYMMDD.
%uSpecifies an 8-character name constituted by compressed representations of the backup set or image copy number and the time the backup set or image copy was created.
%USpecifies a system-generated unique filename (default).
The meaning of   %U  is different for image copies and backup pieces. For a backup piece,   %Uspecifies a convenient shorthand for   %u_%p_%c  that guarantees uniqueness in generated backup filenames. For an image copy of a datafile,   %U  means the following:
data-D-%d_id-%I_TS-%N_FNO-%f_%u
For an image copy of an archived redo log,   %U  means the following:
arch-D_%d-id-%I_S-%e_T-%h_A-%a_%u
For an image copy of a control file,   %U  means the following:
cf-D_%d-id-%I_%u
%YSpecifies the year in this format: YYYY.
%%Specifies the percent (%) character. For example, %%Y translates to the 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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值