-
how to find the IP address of the Server ?
Hello all..
How can i find the IP address of the Server where the DB is currently hosted using SQL statements in 9i?...
Thanks in advance
Ron
-
Logged on to the server:
SELECT SYS_CONTEXT ('userenv', 'ip_address')
FROM DUAL;
-
Thanx, i known a new thing.
-
/** SELECT SYS_CONTEXT ('userenv', 'ip_address')
FROM DUAL; **/
I think it will give client ip address (not of the server hosting the db)
Thanks .
-
Originally posted by stecal
Logged on to the server:
SELECT SYS_CONTEXT ('userenv', 'ip_address')
FROM DUAL;
This gives you client IP address not the server.
You can get the hostname from v$instance. Just ping the host and you can get the IP adress if the hostame is resolved by DNS.
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
-
Is there any parameter can be passed to sys_context
to get the server ip address
Although we can get server ip address using tnsping
-
That is why I said "Logged on to the server."
-
how do you get the ip address by doing a tnsping ?...
i just did this, and i cant see the ipaddress of the server.
______________________________________________________________
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>tnsping heatprd9
TNS Ping Utility for 32-bit Windows: Version 9.0.1.3.1 - Production on 19-SEP-20
03 09:46:17
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
C:\ORACLE92\NETWORK\ADMIN\sqlnet.ora
C:\ORACLE92\NETWORK\ADMIN\tnsnames.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=pe.dpt.state.ny.us)(PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = heatprd9)))
OK (290 msec)
C:\>
__________________________________________
Thanks
Ron
-
-
If you are in a windoze environment just bring up a command prompt and type...
C:\ ipconfig
MH
I remember when this place was cool.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|