IP address - how to find.. [message #129135] |
Fri, 22 July 2005 02:04 |
vgs2005
Messages: 123 Registered: April 2005
|
Senior Member |
|
|
I'm not a dba, and knows very little on db... so please help.
We have a box we refer to as CHI801. That's the db server, I guess.
Through logging in to one of the databases in CHI801 using SQLPlus, I was able to verify the server name through:
select machine from v$session where schemaname = 'SYS';
Is there a way I can know the ip address of this box?
By the way, is CHI801 an alias to make it easier to refer to the server, instead of referring to it using the IP address?
please enlighten...
thanks..
|
|
|
Re: IP address - how to find.. [message #129142 is a reply to message #129135] |
Fri, 22 July 2005 02:49 |
sunil_v_mishra
Messages: 506 Registered: March 2005
|
Senior Member |
|
|
hi,
I m not getting what do u mean by box... but to be very honest if you want to know the ip address of the machine on which your database is present than conect to the server and there at dos prompt you type command as below
C:\>ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255
Default Gateway . . . . . . . . . : 192.168.0.1
now if u want to know ip address of the machine those who are connect to database server then on dos prompt u have to type command
C:\>netstat -n
Active Connections
Proto Local Address Foreign Address State
TCP 192.168.0.170:1338 203.81.51.210:12347 ESTABLISHED
TCP 192.168.0.170:1838 192.168.0.27:445 TIME_WAIT
TCP 192.168.0.170:2139 216.155.193.138:5050 ESTABLISHED
TCP 192.168.0.170:2503 192.168.0.17:139 ESTABLISHED
Note:- Most of time one machine is dedicated to oracle database only. So by command netstat -n .... We gets the foregin address of the user machine who are connected to the database server.
Please read help related to netstat command .
this the way u can get ip address of server and user machine those who r connect to the database through dos prompt.
From
Sunil
[Updated on: Fri, 22 July 2005 02:51] Report message to a moderator
|
|
|
Re: IP address - how to find.. [message #129162 is a reply to message #129142] |
Fri, 22 July 2005 04:36 |
vgs2005
Messages: 123 Registered: April 2005
|
Senior Member |
|
|
thanks Sunil for responding..
Actually, my problem is we have this database server box or machine. It has like 10 Oracle databases in it. We refer to it as CHI801 (it's in Chicago, US). I can verify that by logging into my local machine using SQL PLus as sys to one of the databases. With the query:
select machine from v$session where schemaname = 'SYS';
I can see the value of 'machine' column is 'CHI801'. However, I would like to know its IP address. Is there a way to know this without connecting to the server (say via telnet)? Actually, I do not have the password to the server, that's why... only thing is that I can log in to the database in it through SQL Plus..
|
|
|
Re: IP address - how to find.. [message #129241 is a reply to message #129135] |
Fri, 22 July 2005 11:47 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Have you tried the oracle os utility "tnsping" yet?
You can also get some information, although not sure if it is exactly what you are after but it may help, from the sys_context() function.
v$instance may have some info, like host_name, that you are after.
|
|
|
Re: IP address - how to find.. [message #129331 is a reply to message #129135] |
Sun, 24 July 2005 04:00 |
shad
Messages: 50 Registered: October 2000
|
Member |
|
|
If understand your question you just need to know the IP address of the machine without connecting to it via tools such as telnet, etc.
It is simple since you know the host name (CHI801).
Just use the 'ping' utility not the 'tnsping'
---------------------------------------------------------
Use ping hostname (in your case ping CHI801)
-- Ping CHI801 may bring results such as the following:
Pinging CHI801 [10.9.1.23] with 32 bytes of data:
Reply from 10.9.1.23: bytes=32 time=14ms TTL=251
Reply from 10.9.1.23: bytes=32 time=26ms TTL=251
Reply from 10.9.1.23: bytes=32 time=14ms TTL=251
Reply from 10.9.1.23: bytes=32 time=13ms TTL=251
Ping statistics for 10.3.48.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 13ms, Maximum = 26ms, Average = 16ms
----------------------------------------------
I hope this helps
Regards
Shad
|
|
|
Re: IP address - how to find.. [message #129626 is a reply to message #129331] |
Tue, 26 July 2005 00:50 |
vgs2005
Messages: 123 Registered: April 2005
|
Senior Member |
|
|
thanks all..
I tried Ping CHI801 but it said 'unknown host CHI801'.
Then tried tnsping CHI801 but said 'Failed to resolve name'..
I learned from a coleague that I need a so-called 'Security token' id..
Actually, I wonder why is it that I can connect to the databases inside that machine, but cannot get the IP address just by pinging - but instead should have that 'Security token' id..
.. ok.. i think i will just have to wait for the issuance of that id.. thanks again..
|
|
|
|