To get the instance:

select value from V$SYSTEM_PARAMETER
where name='db_name';

or

select value from V$SYSTEM_PARAMETER
where name='instance_name';

Beware that the typical user doesn't have access to that table, so you might
need to ask the dba for select access, or better still, write a stored
function that returns a parameter value given the input name.

I don't know why you would want the host, and I don't know how to directly
get it from Oracle. But consider: I use a parameter table to store hooks to
needed system services. For example, I use Oracle to send email
notifications, and Oracle needs to know the identity of the SMTP server for
that.

Alternatively, it might make sense for you to use JNDI to gain access to
needed system services. If messaging is the game, consider JMS.

Hope that helps,
Dave

-----Original Message-----
From: kabalieswaran D [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 31, 2001 4:11 AM
To: [EMAIL PROTECTED]
Subject: urget


 hi
 i want to know

how to find out the oracle host,sid, during the
runtime
 most urget

from
kabas

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to