0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Oracle パスワード期限切れの解決

Last updated at Posted at 2020-10-12

エラーメッセージ

  • ORA-01017: ユーザー名/ パスワードが無効です。ログオンは拒否されました。

または

  • ORA-28000: アカウントがロックされています

解決方法

sysdba権限でSQL*Plusにアクセスして、ユーザーのパスワードを変更する。アカウントロックがかかっている場合はロックを解除してから変更する。

アカウントのステータス確認

select username , to_char(lock_date,'HH24:MI:SS'), account_status from dba_users;

<結果>

USERNAME
--------------------------------------------------------------------------------
TO_CHAR(LOCK_DAT
----------------
ACCOUNT_STATUS
----------------------------------------------------------------
EXPIRED(GRACE)

PTV

OPEN

MYDB
  • "OPEN"の部分が"LOCKED"になっている場合、アカウントがロックされているので、以下のSQLでロックを解除する。
ALTER USER [アカウント名] ACCOUNT UNLICKED;

パスワードの変更

ALTER USER [アカウント名] IDENTIFIED BY [新しいパスワード]

パスワード有効期間の延長

自分だけのローカル環境など、緩い管理でいい場合は下記SQLでパスワードの
有効期限を無期限化することも可能。

alter profile default limit password_life_time unlimited;

参考

メモ

自分だけの環境ならパスワードの有効期限を長期に変更したほうがよさそうだけど、まだそこまで調査・検証してない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?