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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Environment Variables inside Oracle Procedures?

Re: Environment Variables inside Oracle Procedures?

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 05 Sep 2007 15:35:55 -0700
Message-ID: <1189031750.425877@bubbleator.drizzle.com>


jobs wrote:
> Is it possible to access or grab environment variables inside Oracle
> Procedures?
>
> Thanks in advance for any help or information.
>
> We need to change an one of the directories in an http_util call based
> on whether we are pointing to prod vs dev.

You don't need environment variables to tell you that.

You can query instance and database name from gv$instance and gv$database. You can use DBMS_UTILITY.ACTIVE_INSTANCES to return instance information. You can use the SYS_CONTEXT function to return DB_NAME, DB_UNIQUE_NAME, HOST, and other information that would answer the question.

http://www.psoug.org/reference/sys_context.html and look up the others in Morgan's Library at www.psoug.org.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Wed Sep 05 2007 - 17:35:55 CDT

Original text of this message

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