1Z0-052 · Question #2
Examine the command: SQL>ALTER USR skd ACCOUNT LOCK; Which two statements are true after the command is executed? (Choose two.)
The correct answer is A. The SKD user cannot log in to the database instance C. The other users can access the objects owned by the SKD user, on which they have access. Locking a user account in Oracle prevents that user from logging in but does not affect accessibility of the user's objects to other users who already have privileges on them.
Question
Examine the command:
SQL>ALTER USR skd ACCOUNT LOCK; Which two statements are true after the command is executed? (Choose two.)
Options
- AThe SKD user cannot log in to the database instance
- BThe objects owned by the SKD user are not accessible to any user
- CThe other users can access the objects owned by the SKD user, on which they have access
- DThe password for the SKD user expires and the user is forced to change the password at the next log in
How the community answered
(33 responses)- A88% (29)
- B9% (3)
- D3% (1)
Why each option
Locking a user account in Oracle prevents that user from logging in but does not affect accessibility of the user's objects to other users who already have privileges on them.
The ACCOUNT LOCK clause in ALTER USER sets the account status to LOCKED, which prevents the SKD user from establishing any new database session until the account is explicitly unlocked.
Account locking does not affect object-level privileges; objects owned by SKD remain accessible to any user who has been granted the appropriate privileges on those objects.
Account locking restricts only the account owner's ability to log in - it does not revoke previously granted privileges, so other users retain access to SKD's objects as long as they hold the appropriate grants.
ACCOUNT LOCK only blocks login access and does not expire the password - password expiration requires the separate PASSWORD EXPIRE option or a profile with a defined password lifetime.
Concept tested: Oracle user account locking vs object privilege accessibility
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-USER.html
Topics
Community Discussion
No community discussion yet for this question.