rman中format参数(format_String clause)
2014-04-11 16:09
267 查看
我们经常在使用rman来备份数据库。在使用format指定备份集名称,经常会使用%U等参数,这些参数是什么意思呢?下面开始详细的介绍。
%c 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.
-->备份片的拷贝数,在一组备份片内。如果没有设置多备份集,那么这个参数默认设置为1并且0个拷贝片。如果设置了多备份集,这个变量显示的是拷贝数。%c的最大值时256.
-->这个参数很少用到。使用场景是需要将备份集保存到2个以及2个以上路径时使用。
-->如果将备份集保存到2个以上路径,需要rman做如下设置
-->CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
-->CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
-->在format '路径1','路径2'
%d The name of the database.
-->数据库名称
%D The current day of the month (in format DD)
-->日期
%F Combination of DBID, day, month, year, and sequence into a unique
and repeatable generated name.
-->复合format == c-IIIIIIIIII-YYYYMMDD-QQ,其中IIIIIIIIII为dbid,YYYYMMDD为年月日,QQ为十六进制的备份片的多个copy的序号(00-ff)
%M The month (format MM)
-->月份
%n The name of the database, padded on the right with x characters
to a total length of eight characters. (AKA: Porn star alias name)
For example, if the scott is the database name, %n= scottxxx.
-->数据库的8位长度的db_name,不足部分用“x”后面填充
%p 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 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 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.
-->备份集的timestamp
%T The year, month, and day (YYYYMMDD)
-->时间格式
%u An 8-character name constituted by compressed representations of
the backup set number and the time the backup set was created.
-->8位的唯一序列号
%U A convenient shorthand for %u_%p_%c that guarantees uniqueness in
generated backup filenames.
If you do not specify a format, RMAN uses %U by default.
-->复合format %u_%p_%c
%Y The year (YYYY)
-->年
%% Specifies the '%' character. e.g. %%Y translates to %Y.
-->这个很少使用
%c 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.
-->备份片的拷贝数,在一组备份片内。如果没有设置多备份集,那么这个参数默认设置为1并且0个拷贝片。如果设置了多备份集,这个变量显示的是拷贝数。%c的最大值时256.
-->这个参数很少用到。使用场景是需要将备份集保存到2个以及2个以上路径时使用。
-->如果将备份集保存到2个以上路径,需要rman做如下设置
-->CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
-->CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
-->在format '路径1','路径2'
%d The name of the database.
-->数据库名称
%D The current day of the month (in format DD)
-->日期
%F Combination of DBID, day, month, year, and sequence into a unique
and repeatable generated name.
-->复合format == c-IIIIIIIIII-YYYYMMDD-QQ,其中IIIIIIIIII为dbid,YYYYMMDD为年月日,QQ为十六进制的备份片的多个copy的序号(00-ff)
%M The month (format MM)
-->月份
%n The name of the database, padded on the right with x characters
to a total length of eight characters. (AKA: Porn star alias name)
For example, if the scott is the database name, %n= scottxxx.
-->数据库的8位长度的db_name,不足部分用“x”后面填充
%p 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 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 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.
-->备份集的timestamp
%T The year, month, and day (YYYYMMDD)
-->时间格式
%u An 8-character name constituted by compressed representations of
the backup set number and the time the backup set was created.
-->8位的唯一序列号
%U A convenient shorthand for %u_%p_%c that guarantees uniqueness in
generated backup filenames.
If you do not specify a format, RMAN uses %U by default.
-->复合format %u_%p_%c
%Y The year (YYYY)
-->年
%% Specifies the '%' character. e.g. %%Y translates to %Y.
-->这个很少使用
相关文章推荐
- RMAN中format的参数
- rman对应format参数说明
- oracle学习笔记 RMAN format参数说明
- Rman中各种format参数说明
- RMAN备份FORMAT参数说明
- Rman中format参数说明
- Rman中各种format参数说明
- MAXPIECESIZE与FORMAT参数设置不合理导致RMAN备份失败
- RMAN中format的参数
- 用可变参数宏(variadic macros)传递可变参数表void printf(const char* format, …);
- Java String.Format() 方法及参数说明
- RMAN配置参数解释
- RMAN(冷|热)备份和参数设置
- Android自定义属性时format选项参数说明及用法
- JDK1.6和JDK1.7对于SimpleDateFormat的参数 yyyy和YYYY的区别
- 【转】RMAN备份FORMAT格式中%的含义
- Oracle:只有rman备份(数据,参数,日志,控制文件全丢失)的恢复
- binlog_format参数
- 查看RMAN配置的参数及大概意思
- DataNavigateUrlFormatString 传多个参数