Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL question
In article <941t97$cpp$1_at_news.mch.sbs.de>,
"Jorge" <jjfernando_at_elasa.siemens.es> wrote:
> Hello:
>
> Could you help me with the next PL/SQL question ?
>
> I need to read enviroment variables from a PL/SQL program.
> This PL/SQL program is a stored procedure in a Oracle database.
>
> How could I do it ?
>
> Thanks in advance
> Bye.
> Jorge
>
To read OS environment variables via a stored pl/sql procedure would
probably require you to resort to using an external procedure or
perhaps java code. I believe that java has access to certain
environment features, such as you can get the IP address of the client
process in java.
Depending on what you actually need to know there are a couple of tricks you might be able to use without resorting to using an external procedure. If the OS environment variables are for the db server or the same for all clients you could create an OS process that writes the variables to a file and then use the utl_file package to read this file. The client application could also be designed pass these variables into Oracle using the dbms_application_info package message area or anonymous transactions into a OS session variable table on startup.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/Received on Wed Jan 17 2001 - 08:46:17 CST