ORA-28000: the account is locked (Oracle 사용자 계정 잠금상태 풀어주기)

Oracle DB

Oracle 사용자의 계정 잠김이 발생 하는 원인과 해결 방법에 대해 정리해 보았습니다.

조사 환경

이 글은 다음 환경에서 확인했습니다.

  • Oracle DB서버 설치 Linux 컴퓨터
    • OS : Linux 7
    • IP Address(예) : 192.168.220.128
  • Oracle 클라이언트 설치 Windows컴퓨터
    • OS : Windows 10 Enterprise
    • IP Address(예) : 192.168.220.129

문제 발생 예시

Linux 환경에서 작업

sqlplus를 실행하는 Oracle 클라이언트와 Oracle DB서버가 같은 컴퓨터이면 “@접속문자열” 를 지정할 필요가 없습니다. 다음 예문은 로컬 접속을 했을 때의 Oracle 사용자의 계정 잠김 오류를 보여주고 있습니다.

[oracle@localhost ~]$ sqlplus scott/tiger
 SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 30 14:48:15 2021
 Copyright (c) 1982, 2014, Oracle.  All rights reserved.
 ERROR:
 ORA-28000: the account is locked
 Enter user-name: 

Windows 환경에서 작업

다음은 Windows 10 OS에 설치된 Oracle 클라이언트에서 Linux서버 OS에 설치된 Oracle DB서버를 접속 했을 때의 Oracle 사용자의 계정 잠김 오류를 보여주고 있습니다.

C:\>sqlplus scott/tiger@192.168.127.128/orcl
 SQL*Plus: Release 12.2.0.1.0 Production on Sat Jan 30 15:08:32 2021
 Copyright (c) 1982, 2016, Oracle.  All rights reserved.
 ERROR:
 ORA-28000: the account is locked
 Enter user-name:

잠금 해제하기

다음은 Oracle 사용자의 계정 잠김 오류 Windows예시에 대한 잠금 해제 설명입니다..

ALTER USER scott ACCOUNT UNLOCK” SQL문을 실행하면 잠금(locked)상태의 Oracle 사용자는 잠금 해제(unlocked)상태로 바뀝니다. sys/manager 우선 관리자(계정 잠금,해제 권한을 소유한 사용자)로 Oracle DB에 접속해야 합니다.

C:\>sqlplus sys/manager@192.168.127.128/orcl as sysdba
 SQL*Plus: Release 12.2.0.1.0 Production on Sat Jan 30 15:47:32 2021
 Copyright (c) 1982, 2016, Oracle.  All rights reserved.
 Connected to:
 Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
 SQL> ALTER USER scott ACCOUNT UNLOCK;
 User altered.
 SQL> exit
 Disconnected from Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
 

잠금(locked)상태이었던 Oracle 사용자로 다시 접속을 시도해 다음과 같이 성공한다면 잠금 해제(unlocked)상태로 바뀌었음을 확신할 수 있습니다.

C:\>sqlplus scott/tiger@192.168.127.128/orcl
 SQL*Plus: Release 12.2.0.1.0 Production on Sat Jan 30 15:49:00 2021
 Copyright (c) 1982, 2016, Oracle.  All rights reserved.
 Last Successful login time: Sat Jan 30 2021 14:47:15 +09:00
 Connected to:
 Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
 SQL>

오라클 사용자 잠금 원인

ORA-28000: the account is locked” 오류의 원인으로는 다음과 같은 이유를 들 수 있습니다.

  1. Oracle 서버를 디폴트로 설치할 경우 Oracle User의 일부는 잠금(locked)상태로 만들어 집니다.
  2. Oracle 서버를 설치 할 때 관리자(계정 잠금/해제 권한을 소유한 사용자)가 의도적으로 사용할 수 없도록 잠글 수 있습니다.
  3. FAILED_LOGIN_ATTEMPTS에 설정되어 있는 로그인 실패 제한 횟수를 넘어서 계정이 잠길 수 도 있습니다.
제목과 URL을 복사했습니다