Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Exporting Oracle Database into text file
yoong pan wrote:
>
> Is there a way to export oracle database into a delimited text file?
>
> Also, is there a way to import oracle database into ms-SQL server?
>
> Thanks.
>
> --
> ---------------------------------
> | Eric Y. Pan (~{EKHYG?~} )
> | http://www.mech.utah.edu/~pan
I agree that you can use SQL*Plus. I have done it many times, although I haven't imported the data into another database. I find it best to place all of this into a SQL*Plus command file (fname.sql) There is a set of SQL*Plus 'set' commands you should use to ensure you get only the data and not echos of SQL*Plus labels and other stuff.
set feedback off
set heading off
set pagesize 0
set linesize 210
set space 0
set newpage 0
set verify off
set termout off
set echo off
set wrap off
set flush off
Then spool the output and execute your SELECT. You might want to reset all of these back to your normal interactive preferences at the end of your command file. I needed a fixed length file so I included a specific value for linesize. You might want to do something different.
John Caputo Lawrence Livermore Email: caputo1_at_llnl.gov National Laboratory Phone: (510) 422-5262 P.O.Box 808, L-650 Mon-Thu 7:30 AM-5:30 PM - Off Fri Livermore, CA 94551Received on Wed Jul 09 1997 - 00:00:00 CDT