如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!
诗檀软件专业数据库修复团队
服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com
症状
–问题陈述:
无法使用DBMS_FILE_TRANSFER复制ASM文件。
— 重现步骤:
SQL> create directory backupto as ‘C:\Experteam\Backup\RMAN\Supp’;
新建的目录.
SQL> create directory backupfrom as ‘+RECDISK/TOTALDB/BACKUPSET/2007_07_02’;
新建的目录.
SQL> BEGIN
2 dbms_file_transfer.copy_file
3 (
4 source_directory_object => ‘backupfrom’,
5 source_file_name => ‘nnndf0_BACKUP_TOTALDB_000_0702070200_0.548.62683’,
6 destination_directory_object => ‘backupto’,
7 destination_file_name => ‘nnndf0_BACKUP_TOTALDB_000_0702070200_0.548.62683’
8 );
9 END;
10 /
BEGIN
*
第1行的错误:
ORA-19505: 不能识别文件
“+RECDISK/TOTALDB/BACKUPSET/2007_07_02/nnndf0_BACKUP_TOTALDB_000_0702070200_0.548.62683”
ORA-15173: entry ‘nnndf0_BACKUP_TOTALDB_000_0702070200_0.548.62683’ does not
exist in directory ‘2007_07_02’
ORA-06512: at “SYS.DBMS_FILE_TRANSFER”, line 84
ORA-06512: at “SYS.DBMS_FILE_TRANSFER”, line 193
ORA-06512: at line 2
ASMCMD
ASMCMD> pwd
+RECDISK/TOTALDB/BACKUPSET/2007_07_02
ASMCMD>
ASMCMD>
ASMCMD> ls
nnndf0_BACKUP_TOTALDB_000_0702070200_0.548.62683
ASMCMD>
ASMCMD>
原因
Bug 6316402 DBMS_FILE_TRANSFER.COPY_FILE CAN NOT IDENTIFY ASM FILE ALTHOUGH IT EXISTS
Bug 6009056 ASMCMD SHOULD BE AWARE OF FULL NAME OF ASM ALIAS NAME
解决方案
对于完整的文件名,我们需要追加file_number||’.’||file_incarnation到file_name。
ASMCMD以及V $ ASM_ALIAS.NAME仅显示文件名称的前48个字符。
例:
SQL> select NAME||’.’||file_number||’.’||file_incarnation
2 from v$asm_alias
3 where name=’annnf0_BACKUP_TOTALDB_000_0808070230_0.620.63003′;
NAME||’.’||FILE_NUMBER||’.’||FILE_INCARNATION
—————————————————————-
annnf0_BACKUP_TOTALDB_000_0808070230_0.620.63003.620.630038277
然后使用包参数中的文件名,如下所示:
annnf0_BACKUP_TOTALDB_000_0808070230_0.620.630038277
参考
BUG:6316402 – DBMS_FILE_TRANSFER.COPY_FILE CAN NOT IDENTIFY ASM FILE ALTHOUGH IT EXISTS
Comment