Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: reading unix host variables within PL/SQL
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