Solved

How to access a environment variable using Oracle SQL script (Stored procedure)

Posted on 2009-04-06
3
1,191 Views
Last Modified: 2013-12-18
I have a requirement to obtain the value of a environment variable to differentiate between test and production server and use that as an input for a compiled stored procedure. The client is a windows 2003 server from where i need to take the env variable. the server is a hp-ux server. I don't have access to oracle sys login.

Pls assist. I read some approach, but not sure if it suits my requirements.

0
Comment
Question by:Venkatkp007
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 24083227
what is the environment variable?

do you simply need to know the host server?

select host_name from v$instance

or

select sys_context('userenv','host') from dual
0
 

Author Closing Comment

by:Venkatkp007
ID: 31567295
thk you!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question