Solved

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

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

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
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
Comment Utility
thk you!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
STDEVP in SQL 2 32
SQL Server R2 Stored procedure make faster 7 31
SQL Retrieve Values 4 37
Oracle Next Available Number 2 8
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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…
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 shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now