Re: How to get user's IP address?
Anne, I use database triggers to capture system events and send me email. I use the Event Attributes, though I've not captured IP address. My 8.1.7 docs say that you should use ora_client_ip_address, though it looks like that Attribute is only available in an After Logon Event, so you'd need to capture it in a PL/SQL packaged variable or a Global Temporary Table for the duration of the session. You can find info. on the Event Attributes in Chapter 13, Working with System Events, in Oracle8i Application Developer's Guide - Fundamentals. Hope this helps. Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929 (pager) [EMAIL PROTECTED] Anne Yu [EMAIL PROTECTED]To: Multiple recipients of list ORACLE-L .us [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED]Subject: How to get user's IP address? .com 06/24/2003 04:25 PM Please respond to ORACLE-L I want log changes when a user makes a change to a view, proc, func, package, etc. Basically, I have a trigger to capture the date, schema name and computer name or IP address. However, I could not get the IP address or host name out of Oracle.Can anyone help? E.g. Query: Select sys_context('USERENV','IP_ADDRESS') from v_$session; Return NOTHING :( Many thanks -- Author: Anne Yu INET: [EMAIL PROTECTED] -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: How to get user's IP address?
Hi Anne I tried this on 9iR1 oracle:jupiter sqlplus system/manager SQL*Plus: Release 9.0.1.0.0 - Production on Wed Jun 25 20:45:54 2003 (c) Copyright 2001 Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production With the Partitioning option JServer Release 9.0.1.0.0 - Production SQL select sys_context('userenv','ip_address') ip,username,machine 2 from v$session 3 where sys_context('userenv','sessionid')=audsid; IP USERNAME -- MACHINE SYSTEM jupiter SQL connect system/[EMAIL PROTECTED] Connected. SQL / IP USERNAME -- MACHINE 172.16.240.11 SYSTEM jupiter SQL It looks like you need to use the service name when connecting to get the IP Address. hth kind regards Pete Basically, I have a trigger to capture the date, schema name and computer name or IP address. However, I could not get the IP address or host name out of Oracle.Can anyone help? -- Pete Finnigan email:[EMAIL PROTECTED] Web site: http://www.petefinnigan.com - Oracle security audit specialists Book:Oracle security step-by-step Guide - see http://store.sans.org for details. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Pete Finnigan INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: How to get user's IP address?
Hi! It looks like you need to use the service name when connecting to get the IP Address. Could it be because you can't have an IP address when using protocol other than TCP/IP ;) Connecting using just ORACLE_SID goes through IPC (or Beq if you like) Tanel. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Tanel Poder INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: How to get user's IP address?
This is probably related to the protocol that your client uses to connect to the Oracle server. If you use Bequeth or Netware for instance, there really isn't an IP address to speak of. -Original Message- Sent: Wednesday, June 25, 2003 4:58 PM To: Multiple recipients of list ORACLE-L Hi Anne I tried this on 9iR1 oracle:jupiter sqlplus system/manager SQL*Plus: Release 9.0.1.0.0 - Production on Wed Jun 25 20:45:54 2003 (c) Copyright 2001 Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production With the Partitioning option JServer Release 9.0.1.0.0 - Production SQL select sys_context('userenv','ip_address') ip,username,machine 2 from v$session 3 where sys_context('userenv','sessionid')=audsid; IP USERNAME -- MACHINE SYSTEM jupiter SQL connect system/[EMAIL PROTECTED] Connected. SQL / IP USERNAME -- MACHINE 172.16.240.11 SYSTEM jupiter SQL It looks like you need to use the service name when connecting to get the IP Address. hth kind regards Pete Basically, I have a trigger to capture the date, schema name and computer name or IP address. However, I could not get the IP address or host name out of Oracle.Can anyone help? -- Pete Finnigan email:[EMAIL PROTECTED] Web site: http://www.petefinnigan.com - Oracle security audit specialists Book:Oracle security step-by-step Guide - see http://store.sans.org for details. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Rudy Zung INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).