Oracle BLOB export via SqlPlus

oracle

Is there an easy and fast way to quickly perform a select of a BLOB value from Oracle, copy the result in a notepad and run the corresponding insert in another Oracle to insert data? Data is much longer than 4 K.

I cannot use external tools or copy files because I've access only to the sqlplus tool (PlSql developer, to be clearer) and from what I've seen googling for it is not so easy, so maybe the accepted answer will be simple a "NO, there is no way".

Best Answer

Rather than using notepad as an intermediary, I expect you'd be much better served simply using the SQL*Plus COPY command, i.e.

COPY FROM source_table@source_tns_alias
       TO destination_table@destination_tns_alias
   CREATE dest_table_name ( column_list)
    USING SELECT column_list 
            FROM source_table_name

will copy the contents of SOURCE_TABLE at SOURCE_TNS_ALIAS to a newly created table DEST_TABLE_NAME at the DESTINATION_TNS_ALIAS. There are also options in the COPY command to load data into an existing table.