Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Spool file to local machine
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" - UnknownReceived on Wed Oct 11 2006 - 11:45:46 CDT
![]() |
![]() |