Oracle DBA Tutorial 9 - How to Lock and Unlock an user in Oracle database

Published: 05 June 2022
on channel: Chirags Tutorial
256
4

[email protected] Chirag's Oracle DBA Tutorial https://www.chirags.in
*****************************************************************************************
How to lock and Unlock an user in Oracle database *
*****************************************************************************************
To temporarily deny access to the database for a particular user account, you can lock the user account.

Steps: ---
1. Login to your Oracle Database. (sqlplus / as sysdba) from command line.

2. run the below commands.
Get the list of username, account_status, created, lock_date and expiry_date.
SQL⇒ SELECT username, account_status, created, lock_date, expiry_date FROM dba_users;

lets consider the account of "chirag".
for more conditon.
(WHERE account_status != 'OPEN';)

Now lock the user account (Here i am locking account of chirag.)
SQL⇒ alter user chirag account lock;

User altered.

Again the get list of username, account_status, created, lock_date and expiry_date. And check chirag account is locked or not ??
SQL⇒ SELECT username, account_status, created, lock_date, expiry_date FROM dba_users;

CHIRAG LOCKED 15-AUG-19 03-SEP-19 29-FEB-20

now chirag account is unlock from below command
example : alter user username identified by password account unlock;
SQL⇒ alter user chirag identified by chirag account unlock;

User altered.

Again the check list of username, account_status, created, lock_date and expiry_date. And check chirag account is open or not ??
SQL⇒ SELECT username, account_status, created, lock_date, expiry_date FROM dba_users WHERE account_status != 'OPEN';

CHIRAG OPEN 15-AUG-19 01-MAR-20


Note : Flow the Process shown in video.

😉Subscribe and like for more videos:
   / @chiragstutorial  
💛Don't forget to, 💘Follow, 💝Like, 💖Share 💙&, Comment

Tutorial Link :
https://www.chirags.in/tutorials/orac...

Thanks & Regards,
Chitt Ranjan Mahto "Chirag"
_________________________________________________________________________________________
Note: All scripts used in this demo will be avilable in our website.
Link will be available in description.

#oracle
#oracletutorial
#chiragstutorial
#chiragsdatabasetutorial
#oracledatabase
#chiragsdbatutorial
#databasetutorial
#bestDatabaseTutorial
#oracletutorialchirags


Watch video Oracle DBA Tutorial 9 - How to Lock and Unlock an user in Oracle database online without registration, duration hours minute second in high quality. This video was added by user Chirags Tutorial 05 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 256 once and liked it 4 people.