DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: How to find IP Address and Port No. from client connecting to Database

  1. #1
    Join Date
    Jan 2003
    Location
    bangkok
    Posts
    7

    How to find IP Address and Port No. from client connecting to Database

    I know some detail from v$session. but I want to know, which object i can select to find ip address and port no. from client connect to my database.

    Thanks,
    Kim.

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    you can only get port from listener.log

    you can get ip using sys_context functions

  3. #3
    Join Date
    Sep 2000
    Location
    Chennai, India
    Posts
    865
    You can get ip from listener.log...see snippet from log below...

    11-APR-2003 13:34:31 * (CONNECT_DATA=(SID=zap)(CID=(PROGRAM=D:\oracle\ora81\bin\Sqlplusw.exe)(HOST=SUN101)(USER=rgg))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.66.239)(PORT=4143)) * establish * zap * 0
    HTH.

  4. #4
    Join Date
    Jan 2003
    Location
    Hull, UK
    Posts
    220
    IP can be found out with this...

    select sys_context('userenv','ip_address') from dual;

    HTH

    SS

  5. #5
    Join Date
    Jan 2003
    Location
    bangkok
    Posts
    7

    I want to use select command. which table i select?

    Thank you, for every one

    Assume, I am DBA. How can I monitor by using select statement to view who,ip address, port no connect to my database.

    I use SQL Plus. If I use sys_context i will get my ip address. I want ip address from anyone connect to me, not my ip.

    becuase I will develop monitoring tool on web base. I can monitor from anywhere by web.

    How do I?

  6. #6
    Join Date
    Jan 2002
    Posts
    50
    dont u use following query
    select terminal,machine,username from v$session
    where username is not null

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