Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Spool file to local machine

Re: Spool file to local machine

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Wed, 11 Oct 2006 16:45:46 GMT
Message-ID: <J6zD8E.ADy@igsrsparc2.er.usgs.gov>


Songs wrote:
> Just wondering if I can spool file to my local machine when I am using
> Oracle Sql Developer.
> When I ran the script and got this error message:
>
> Unable to open file: "C:\countall.txt"
>
> here is the script:
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> set termout off echo off feed off trimspool on head off pages 0
>
> spool countall.txt
> select 'SELECT count(*), '''||table_name||''' from '||table_name||';'
> from user_tables
> /
> spool off
>
> set termout on
> @@countall.txt
>
> set head on feed on
> ~~~~~~~~~~~~~~~~~~~~~~~~
> Please advice.
> Thanks,
> Bill
>

The SET and SPOOL commands that you have above are SQL*Plus commands, which mean very little to SQL Developer.

In SQL Developer, you can run your script (F5) and see the results in the Script Output tab. And from that tab, you can save the output. Otherwise, I have yet to see anything in SQL Developer which lets you automatically spool the output to a file.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Wed Oct 11 2006 - 11:45:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US