How to set LOCAL_LISTENER using Alter System Set Command in Oracle

Hi,

I will explain How to set LOCAL_LISTENER Parameter in Oracle using alter system set command in this post.

 

LOCAL_LISTENER Parameter in Oracle

Oracle database has two listener as follows.

  • Local Listener
  • Remote Listener

 

 

 

 

You can connect to database via Listeners if you connect from remote client.

If you are using the Single Instance Oracle database, then you are using the local listener.

 

 

ALTER SYSTEM SET LOCAL_LISTENER

 

You can set the local listener parameter as follows.

 

Syntax:

ALTER SYSTEM SET LOCAL_LISTENER=["]listener_address["][,...];


ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOl=TCP)(HOST=HOSTNAME/IP_ADRESS)(PORT=1521))' SCOPE=BOTH;


ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOl=TCP)(HOST=192.168.63.34)(PORT=1521))' SCOPE=BOTH;

 

 

I have set the local listener parameter as follows.

 

[MSDBA]/u01/app/oracle/product/19.0.0/dbhome_1/network/admin $ sqldba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 30 20:12:04 2020
Version 19.8.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0

SQL> ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOl=TCP)(HOST=192.168.63.34)(PORT=1521))' SCOPE=BOTH;

System altered.

SQL> 
SQL> show parameter local

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOl=TCP)(HOST=1
92.168.63.34)(PORT=1521))
parallel_force_local boolean FALSE
SQL>

 

 

 

 

 

alter system register

Once you set the local listener, don’t forget running of register command as follows.

SQL> alter system register;

System altered.

 

Lsnrctl Status / Lsnrctl start / stop

You can also create a static listener and start it as follows.

Add the following listener descriptions to the listener.ora file under $ORACLE_HOME/network/admin.

 

Check your Hostname, Port, DB Name and fill them correctly.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.63.34)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

SID_LIST_LISTENER = 
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = MSDBA)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1 )
(SID_NAME = MSDBA )
)
)


[oracle@msdbadm01 ~]$ lsnrctl start LISTENER

Check listener status as follows, it is listening the Database and its service as follows.

 

[oracle@msdbadm01 ~]$ lsnrctl status

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 28-APR-2020 15:44:29

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 25-MAR-2020 20:34:20
Uptime 33 days 19 hr. 10 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/vfxidb01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.63.34)(PORT=1521)))
Services Summary...
Service "+APX" has 1 instance(s).
Instance "+APX1", status READY, has 1 handler(s) for this service...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_RECO" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "MSDB" has 1 instance(s).
Instance "MSDB1", status READY, has 1 handler(s) for this service...
Service "MSDBXDB" has 1 instance(s).
Instance "MSDB1", status READY, has 1 handler(s) for this service...

[oracle@msdbadm01 ~]$

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *