0
1

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 5 years have passed since last update.

oracle12cで作成したユーザーに接続できない時

Posted at

概要

PDBで作成しユーザーに接続できない時の対処法を書きます。

下記エラーが出て接続できず、ID,PWがあっているのに接続できないのは何故?という方向けです。
SmartSelectImage_2019-02-04-07-57-00.png

原因

PDBに接続するときはリスナー経由でなくてはいけません。

解決策

tnsnames.oraにpdbの接続識別子と接続記述子を追記することで接続が可能になります。

① サービス名の確認

まずは下記コマンドにてリスナーのサービス名を確認します

lsnrctl status

SmartSelectImage_2019-02-04-07-57-37.png

②tnsnames.oraに追記

vi $ORACLE_HOME/network/admin/tnsnames.ora

赤〇の部分を各環境に合わせ修正してください。(SERVICE_NAMEは先程確認した名前を記載)

SmartSelectImage_2019-02-04-08-14-14.png

③接続確認

sqlplus ユーザー名/PW@接続識別子

SmartSelectImage_2019-02-04-07-58-55.png

無事、ログインできるようになりました!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?