DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: how to find the IP address of the Server ?

  1. #1
    Join Date
    Oct 2002
    Posts
    284

    how to find the IP address of the Server ?

    Hello all..

    How can i find the IP address of the Server where the DB is currently hosted using SQL statements in 9i?...

    Thanks in advance
    Ron

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Logged on to the server:

    SELECT SYS_CONTEXT ('userenv', 'ip_address')
    FROM DUAL;

  3. #3
    Join Date
    Jun 2003
    Posts
    108
    Thanx, i known a new thing.

  4. #4
    Join Date
    Jan 2003
    Location
    Delhi
    Posts
    63
    /** SELECT SYS_CONTEXT ('userenv', 'ip_address')
    FROM DUAL; **/

    I think it will give client ip address (not of the server hosting the db)



    Thanks .

  5. #5
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Originally posted by stecal
    Logged on to the server:

    SELECT SYS_CONTEXT ('userenv', 'ip_address')
    FROM DUAL;
    This gives you client IP address not the server.
    You can get the hostname from v$instance. Just ping the host and you can get the IP adress if the hostame is resolved by DNS.
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  6. #6
    Join Date
    Jan 2003
    Location
    Delhi
    Posts
    63
    Is there any parameter can be passed to sys_context
    to get the server ip address
    Although we can get server ip address using tnsping

  7. #7
    Join Date
    May 2002
    Posts
    2,645
    That is why I said "Logged on to the server."

  8. #8
    Join Date
    Oct 2002
    Posts
    284
    how do you get the ip address by doing a tnsping ?...

    i just did this, and i cant see the ipaddress of the server.

    ______________________________________________________________
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\>tnsping heatprd9

    TNS Ping Utility for 32-bit Windows: Version 9.0.1.3.1 - Production on 19-SEP-20
    03 09:46:17

    Copyright (c) 1997 Oracle Corporation. All rights reserved.

    Used parameter files:
    C:\ORACLE92\NETWORK\ADMIN\sqlnet.ora
    C:\ORACLE92\NETWORK\ADMIN\tnsnames.ora

    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=pe.dpt.state.ny.us)(PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = heatprd9)))
    OK (290 msec)

    C:\>

    __________________________________________

    Thanks
    Ron

  9. #9
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    ping, not tnsping

  10. #10
    Join Date
    Jan 2001
    Posts
    3,134
    If you are in a windoze environment just bring up a command prompt and type...


    C:\ ipconfig


    MH
    I remember when this place was cool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width