본문 바로가기

쓰기

Oracle에서 사용자Lock풀기

2021.09.27 02:04

이곤아이 조회 수:565

Oracle에서 Lock걸린 사용자 해제

 

  1. Oracle에서 사용자 정보 확인
    	SQL> select username,account_status from dba_users;
    	USERNAME                       ACCOUNT_STATUS
    	------------------------------ --------------------------------
    	EXFSYS                         EXPIRED & LOCKED
    	DMSYS                          EXPIRED & LOCKED
    	WMSYS                          EXPIRED & LOCKED
    	XDB                            EXPIRED & LOCKED
    	ORDPLUGINS                     EXPIRED & LOCKED
    	SI_INFORMTN_SCHEMA             EXPIRED & LOCKED
    	OLAPSYS                        EXPIRED & LOCKED
    	MDDATA                         EXPIRED & LOCKED
    	DIP                            EXPIRED & LOCKED
    	SCOTT                          EXPIRED & LOCKED
    	TSMSYS                         EXPIRED & LOCKED
    	TEST                           LOCKED
  2. lock된 test계정정보 수정
    	SQL> alter user test account unlock;
  3. unlock 정보 확인
    	SQL> select username,account_status from dba_users;
    	USERNAME                       ACCOUNT_STATUS
    	------------------------------ --------------------------------
    	MGMT_VIEW                      OPEN
    	SYS                            OPEN
    	SYSTEM                         OPEN
    	DBSNMP                         OPEN
    	SYSMAN                         OPEN
    	TEST                           OPEN
    	SCOTT                          EXPIRED
    	OUTLN                          EXPIRED & LOCKED
    	MDSYS                          EXPIRED & LOCKED
    	ORDSYS                         EXPIRED & LOCKED
    	CTXSYS                         EXPIRED & LOCKED
  4. 계정 패스워드 설정
    	SQL> ALTER USER test IDENTIFIED BY testuser!!!!;