From the course: Learning Oracle Database 19c

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Lock a user account

Lock a user account

- [Narrator] Quite often, you don't want to drop a user account but, instead, want to prevent logins either temporarily or indefinitely. I'm going to review three scenarios where you will lock a user account either right away or later. Or, perhaps you never want a user to log in, but you still want the user account with the associated schema. In the first scenario, I'm creating a new user account with a password, but the account is locked so that the user can't log in, even if they knew the password. This may be due to corporate policy. The DBA can create the user account ahead of time but locks it initially until the user's first day on the job. In the second scenario, the DBA is seeing suspicious activity on a specific user account whose owner is on vacation this week. I explicitly lock the user account with the alter user command. The output from running the alter user command says that the BID user was altered. To confirm that the account is actually locked, I run a query against…

Contents