The USERENV
application context is a built-in context that contains information about the current session. In this recipe, you'll learn to retrieve values from built-in contexts.
To complete this recipe, you'll need an existing user who can get values from built-in namespaces by using the SYS_CONTEXT
function (for example, user maja
).
Connect to the database as a user who has appropriate privileges (for example, user
maja
):$ sqlplus maja
Find the name of host machine from which the client has connected to the database.
Find the name of the user who logged on to the database.
Find the name of the program used for the database session.
Find unified audit session ID.