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: Finn Ellebaek Nielsen <ellebuk_at_post3.tele.dk>
Date: 1997/06/23
Message-ID: <33AEB1A6.78F@post3.tele.dk>#1/1

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

And how would you read an environment variable from a stored procedure written in PL/SQL?

Cheers,

Finn

-- 
--------------------------------------------------------------------------------
 Finn Ellebaek Nielsen          Oracle Associated Senior Consultant
 Ellebaek Consulting            E-mail:           ellebuk_at_post3.tele.dk
 Niels Ebbesens Vej 9, 3. th.   Mobile Phone:     +45 20 32 49 25
 DK-1911  Frederiksberg C       Mobile Phone SMS: 20324925_at_sms.tdm.dk (Subject)
 Denmark                        Private Phone:    +45 33 25 34 50
--------------------------------------------------------------------------------
 "Life is a beach and then you dive"                      "Divers do it deeper"
Received on Mon Jun 23 1997 - 00:00:00 CDT

Original text of this message

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