oracle

Monday, 24 April 2017

SQL: Unlock User account

In database, either we should have to unlock user account or user schema during installation, Or We can unlock the user schema using cmd or sqlplus
First of all connect with database as sysdba with sys user.
By using cmd:
C:\> sqlplus sys/oracle as sysdba
connected to:
(edition detail)
SQL>





SQL> alter  user scott identified by tiger user unlock;
user altered.



In above query, alter is keyword used to change, here used to change user, user is also keyword, scott is name of user or schema, identified by is keyword used for password, tiger is password for scott schema unlock is instruction for alter query.
we can lock or unlock  user by using above query,
To lock user, just write above query as
SQL> alter user account scott identified by tiger account lock;
user altered.
Now account is locked.

2 comments:

  1. yar acha likhta ho
    english achi ha

    ReplyDelete
  2. hHHhHahahah. Health Magazine English e check krna. Query sa apka kia kam. is sa health theeek ni hoti.

    ReplyDelete