Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Environment Variables inside Oracle Procedures?
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.orgReceived on Wed Sep 05 2007 - 17:35:55 CDT
![]() |
![]() |