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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL question

Re: PL/SQL question

From: <pehaw_at_my-deja.com>
Date: Wed, 17 Jan 2001 15:23:39 GMT
Message-ID: <944ddj$vnv$1@nnrp1.deja.com>

what about the getvar procedure in the tool_env package:

"This procedure provides a way to import an environment variable into a VARCHAR2 variable.

Example:

Suppose you have a procedure that needs the current user's userid. You could include the following PL/SQL statement using TOOL_ENV.GETVAR:

TOOL_ENV.GETVAR('USER', :userid);"

In article <944b7n$toe$1_at_nnrp1.deja.com>,   Mark D Powell <markp7832_at_my-deja.com> wrote:
> 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/
>

Sent via Deja.com
http://www.deja.com/ Received on Wed Jan 17 2001 - 09:23:39 CST

Original text of this message

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