Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SPOOL OUT dosn't work in SQLPLUS 1

Status
Not open for further replies.

mikhailwaxman

Programmer
Nov 12, 2000
23
0
0
US
I'm trying to use SPOOL filename -- SPOOL OUT in SQLPLUS but it dos'nt work. OS- WINDOWS 2000 Pro and Oracle 8i. I decide reason maybe i didn't set up printer to print from DOS application. So I check windows2000 and find solution for setting printer for DOS Application (net use command).Solution work for DOS application EXCEPT SQLPLUS.
THERE IS NO ERROR MESSAGE. Of curse I can use HOST in SQLPLUS (HOST COPY <file> LPT1:). I tryed even find with HEX Editor printer name in SQLPLUS And I see only /PRN.../COM1 .../COM2.
The problem doesn't relate to Windows2000. The same behavior on my home computer with Windows98.
 
I use Sqlplus, starting with version 3 and up to the Oracle 9i client. On various Windows platforms, Windows 3.11 to Windows 2k Pro. No problems spooling. This spooling has noting to do with printing, it merely produces a text file in the path and file name you designate. Printing is a separate operation.

I do know that sqlplus can be somewhat cranky. It does not tolerable spaces in a file name or path. If spaces are present, I use double quotes to get around the problem.

Thus,

SPOOL &quot;C:\Temp Dir\Sql Output\Myquery.txt&quot;

should work just fine. Same goes when loading a file:

@&quot;C:\Program Files\Sql\Myquery.Sql&quot;

 
Yes! MY Problem is ONLY PRINTINTING. Acording to SQLPLUS manual SPOOL OUT closes SPOOL FILE AND send it to DEFAULT PRINTER.FIrst part(CLOSE FILE) works properly,second one - dos'nt. I'm interesting to print directly from SQLPLUS. Of course I can open spooled file with TEXT EDITOR and print this file but why I shoud do that if there is option to print directly from SQLPLUS.
 
It looks as if you have run into a documented limitation of SQL*Plus in the Windows environment. In the SQL*Plus Getting Started Release 8.1.7 for Windows manual it says &quot;SQL*Plus does not support the use of the SPOOL OUT clause at the command line.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top