Link to home
Start Free TrialLog in
Avatar of thomasliju
thomasliju

asked on

to find ip address

How will we find the ip address for this machine

nyspcor01g[oracle:coreaux1]

This is sunsolaris
Avatar of helpfinder
helpfinder
Flag of Slovakia image

try to use ping command.
ping nyspcor01g
if nyspcor01g is a hostname you should get back recolved IP
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dear thomasliju,


You will find by the below 2 commands, give a try now

ifconfig -a  

cat /etc/hosts | grep <server_name>
Avatar of Sean Stuber
Sean Stuber

Since the question was originally posted in the Oracle Database topic area, I'll assume you want an Oracle solution as well.

use the UTL_INADDR package


select UTL_INADDR.get_host_address('nyspcor01g') from dual;

Note, in 11g or higher databases you'll need an ACL that allows the RESOLVE privilege
Avatar of thomasliju

ASKER

This is good for any servers..
thomasliju,

Can you explain why you accepted the post you did? ifconfig and /etc/hosts had both been posted previously.