Oracle: export a table with blobs to an .sql file that can be imported again

前端 未结 5 522
终归单人心
终归单人心 2020-12-16 00:40

I have a table \"Images\" with two fields:

  • Name VARCHAR2
  • Data BLOB

I would like to export that table to a .sql file which I could impor

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-16 01:40

    Thx for your answer. I used the third alternative. First I downloaded SQL Workbench/J. Then I used the following command to make an export:

    WbExport -type=text -file='c:\temp\Images' delimiter='|' -decimal=',' -sourcetable=Images -formatfile=oracle;
    

    This produced a Images.txt file and many Images_r*_c2.data files and a Images.ctl file.

    I could then use the following command to import:

    sqlldr myuser@myhost/mypassword control=Images.ctl
    

提交回复
热议问题