如何将Bfile从一个数据库复制到Oracle中的另一个数据库

时间:2018-01-17 12:48:04

标签: oracle

我想将Bfiles从db1复制到db2。 我无法在db2中创建Bfiles。 我在db2实例中使用了DBMS_FILE_TRANSFER.get_file过程。

DBMS_FILE_TRANSFER.get_file(
   source_directory_object      => 'db1_dir',
   source_file_name             => 'test.html',
   source_database        =>  'db2_to_db1',
   destination_directory_object => 'db2_dir',
   destination_file_name        => 'test.html');
END;
/

另外,我在db1实例中尝试过DBMS_FILE_TRANSFER.put_file过程。

DBMS_FILE_TRANSFER.put_file(
   source_directory_object      => 'db1_dir',
   source_file_name             => 'test.html',
   destination_directory_object => 'db2_dir',
   destination_file_name        => 'test.html');
   destination_database        =>  'db1_to_db2',
END;
/

但两个函数都发出相同的错误。

ORA-19505: failed to identify file "/rdsdbdata/userdirs/05/test.html"
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
ORA-02063: preceding 3 lines from db1_to_db2/db2_to_db1
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 37
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 132
ORA-06512: at line 2
19505. 00000 -  "failed to identify file \"%s\""
*Cause:    call to identify the file returned an error
*Action:   check additional messages, and check if the file exists.

0 个答案:

没有答案