I just installed Oracle 21c Release 21.0.0.0.0 on OL8
I installed a database with global name “devorcl” and a PDB “devpdb”
After installation I can connect using sqlplus / as sysdba. But when I try to connect with system like this :
$ sqlplus system@devorcl
I get this error: ORA-12154: TNS:could not resolve the connect identifier specified.
Is there any extre configuraion needed for the listener.ora or tnsnames.ora. Here is the contents of those files:
# listener.ora Network Configuration File: /u01/app/oracle/homes/OraDB21Home1/network/admin/listener.ora
# Generated by Oracle configuration tools.
DEVORCL_LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev-db)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
# tnsnames.ora Network Configuration File: /u01/app/oracle/homes/OraDB21Home1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_DEVORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev-db)(PORT = 1521))
DEVORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev-db)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = devorcl)
)
)
And the output of lsnrctl status:
LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 17-SEP-2023 17:50:32
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias DEVORCL_LISTENER
Version TNSLSNR for Linux: Version 21.0.0.0.0 - Production
Start Date 17-SEP-2023 17:16:45
Uptime 0 days 0 hr. 33 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/homes/OraDB21Home1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dev-db/devorcl_listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dev-db)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=dev-db)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/devorcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "058fc3f000c94a94e0650250568985a0" has 1 instance(s).
Instance "devorcl", status READY, has 1 handler(s) for this service...
Service "c8209f27c6b16005e053362ee80ae60e" has 1 instance(s).
Instance "devorcl", status READY, has 1 handler(s) for this service...
Service "devorcl" has 1 instance(s).
Instance "devorcl", status READY, has 1 handler(s) for this service...
Service "devorclXDB" has 1 instance(s).
Instance "devorcl", status READY, has 1 handler(s) for this service...
Service "devpdb" has 1 instance(s).
Instance "devorcl", status READY, has 1 handler(s) for this service...
The command completed successfully
Thanks
Gado