Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connecting to pdb from sqlplus

LuxferJul 22 2017 — edited Jul 23 2017

Hi everybody,

Looking for an explanation.

I can connect to a PDB from sql developer using a local user without problems using service name orclbdb. That works as expected

When I try to connect to the same PDB using the command: "sqlplus username/password@//localhost/orclpdb" I connect successfully. All OK

but if I use the command: "sqlplus username/password@orclpdb" I get the error: ORA-12154: TNS:could not resolve the connect identifier specified

I would like to know why the second form is not working. Why I need to include the hostname? A video tutorial I saw used the second form and worked. What I'm missing? 

I'm very new to Oracle and will really appreciate an explanation/solution. 

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2017
Added on Jul 22 2017
4 comments
2,457 views