netca (Network Configuration Assistant) is Oracle command line for
configure the Oracle listener.
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: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.
After Installation Checking the listener status:
lsnrctl statusThe listener is listen to the default port 1521. The oracle database would auto register to the listener ( PMON processes).
[ All the response files can be found in the software eg location: /u01/client/response]
Prepare the response
file
The tip for the response 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”
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
SHOW_GUI=false
LOG_FILE=""/u01/app/oracle/product/11.2.0/network/tools/log/netca.log""
[oracle.net.ca]
INSTALL_TYPE=""CUSTOM""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER_ORACLEDB1"}
LISTENER_PROTOCOLS={"TCP;7001"}
LISTENER_START=""LISTENER_ORACLEDB1""
INSTALLED_COMPONENTS={"server","client","net8","javavm"}
Execute the netca
$ORACLE_HOME/bin/netca –silent -responsefile=/local_dir/netca.rsp
or
$ORACLE_HOME/bin/netca /silent /log $ORACLE_HOME/network/tools/log/netca.log /responsefile /home/oracle/netca.rsp
Finally, we check the status of the listener:lsnrctl status LISTENER_ORACLEDB1
Manually create the listener.ora file and start the listener from command line.
A]
LISTENER_ORACLEDB1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = shilpa.localdomain)(PORT = 7001))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC7001))
)
)
ADR_BASE_LISTENER_ORACLEDB1 = /u01/app/oracle
B]
lsnrctl stop LISTENER_ORACLEDB
lsnrctl status LISTENER_ORACLEDB
If listener does not
listen to the default port
In the example below, 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 listener
localhost 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.
LISTENER_ORACLEDB1 =
(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.
No comments:
Post a Comment