1Z0-062 · Question #333
Your database is open in read/write mode and multiple users are connected to the database instance. You execute the following command: SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; What would be the…
The correct answer is B. They are not affected. Executing ALTER SYSTEM ENABLE RESTRICTED SESSION prevents new connections from users without the RESTRICTED SESSION privilege but does not affect existing, active database sessions.
Question
Your database is open in read/write mode and multiple users are connected to the database instance. You execute the following command:
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; What would be the effect on current sessions?
Options
- AThey are not terminated but may only issue queries.
- BThey are not affected.
- CThey are terminated immediately.
- DThey are terminated after completing the transaction.
How the community answered
(26 responses)- B96% (25)
- C4% (1)
Why each option
Executing `ALTER SYSTEM ENABLE RESTRICTED SESSION` prevents new connections from users without the RESTRICTED SESSION privilege but does not affect existing, active database sessions.
Existing sessions are not restricted to only issuing queries; they continue to operate with their granted privileges.
The `ALTER SYSTEM ENABLE RESTRICTED SESSION` command is designed to prevent new user sessions from connecting to the database unless those users have been granted the `RESTRICTED SESSION` privilege. It specifically does not terminate or restrict any user sessions that are already established and active when the command is executed, allowing them to continue their operations normally.
The command does not immediately terminate active sessions; it only influences subsequent connection attempts.
Existing sessions are not terminated at all by this command, regardless of their transaction status.
Concept tested: Oracle restricted session mode behavior
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SYSTEM.html#GUID-2675CC4C-5B63-455E-A27E-58728F2A0E18
Topics
Community Discussion
No community discussion yet for this question.