메뉴 여닫기
개인 메뉴 토글
로그인하지 않음
만약 지금 편집한다면 당신의 IP 주소가 공개될 수 있습니다.

오라클 사용자 LOCK

DB CAFE
Dbcafe (토론 | 기여)님의 2024년 10월 1일 (화) 00:22 판 (새 문서: === 사용자 LOCK === <source lang=sql> ALTER USER XXAPP ACCOUNT LOCK; ALTER USER XXBAT ACCOUNT LOCK; </source> === 사용자 UNLOCK === <source lang=sql> ALTER USER XXXAPP ACCOUNT UNLOCK; ALTER USER XXXBAT ACCOUNT UNLOCK; </source> === 사용자 락/발생원인 유저 찾기 === <source lang=sql> select os_username,username, userhost, terminal , to_char(timestamp, 'YYYY/MM/DD HH24:MI:SS') date_time , to_char(extended_timestamp, 'YYYY/MM/DD HH24:MI:SS') ext_date_ti...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

사용자 LOCK

ALTER USER XXAPP ACCOUNT LOCK;
ALTER USER XXBAT ACCOUNT LOCK;

사용자 UNLOCK

ALTER USER XXXAPP ACCOUNT UNLOCK;
ALTER USER XXXBAT ACCOUNT UNLOCK;

사용자 락/발생원인 유저 찾기

select os_username,username, userhost, terminal
     , to_char(timestamp, 'YYYY/MM/DD HH24:MI:SS') date_time
     , to_char(extended_timestamp, 'YYYY/MM/DD HH24:MI:SS') ext_date_time
     , action_name
     , returncode
     , case when returncode = '1017' then 'invalid username/password..'
             when returncode = '28000' then 'account is locked' 
             end returncode_why
from dba_audit_session 
where action_name = 'LOGON'
  and returncode in (1017, 28000) -- returncode 1017(invalid username/password ... ), 28000 (the account is locked)
  and timestamp > trunc(sysdate)
--  and username = '디비계정'
order by date_time desc;