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

Home -> Community -> Usenet -> c.d.o.server -> Re: reading unix host variables within PL/SQL

Re: reading unix host variables within PL/SQL

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1997/06/24
Message-ID: <5oodmb$8c7@camelot.dsccc.com>#1/1

I gave the simple answer to the simple question. The harder answer to your harder question is:

	 write a deamon which waits on a dbms_pipe message
	 and returns the answer in the pipe.

The stored procedure would talk to the deamon via the pipe.

Not that the deamon and pipe code is hard to do, but getting the Security Group to grant you access to dbms_pipe and the System Administration Group to let you install the deamon on their machines. :)

Finn Ellebaek Nielsen (ellebuk_at_post3.tele.dk) wrote:
: And how would you read an environment variable from a stored procedure written
: in PL/SQL?
 

: Cheers,
 

: Finn

: John Strange wrote:
: >
: > You could spool the host commands to create a select statement into
: > a sql file, then run the sql file.
: >
: > This is untested. You will have to play with the "'s to get them right.
: > Once it works you could then rewrite it to create a cursor.
: >
: > set pagesize 0
: > spool /tmp/a.com
: > select "echo ""select \""$LOGNAME\"" from dual;"" > /tmp/a.sql" from dual ;
: > spool off
: > host (". /tmp/a.com") ;
: > @/tmp/a.sql
: > host ("rm /tmp/a.com /tmp/a.sql") ;
: >
: > rob joss (rob_joss_at_lilly.com) wrote:
: > : I have not been able to find a way of reading unix host variables from
: > : either SQLPLUS or within PL/SQL.
 

: > : Does anyone how to do this?
 

: > : Thanks

--
This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Tue Jun 24 1997 - 00:00:00 CDT

Original text of this message

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