Thursday, February 11, 2016

ORA-27046: file size is not a multiple of logical block size

I had to install a database on AWS, and while transferring a dump around 20GB using dbms_file_transfer, it gave me the following error

BEGIN
  DBMS_FILE_TRANSFER.PUT_FILE(
    source_directory_object         =>   'DATA_PUMP_XXX',
    source_file_name                   =>    'xxyyzzz.DMP',
    destination_directory_object  =>    'DATA_PUMP_DIR',
    destination_file_name            =>    'xxyyzzz.DMP',
    destination_database              =>     'target_dblink'
  );
END;
/

ORA-19505: failed to identify file "D:\Clients\XXX\DataPump\xxyyzzz.DMP"
ORA-27046: file size is not a multiple of logical block size
OSD-04012: file size mismatch (OS 1829415400)
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 60
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 168
ORA-06512: at line 2
19505. 00000 -  "failed to identify file \"%s\""

Google search pointed to file size not being multiple of block size, but in real world i have no control on the dump file size.

Source file was password protected with a huge string, and transferred to AWS jump box via ftp. File was not corrupted, as I can unzip the file and read the contents of the log file and such.

For the second attempt, I zipped the file with a relatively smaller password string, and transferred to the jump box via ftp, and interestingly enough the same command (above) worked.

Not sure what went wrong the first time, So if you get this error, its not due to the size, but file being messed during transfer.

1) Ttry to transfer the file again
2) If its zipped use different tool/format




No comments:

Post a Comment