Solved

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

Posted on 2009-04-06
3
1,196 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 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
UPDATE JOIN multiple tables 5 34
TNS timeout - "Error-2147467259 ORA-12170: TNS Connect timeout occurred” 10 72
T-SQL: Only Wanting One Record 8 59
Oracle Join issue. 3 46
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
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
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

737 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