nerdexam
Oracle

1Z0-116 · Question #77

You are Implementing a security policy that makes use of the USERENV namespace. Which USERRENV value does not change for the duration of a session?

The correct answer is A. SESSION_CSER. SESSION_USER (shown here as SESSION_CSER, likely a formatting artifact) is set at the moment of database authentication and remains fixed for the entire session. Because it reflects who logged in, nothing in the session - not privilege changes, schema switches, or application…

Configuring and Auditing User Security

Question

You are Implementing a security policy that makes use of the USERENV namespace. Which USERRENV value does not change for the duration of a session?

Options

  • ASESSION_CSER
  • BCURRENT_OSER
  • CCURRENT SCHEMA
  • DCLIENT_INFO

How the community answered

(23 responses)
  • A
    96% (22)
  • D
    4% (1)

Explanation

SESSION_USER (shown here as SESSION_CSER, likely a formatting artifact) is set at the moment of database authentication and remains fixed for the entire session. Because it reflects who logged in, nothing in the session - not privilege changes, schema switches, or application code - can alter it, making it the only stable anchor in the USERENV namespace.

Why the distractors are wrong:

  • B. CURRENT_USER - Changes when invoking stored procedures that run under a definer's rights, or when application code elevates privileges mid-session.
  • C. CURRENT_SCHEMA - Can be explicitly changed at any point with ALTER SESSION SET CURRENT_SCHEMA, so it is not stable.
  • D. CLIENT_INFO - Designed to be written and overwritten at will by DBMS_APPLICATION_INFO.SET_CLIENT_INFO, so it changes frequently in instrumented applications.

Memory tip: Think of SESSION_USER as your passport - it's checked once at the border (login) and doesn't change no matter what role you play inside the country. The other values are more like name badges you can swap out once you're already in.

Topics

#USERENV namespace#session context#SESSION_USER#session attributes

Community Discussion

No community discussion yet for this question.

Full 1Z0-116 Practice