Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

2135

积分

502

好友

184

主题
1#
发表于 2012-2-9 22:33:35 | 查看: 14183| 回复: 2
Question:

为什么RMAN备份,CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oracle/flash_recovery_area/ORCL/backupset/bak_%F_%d_%t_%r_%s.dbf';

不能用 “%F”,只能用“%f”
ORA-19715: invalid format F for generated name
ORA-27302: failure occurred at: slgp
下载专业ORACLE数据库恢复工具PRM-DUL  For Oracle http://www.parnassusdata.com/zh-hans/emergency-services

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638  QQ: 47079569   
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 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, %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
%YSpecifies 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.

回复 只看该作者 道具 举报

3#
发表于 2012-2-9 22:43:16
有类似问题的 变量还有 %N

Attempt to create a datafile copy with RMAN fails:

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/11/2007 09:27:32
ORA-19715: invalid format N for generated name
ORA-27302: failure occurred at: slgpn

Command used:

RMAN> BACKUP AS COPY
2> DATAFILE '+DATA/dwh/datafile/system.272.591295591'
3> FORMAT 'COPY_file_%N_%f_of_db_%I'
4> ;
.
Cause
This is Bug 5726595 %N NOT A VALID FORMAT

As a backupset can have datafiles from more than one tablespace, %N is not meant to be used with
backupsets or copies.
This is a documentation error that is fixed in 11g.

.
Solution

Do not use %N for backupsets or copies.
Use %U to generate guaranteed unique names :

For backupsets, %U means:                                         %u_%p_%c
For an image copy of a datafile, %U means:                 data-D-%d_id-%I_TS-%N_FNO-%f_%u
For an image copy of an archived redolog, %U means: arch-D_%d-id-%I_S-%e_T-%h_A-%a_%u
For an image copy of a control file, %U means:             cf-D_%d-id-%I_%u

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-23 23:38 , Processed in 0.047858 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569