Oracle 12cでアカウントをロック、アンロックする方法

2021年11月15日

環境
Oracle 12.2.0.1.0
A5:SQL Mk-2
SQL*Plus

操作例
1.アカウントをロックします
ALTER USER TEST02 ACCOUNT LOCK

2.ロックしたアカウントはOracleに接続確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>sqlplus TEST02/TEST02@ARK
SQL*Plus: Release 12.2.0.1.0 Production on 月 1115 15:18:46 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-28000: アカウントがロックされています。
>sqlplus TEST02/TEST02@ARK SQL*Plus: Release 12.2.0.1.0 Production on 月 11月 15 15:18:46 2021 Copyright (c) 1982, 2016, Oracle. All rights reserved. ERROR: ORA-28000: アカウントがロックされています。
>sqlplus TEST02/TEST02@ARK

SQL*Plus: Release 12.2.0.1.0 Production on 月 11月 15 15:18:46 2021

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

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

3.アカウントをアンロックします
ALTER USER TEST02 ACCOUNT UNLOCK

4.アンロックしたアカウントをOracleに接続確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>sqlplus TEST02/TEST02@ARK
SQL*Plus: Release 12.2.0.1.0 Production on 月 1115 15:22:18 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
最終正常ログイン時間: 月 1115 2021 15:09:22 +09:00
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
に接続されました。
SQL>
>sqlplus TEST02/TEST02@ARK SQL*Plus: Release 12.2.0.1.0 Production on 月 11月 15 15:22:18 2021 Copyright (c) 1982, 2016, Oracle. All rights reserved. 最終正常ログイン時間: 月 11月 15 2021 15:09:22 +09:00 Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production に接続されました。 SQL>
>sqlplus TEST02/TEST02@ARK

SQL*Plus: Release 12.2.0.1.0 Production on 月 11月 15 15:22:18 2021

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

最終正常ログイン時間: 月 11月 15 2021 15:09:22 +09:00


Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
に接続されました。
SQL>

 

Oracle 12c

Posted by arkgame