LoginSignup
3
1

More than 3 years have passed since last update.

ORA-00988: パスワードが指定されていないか、または無効です。となった時の対応方法

Posted at
  • 環境
    • 接続先 : (RDS)Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
    • 接続元 : (EC2)Ubuntu 18.04 LTS(64ビット x86)
    • SQL*Plus: Release 12.2.0.1.0 Production

事象 : ユーザー作成時にパスワードで怒られた。

SQL> create user ponsuke identified by 'ponsuke' default tablespace USERS temporary tablespace TEMP profile DEFAULT;
create user ponsuke identified by 'ponsuke' default tablespace USERS temporary tablespace TEMP profile DEFAULT
                                  *
1でエラーが発生しました。:
ORA-00988: パスワードが指定されていないか、または無効です。

原因 : パスワードをシングルクォーテーションで囲んでいるから

パスワードに使用できる特殊文字
一重引用符 '
パスワードに使用できる特殊文字

シングルクォーテーションは、パスワードに使える特殊文字でした。
なのでパスワードを囲む文字としては使えません。

次のパスワードは二重引用符で囲む必要はありません。
・アルファベット(aからz、AからZ)で始まり、数字(0から9)または特殊文字($、#、_)を含むパスワード。
Oracle Databaseの安全性の維持

ということは、もし"'ponsuke'"と指定したらponsukeではなくて'ponsuke'というパスワードになっていました。

対応方法 : パスワードはダブルクォーテーションで囲むか、アルファベット始まりなら囲まない

SQL> create user ponsuke identified by ponsuke default tablespace USERS temporary tablespace TEMP profile DEFAULT;

ユーザーが作成されました。

3
1
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
3
1