Search This Blog

Total Pageviews

Monday, 23 May 2011

How to set Local_Listener ?

oracle local_listener
Set Local_Listener
what is the advantage of Local_Listener ?
What are the advantages of local_listener ?

http://anuj-singh.blogspot.com/2014/05/ora-12514-tnslistener-does-not.html


local_listener
_______________


The LOCAL_LISTENER parameter is a component of the cross instance registration technology for Oracle RAC (Real Application Clusters). Cross instance registration needs the local listener to help manage connections across all database instances for load balancing and failover. The local listener is particularly meaningful for the RAC configuration featured by multiple listeners on cluster nodes. If your Oracle configuration is not RAC enabled, you may as well remove the LOCAL_LISTENER parameter from your spfile in case for default port 1521 .




SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string

SQL> alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=192.168.2.210)(PORT=1521))';
System altered.

SQL> alter system register;
System altered.

SQL> show parameter local_list

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS = (PROTOCOL=TCP)(HOST
=192.168.2.210)(PORT=1521))


To dynamically update the LOCAL_LISTENER parameter, use the SQL statement ALTER SYSTEM SET:

ALTER SYSTEM SET LOCAL_LISTENER='listener_alias'

If you set the parameter to null with the statement that follows, then the default local address of TCP/IP, port 1521 is assumed.

ALTER SYSTEM SET LOCAL_LISTENER=''



example


in local host tnsnames.ora file


LISTENER_PRIM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.129)(PORT = 1521)))





-bash-3.2$ tnsping LISTENER_PRIM

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 14-APR-2012 13:24:10

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:
/u01/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.129)(PORT = 1521)))
OK (250 msec)




*.local_listener=LISTENER_PRIM




SQL> ALTER SYSTEM SET LOCAL_LISTENER='LISTENER_PRIM' scope=both sid='*' ;

System altered.




SQL> show parameter LOCAL_LISTENER

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER_PRIM

In case multiple entries are needed then:


SQL>ALTER SYSTEM SET LOCAL_LISTENER='(DESCRIPTION=(ADDRESS=(PORT=<VIP listener port#>)(PROTOCOL=TCP)(HOST=<VIP hostname here>))(ADDRESS=(PORT=<port#>)(PROTOCOL=TCP)(HOST=<VIP hostname here>)))' scope=both SID='<instance name here>';
 alter system set local_listener='(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxx)(PORT=1521))','(ADDRESS=(PROTOCOL=tcps)(HOST=xxxxxxx)(PORT=2484))'  scope=both;
====


How to setup LOCAL_LISTENER for RAC One Node Database (Doc ID 1497619.1)
Health Check Alert: Set REMOTE_LISTENER and LOCAL_LISTENER initialization parameters (Doc ID 957536.1)

4 comments:

Soco said...

Hello Dear Anuj:

I read your post local_listener.

I have a problem where an instance listening on 3 ports, when it should only be one.
I have a cluster passes and there are two active and two other instances that make failover to the server.
But on port 1521 vivie an instance of another server for failover, and it is where I can connect to the instances that if you live on the server and have another port.

Is your comment part of the change to be carried out in order to achieve accurately connect on that port only the sinstancias?

Do you know if I see another aspect?

I appreciate your kind attention.
Best regards!

RahmanAjani said...

Wao thanks you really serve my head from shame today.I really appreciate your work.

Goku said...

Hi Anuj,

Thanks Anuj, I had this issue of the dataguard broker service getting registered to the default listener, Once i set the local_listener parameter i was able to do the switchover, Thanks again :)

Unknown said...

(Google) is still washing spam blocker

Oracle DBA

anuj blog Archive