- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-2-9 22:39:55
ODM Data:
RMAN 备份过程中 的一些可用替代变量:
http://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsubcl010.htm#RCMRF195
The following table lists RMAN substitution variables that are valid in format strings.[td]Syntax Element | Description | %a | Specifies the activation ID of the database. | %c | Specifies 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. | %d | Specifies the name of the database (see Example 3-22). | %D | Specifies the current day of the month from the Gregorian calendar in format DD. | %e | Specifies the archived log sequence number. | %f | Specifies the absolute file number (see Example 3-22). | %F | Combines 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)
| %h | Specifies the archived redo log thread number. | %I | Specifies the DBID. | %M | Specifies the month in the Gregorian calendar in format MM. | %N | Specifies the tablespace name. This substitution variable is only valid when backing up datafiles as image copies. | %n | Specifies 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. | %p | Specifies 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.
| %s | Specifies 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. | %t | Specifies 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. | %T | Specifies the year, month, and day in the Gregorian calendar in this format: YYYYMMDD. | %u | Specifies 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. | %U | Specifies a system-generated unique filename (default).The meaning of %U is different for image copies and backup pieces. For a backup piece, %U specifies 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
| %Y | Specifies the year in this format: YYYY. | %% | Specifies the percent (%) character. For example, %%Y translates to the string %Y. |
%f Specifies the absolute file number 完全文件号
%F Combines the DBID, day, month, year, and sequence into a unique and repeatable generated name. This variable translates into c-IIIIIIIIII-YYYYMMDD-QQ, where:
Cause%F is not a valid format specifier for a backup of datafiles or controlfiles.. %F is used for the controlfile autobackup format only.
=> %F 是保留给 控制文件自动备份用的格式, 为了避免其他备份的名字与控制文件自动备份类似 , 所以%F 不是有效的用户可用格式。
SolutionRemove the %F from the backup format specifier.
Valid formatspec are:
%a Specifies the activation ID of the database.
%c Specifies 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.
%d Specifies the name of the database.
%D Specifies the current day of the month from the Gregorian calendar in format DD.
%e Specifies the archived log sequence number.
%f Specifies the absolute file number.
%s Specifies 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.
%t Specifies 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.
%T Specifies the year, month, and day in the Gregorian calendar in this format: YYYYMMDD.
%u Specifies 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.
%U Specifies a system-generated unique filename (default). The meaning of %U is different for image copies and backup pieces.
For a backup piece, %U specifies a convenient shorthand for %u_%p_%c that guarantees uniqueness in generated backup filenames. If you do not specify a format when making a backup, then RMAN uses %U by default.
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 velog, %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
%Y Specifies the year in this format: YYYY.
%% Specifies the literal '%' character. For example, %%Y translates to the string %Y. |
|