finding dataase server IP? [message #214602] |
Wed, 17 January 2007 04:12  |
amul
Messages: 252 Registered: April 2001 Location: Chennai
|
Senior Member |
|
|
hi
is it possible to find the database server IP and the port number through forms using any packages?
|
|
|
Re: finding dataase server IP? [message #214659 is a reply to message #214602] |
Wed, 17 January 2007 07:17  |
sameer_am2002
Messages: 129 Registered: September 2002
|
Senior Member |
|
|
Find IP-ADDRESS of the Client/Database
--------------------------------------
SYS_CONTEXT('USERENV','IP_ADDRESS'); returns the IP address of the client.
SELECT HOST_NAME into var FROM V$INSTANCE ; returns the hostname into var of the database
UTL_INADDR.get_host_address(a); returns the IP address of the database
But if you want to find the IP Address of the machine where the database
resides , you can make use of V$INSTANCE .This is found in the Sys schema .
( for 8i and 9.0 databases)
One should make a view on this and grant select privleges to the forms users .
( for security reasons).
|
|
|