June 2016
Intermediate to advanced
388 pages
5h 49m
English
In this recipe, you'll learn to lock and unlock user accounts.
To complete this recipe, you'll need an existing (for example, OS-authenticated) user who has alter user privilege (you may use user who has a DBA role) and another existing user (for example, mike).
alter user privilege:
$ sqlplus /
mike:
SQL> alter user mike account lock;
mike:
SQL> alter user mike account unlock;
In step 1, you used OS authentication to connect to the database.
In step 2, you locked the account of user mike. This means that user mike cannot connect to the database:
SQL> alter user mike account lock; User ...Read now
Unlock full access