Pregunta

all hope for you.

I need to export a huge table (900 fields, 1 000 000 strings) in to txt ansi file. UTL_FILE takes a lot of time. It is not suitable in this task. I'am trying to use Oracle Datapump, but i can't receive txt file with ansi symbols in it (only 2TTЁ©QRўҐEJЉ•). Can anybody advice me anything. Thank you in advance.

¿Fue útil?

Solución

Oracle Data Pump can only export in its proprietary binary format.

If you want to export data to text you have only a few options:

  1. PL/SQL or Java (stored) procedure which writes a file using UTL_FILE or the Java equivalent api.
  2. A program running outside the database that writes to a file. Use whichever language you're comfortable with. Pro*C might be a good choice as it is apparently much faster than the UTL_FILE approach, see http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:459020243348
  3. Use a special SQL script and run it in SQL*Plus using spooling. This is the "SQL Unloader" approach, see http://www.orafaq.com/wiki/SQL*Loader_FAQ#Is_there_a_SQL.2AUnloader_to_download_data_to_a_flat_file.3F

Googling "SQL Unloader" comes up with a few ready-made solutions that you might be able to use directly or modify for your needs.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top