LoginSignup
3
1

More than 5 years have passed since last update.

Oracleのパスワードに"/"を入れたらsqlplusでログインできなくなった

Posted at

概要

Oracleのパスワードに"/"を入れたらsqlplusでログインできなくなったので解決した話です。
パスワードは「test/test」と仮定しています。

詳細

どうやら、"/"があるとコマンドラインのオプションと思うようで以下のようなエラーになりました。
エスケープなど頑張ってみたのですがダメでした:frowning2:

ターミナル
$ sqlplus testuser@db001

SQL*Plus: Release xx.x.x.x.x Production on xxxxxxxx
Copyright (c) 1982, 2016, Oracle.  All rights reserved.

パスワードを入力してください: 【"test/test"を入力】
SP2-0306: オプションが無効です。
使用方法: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
条件 <logon> ::= <username>[/<password>][@<connect_identifier>]
      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
ユーザー名を入力してください:

解決策

sqlplus /nologでsqlplusに入り、connコマンドでログインする。

ターミナル
$ sqlplus /nolog

SQL*Plus: Release xx.x.x.x.x Production on xxxxxxxx
Copyright (c) 1982, 2016, Oracle.  All rights reserved.

SQL> conn testuser/"test/test"@db001
接続されました。
SQL>

ログインできたらpasswordコマンドでパスワードを変えると良いと思います。僕は速攻で変更しました:relaxed:

最後に

解決できるまで、"/"をパスワードいれた自分の未熟さを恨みました:sob:

3
1
1

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