0

I am doing MySQL to Oracle Migration where stucked in a situation where I have to migrate MySQL insert script that contains BLOB data to Oracle. When I run the insert script via sqdeveloper, it gives me below error message.

SQL Error: ORA-00972: identifier is too long

Script is below:

INSERT INTO epc_lib_files (S_NO,FILE_NAME,FILE_BLOB) VALUES(1,'main1.pdf',0x255044462D312E330D0A25FFFFFFFF0D0A362030206F626A0D3C3C202F4C656E677468203720302052202F46696C746572202F466C6174654465636F6465203E3E0D73747265616D0D785EAD9DDB921BC791869F80EFD097C30D09DB27008D4B59961572D86B5A625817EBBD00673024E419808B8368BDFD56556......)

Can anyone please help.

k10gaurav
  • 462
  • 7
  • 24
  • i think you need a hextoraw() function call around your FILE_BLOB text – thatjeffsmith Oct 12 '16 at 15:55
  • Indeed, you need to convert your long hex string explicitly. Have a look at http://stackoverflow.com/questions/7489359/how-can-i-insert-into-a-blob-field-from-an-insert-statement-in-sqldeveloper But as you are already using SQL Developer, you may just want to use the SQL Developer Migration framework which does the heavy lifting for you: [Oracle SQL Developer Migrations: Getting Started](http://www.oracle.com/technetwork/database/migration/omwb-getstarted-093461.html) – gvenzl Oct 12 '16 at 19:47
  • you need to unload your files from mysql and then use sqlldr to put them back into Oracle – thatjeffsmith May 31 '18 at 13:41

0 Answers0