Re: Generic dump to text tool

From: <eldredjames_at_my-deja.com>
Date: Wed, 11 Oct 2000 16:06:32 GMT
Message-ID: <8s2362$ep9$1_at_nnrp1.deja.com>


Have you considered SQL*Plus?

Invoke it from the command line with:

   plus80w.exe userid/pssword_at_dbtnsentry @yourscript

where yourscript is something like:

   spool myjunk.spl;
   select * from user_objects;
   spool off;
   exit;

You can run this from an NT command file so can change to the correct directory for your system.

You will need to set various environment variables in the script file so the file does not contain superfluous messages, and you need to concatenate your selected columns with commas, etc etc etc.

Passing in variables? Hmm, not sure. But you can create the 'yourscript' file on-the-fly to include your parameters, before calling SQL*Plus.

In article <39E22A42.4FB9C9CB_at_commserv.ucsb.edu>,   Richard Allard <rallard_at_commserv.ucsb.edu> wrote:
> I need a Windows NT command line utility that will dump an Oracle
 7.3.2
> table to a
> tab delimited text file, with column headings included. I would like
 to
> pass the
> utility owner, table name, where clause, order by, and output file
 name,
> and have
> it write the file. I found DBMSCOPY, which works well interactively,
> but does not
> work in batch mode. I am a programmer, and I do have M$ Visual
 Studio,
> so I could
> write something, but I'm not very experienced with the DAO/ODBC stuff.
>
> Does anyone have code examples or suggestions for products that will
 do
> this?
>
> TIA
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 11 2000 - 18:06:32 CEST

Original text of this message