Thinking Out Loud

September 29, 2016

HOST Options for local_listener

Filed under: oracle — mdinh @ 1:43 pm

For a long time, I was using *.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1551))’ without specifying the host name since it makes the configuration more dynamic.

Then one day, I ran into issues which I don’t remember and started to use host name for local_listener.

Today, I ran into issues after cloning VM and host name changed causing database not to start and I am now back to using local_listener without host name.

oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/dbs
$ sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Sep 29 06:29:26 2016

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

Connected to an idle instance.

SYS@DB1> startup;
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=arrow.localdomain)(PORT=1551))'
SYS@DB1> exit
Disconnected

++++++++++

oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/dbs
$ vi initDB1.ora
oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/dbs
$ cat initDB1.ora
*._dbms_sql_security_level=384
*.control_files='/oradata/DB1A/controlfile/o1_mf_cwj6476c_.ctl'#Oracle managed file
*.db_create_file_dest='/oradata'
*.db_name='DB1'
*.db_securefile='PREFERRED'
*.db_unique_name='DB1A'
*.global_names=TRUE
*.instance_name='DB1'
*.java_pool_size=64M
*.job_queue_processes=0
*.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1551))'
*.pga_aggregate_target=128M
*.sga_max_size=512M
*.streams_pool_size=64M

++++++++++

oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/dbs
$ sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Sep 29 06:30:17 2016

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

Connected to an idle instance.

SYS@DB1> startup;
ORACLE instance started.

Total System Global Area  536870912 bytes
Fixed Size                  2926472 bytes
Variable Size             478152824 bytes
Database Buffers           50331648 bytes
Redo Buffers                5459968 bytes
Database mounted.
Database opened.
SYS@DB1> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/dbs
$

++++++++++

oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$ lsnrctl start listener_12c

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 29-SEP-2016 06:36:16

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

Starting /u01/app/oracle/product/12.1.0.2/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1551)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=arrow1.localdomain)(PORT=1551)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1551)))
STATUS of the LISTENER
------------------------
Alias                     listener_12c
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                29-SEP-2016 06:36:16
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1551)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=arrow1.localdomain)(PORT=1551)))
Services Summary...
Service "DB1" has 1 instance(s).
  Instance "DB1", status UNKNOWN, has 1 handler(s) for this service...
Service "test2" has 1 instance(s).
  Instance "test2", status UNKNOWN, has 1 handler(s) for this service...
Service "tmnt" has 1 instance(s).
  Instance "tmnt", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

++++++++++

oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$ sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Sep 29 06:36:26 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

DB1:(SYS@DB1):PRIMARY> alter system register;

System altered.

DB1:(SYS@DB1):PRIMARY> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

++++++++++

oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$ lsnrctl status listener_12c

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 29-SEP-2016 06:36:46

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1551)))
STATUS of the LISTENER
------------------------
Alias                     listener_12c
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                29-SEP-2016 06:36:16
Uptime                    0 days 0 hr. 0 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1551)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=arrow1.localdomain)(PORT=1551)))
Services Summary...
Service "DB1" has 1 instance(s).
  Instance "DB1", status UNKNOWN, has 1 handler(s) for this service...
Service "DB1A" has 1 instance(s).
  Instance "DB1", status READY, has 1 handler(s) for this service...
Service "test2" has 1 instance(s).
  Instance "test2", status UNKNOWN, has 1 handler(s) for this service...
Service "tmnt" has 1 instance(s).
  Instance "tmnt", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
oracle@arrow1:DB1:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: