Hi 

I came across similar situation few months ago. You could do following in NT
environment.

1. Have the UTL_FILE write to a file in directory called 'printdir' (you can
name it whatever you like)
2. Write a NT Shell script to check for any file in 'printdir'. if there is
one, use 'print filename ' or 'copy xx lpt1:' or any other networked
printer.
3. Once file printing is complete, have the file moved to another directory
or delete it from 'printdir'
4. schedule a periodic job scheduler to execute NT shell script.

There are some permission requirements to for the scheduler to execute NT
shell script.

First test printing of file from the 'printdir' in command shell and then
incorporate same into shell script.

If you prefer, you could use shell command to schedule periodic execution of
shell script instead of job scheduler.

HTH

Shiva



-----Original Message-----
Sent: Monday, June 30, 2003 10:05 AM
To: Multiple recipients of list ORACLE-L


Hi

SPOOL OUT will only write the SQL*plus output to the default printer on
UNIX it is not implemented in SQL*plus for NT. 

You cannot do what you are trying to do below. UTL_FILE can only read
and write clear text files. I am not an expert on windows internals but
lpt1 is a device / port so should be some sort of device driver so i
guess it has a different file type. UTL_FILE probably does a check
internally to test if the file being opened is a text file. your best
bet is to use C to write an external procedure to do it, or perhaps pipe
the output from a text file to the printer externally. i.e use utl_file
to write to a file and have a batch job that runs every few minutes and
spools the file to the printer?

hth

kind regards

Pete

-- 
Pete Finnigan
email:[EMAIL PROTECTED]
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for
details.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Pete Finnigan
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Baswannappa, Shiva
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to