Enterprise Manager has dependence on the listener. If listener is not running, we can not login to the Enterprise manager as EM require connects to database to verify the password. If the listener is started after the EM started, we can login to the EM but the agent would fail connect to TNS. In this case, we need to bounce the EM.
Note: Listener name is not case sensitive. LISTENER_ORACLEDB is same as LISTENER_oracledb.
Use the netca GUI to create the listener
The listener is listen to the default port 1521. The oracle database would auto register to the listener ( PMON processes).
Use responds file to create the listener
Prepare the responds fileThe tip for the responds file is INSTALL_TYPE. If you want to have the custom listener name and port instead of default name <LISTENER> and port 1521. We need to set this property as “CUSTOM”
Execute the netca
$ORACLE_HOME/bin/netca –silent -responsefile=/local_dir/netca.rsp
Manually Create the listenerManually create the listener.ora file and start the listener from command line.
(ADDRESS = (PROTOCOL = TCP)(HOST = panda1.localdomain)(PORT = 7001))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC7001))
ADR_BASE_LISTENER_ORACLEDB1 = /u01/app/oracle
lsnrctl stop LISTENER_ORACLEDB
lsnrctl status LISTENER_ORACLEDB
If listener dost not listen to the default portIn the example blow, my listener is set to listen port 7001 hence the database instance would not connect to the listener automatically.
The solution is to set the local listener ( LOCAL_LISTENER) parameter.
set local listenerlocalhost can refer to the local host or the host name on the host ( In this example, panda1 ) or the remote host where the listener is running.
alter system set LOCAL_LISTENER='(ADDRESS = (PROTOCOL=TCP)(HOST=localhost)(PORT=7001))' scope=both;
Alternately, we can put the host configuration in the tnsname.ora.
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 7003))
and change the LOCAL_LISTENER point to the LISTENER_ORACLEDB1
alter system set LOCAL_LISTENER='LISTENER_ORACLEDB1' scope=both;
We must create the entry in the tnsname.ora first otherwise we could get the error while trying to run the alter system command.