In Windows -> Startup got to Oracle - OraDB19Home1 -> Net Configuration Assistant
Give a name to the listener you want to configure. The default name for listener is LISTENER.
For this example I have given the name as LISTENER_1
Select the TCP protocol for configuring the listener
Sine the existing port will be listening on the default port 1521, select the radio button for 'Use another port Number' and assign a unique port number which is not in use on the server.
1523 is the port I have taken for this example
Click on Next to start the Listener and Finish
In LSNRCTL you can see the listener service and status for LISTENER_1
LSNRCTL> services LISTENER_1
LSNRCTL> status LISTENER_1
Entry in listener.ora file for the same, after the configuration from NETCA is complete
LISTENER_1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 01HW2038611)(PORT = 1523))
)
)
To attach services to this listener, can make entry in listener.ora for a database SID as follows
SID_LIST_LISTENER_1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\ora_home)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\ora_home\bin\oraclr19.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = ALPHA)
(ORACLE_HOME = D:\ora_home)
(SID_NAME = ALPHA)
)
)
Stop the existing listener LISTENER_ALPHA which is currently running. Start the new listener LISTENER_1
In LSNRCTL it will show LISTENER_1 is started successfully.
Connecting to database with the new LISTENER_1 started you will still get below error.
For
this in tnsnames.ora you simply need to change the port for your database
service to the new port 1523.
ALPHA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 01HW2038611)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = alpha)
)
)
Now if you connect to the database it will connect, with the new listener configuredSQL> show parameter LISTENER
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
forward_listener string
listener_networks string
local_listener string LISTENER_ALPHA
remote_listener string
SQL> alter system set local_listener='LISTENER_1' scope=both;
System altered.
SQL> show parameter LISTENER
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
forward_listener string
listener_networks string
local_listener string LISTENER_1
remote_listener string
SQL>
References
No comments:
Post a Comment