I installed Oracle 12cR2. Everything is fine. Connected as SYS, Successful.
Now, what I did is changed my Container DB i.e. CDB$ROOT to ORCLPDB (Using Alter Session). And Created a User Called demo
with password. Granted necessary permissions. Successful.
In that same session, I tried to connect to demo
User, but unable to connect to it.
Error Shows as Follow:
ORA-12154: TNS:could not resolve the connect identifier specified.
How can I resolve this issue?
(Note: The user is in PDB)
tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Demo/Password@ORCLPDB
ORCLPDB
in your tnsnames.ora, so Oracle complains that it can't find itDemo/Password@ORCL
(as you have ORCL
in tnsnames.ora), orORCLPDB
) if it is a different database, or ORCL, ORCLPDB = ...