• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

to find ip address

How will we find the ip address for this machine

nyspcor01g[oracle:coreaux1]

This is sunsolaris
0
thomasliju
Asked:
thomasliju
2 Solutions
 
helpfinderIT ConsultantCommented:
try to use ping command.
ping nyspcor01g
if nyspcor01g is a hostname you should get back recolved IP
0
 
slightwv (䄆 Netminder) Commented:
Try:
ifconfig -a
0
 
omarfaridCommented:
you may run the command

ifconfig -a

which will show you the network interfaces and their IPs

OR

you could run

grep `hostname` /etc/hosts

OR

nslookup `hostname`
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Shahnawaz AhmedTechnical Services SpecialistCommented:
Dear thomasliju,


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

ifconfig -a  

cat /etc/hosts | grep <server_name>
0
 
sdstuberCommented:
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
0
 
thomaslijuAuthor Commented:
This is good for any servers..
0
 
slightwv (䄆 Netminder) Commented:
thomasliju,

Can you explain why you accepted the post you did? ifconfig and /etc/hosts had both been posted previously.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now