Database Administration (MOSC)

MOSC Banner

How to get the IP address of database server in 12c.

edited Oct 5, 2018 5:02AM in Database Administration (MOSC) 8 commentsAnswered

Hi all,

I have the client application and configured tnsname.ora with lot of service names

<PDB>_01=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.x)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=Db_name_01)))

<PDB>_02=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=y.y.y.y)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=Db_name_02)))

........

From this client, I can connect to remote databases successfully by sqlplus user1/abc123@<tns_service_name>.

I want to get the IP address of database server from this tns_service_name by SQL or PL/SQL after connection successfully. Are there methods to get IP address of database server from client machine like this situation?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center