?
Solved

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

Posted on 2009-04-06
3
Medium Priority
?
1,208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 1500 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Suggested Courses

764 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