Error:
bash-4.4$ sqlplus sys@standby as sysdbaSQL*Plus: Release 23.26.1.0.0 - Production on Mon Mar 16 11:10:47 2026Version 23.26.1.0.0Copyright (c) 1982, 2025, Oracle. All rights reserved.Enter password: ERROR:ORA-12514: Cannot connect to database. Service ORCL is not registered with thelistener at host 172.18.0.3 port 1521. (CONNECTION_ID=TSNFuI7qIlPgYwMAEqzucQ==)Help: https://docs.oracle.com/error-help/db/ora-12514/To register the service ORCL with the listener in Oracle Database, you need to ensure the database advertises the service name to the listener. Follow these steps.
Check current service name
Login to the database:
sqlplus / as sysdbashow parameter service_names;Note: If you do not see ORCL, then the listener cannot register that service.
Set service name to ORCL
ALTER SYSTEM SET service_names='ORCL' SCOPE=BOTH;Register the database with the listener
After setting the service name, run:
ALTER SYSTEM REGISTER;This forces the database to immediately register with the listener.
Verify registration
Check listener status:
lsnrctl statusTest connection
sqlplus sys/Oracle123@ORCL as sysdbaIf still not registering (common in Docker)
Set the listener explicitly:
ALTER SYSTEM SET local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' SCOPE=BOTH;ALTER SYSTEM REGISTER;check again:
lsnrctl statusBy using this command, I am able to fix my issue. Hopefully it help you all thankx