Finding IP address of sessions
I want to find out the IP address of the sessions. Basically I have to find out from my audit tables which are the login failure and its IP address. My report should be as follows: os_username, oracleusername, ip_addr, date of login, date of logoff.
The SYS_CONTEXT function can be used to determine the IP address of the machine that connected to the Oracle database. For example:
SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM dual;
Keep in mind that the IP address returned is from the machine that connected to the database. If you are using a middle tier (for example, a Web server) the IP address returned will be the one of that middle tier and not of the end user. More information on SYS_CONTEXT can be found here.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our Oracle Database / Applications experts
View all Oracle Database / Applications questions and answers
Start the conversation
0 comments