Solved

to find ip address

Posted on 2014-02-25
9
352 Views
Last Modified: 2014-03-04
How will we find the ip address for this machine

nyspcor01g[oracle:coreaux1]

This is sunsolaris
0
Comment
Question by:thomasliju
9 Comments
 
LVL 19

Expert Comment

by:helpfinder
ID: 39885835
try to use ping command.
ping nyspcor01g
if nyspcor01g is a hostname you should get back recolved IP
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 total points
ID: 39885836
Try:
ifconfig -a
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 250 total points
ID: 39885849
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Expert Comment

by:Shahnawaz Ahmed
ID: 39885868
Dear thomasliju,


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

ifconfig -a  

cat /etc/hosts | grep <server_name>
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 39885877
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
 

Author Comment

by:thomasliju
ID: 39886322
This is good for any servers..
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39886328
thomasliju,

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now