I have two Oracle databases using Oracle Standard Edition Two 12.1, DB1 and DB2. DB1 contains the following table a FILE_TABLE:
ColumnName DataType File_Id Number File_Ref Bfile
I am storing Bfile into File_Ref of a FILE_TABLE table. I want to access the Bfile from FILE_TABLE table and show it in DB2.
I have tried it using the database link. Using database link, I tried to do so:
SELECT FILE_REF FROM FILE_TABLE@dblink;
but it's giving an error: ORA-22992: cannot use LOB locators selected from remote tables
I also tried the DBMS_FILE_TRANSFER but when I researched on it, I got to know that we can only transfer System data files but not Bfile. Is it true? This is the syntax I used to transfer file:
DBMS_FILE_TRANSFER.put_file( source_directory_object => 'db1_dir', source_file_name => 'db1test.html', destination_directory_object => 'db2_dir', destination_file_name => 'db2test.html'); destination_database => 'db1_to_db2', END; /
But I was getting an error:
ORA-19505: failed to identify file "/db1_dir/db1test.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
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 37
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 132
ORA-06512: at line 2
- 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
Is there any way to do it using database link? Are there any other solutions to move a Bfile from one Database to other?
1 Answers
Answers 1
The ora-27046 is generally a sign that during the file transfer the file has been changed. This can be caused by firewalls. Have you verified with that the file is the same.
In addition when you get ora-27046 its not the only error, you get an error stack of several errors. It would be good to post the complete error stack. Also you don't mention which oracle release you are using.
0 comments:
Post a Comment