I created container orcl2
database with pluggable database pdborcl2
. When I try to connect
SQL> connect system@pdborcl2
I get this error:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
My tnsnames.ora
look as follows:
ORCL2 = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl2.localhost)))
PDBORCL2 = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdborcl2.localhost)))
I can normally connect to orcl2
with:
SQL> connect system@orcl2
ORACLE_SID
topdborcl2
can you connect to the instance? If so what does the commandshow parameter service
show? What does the (shell) commandlsnrctl status
give?ORACLE_SID
topdborcl2
i do not have sqlplus. "bash: sqlplus: command not found...
"oraenv
to switch? If so then youroratab
file is missingpdborcl2
. Try to set theORACLE_SID
from the command line and executesqlplus
right after.show parameter service
showed NAME:service_name
TYPE:string
VALUE:orcl2.localdomain