Q
Problem solve Get help with specific problems with your technologies, process and projects.

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.

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.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close