HOST parameter configuration in listener. ora

Source: Internet
Author: User
OracleNet is an indispensable component in the process of using Oracle. For beginners, the three configuration files tnsname. ora, listener. ora, and sqlnet. ora are the most

Oracle Net is an indispensable component in the process of using Oracle. For beginners, the three configuration files tnsname. ora, listener. ora, and sqlnet. ora are the most

Oracle Net is an indispensable component in the process of using Oracle. For beginners, the three configuration files tnsname. ora, listener. ora, and sqlnet. ora are the most confusing parts. Besides, configuration errors are easily caused by the use of ASCII text format editing.

Listener Control File listener. ora is an important component file for Oracle Server Management. Listener listening ports, dynamic and static registration, and other behaviors are closely related to the configuration content of this file. Configuration parameters, such as HOST and Port, are not confusing.

This article describes how to configure the HOST parameter and the algorithm mode used by Oracle Net to process the Host through a series of experiments.

Related reading:

Configuration of Oracle dual listener

Six connection problems and solutions for Oracle listeners

Listener Configuration for Oracle 11g2

Oracle Database Listener Suspension

Listener registration and ORA-12514 Error Analysis

1. Host Parsing

The Host parameter can be met in Listener. ora and Tnsname. ora. Intuitively, this parameter is used to specify the host address of the connection. On the server side, the Host in the listener. ora listener specifies the addresses on which the listener is listening.

Three key elements of listener waiting: Waiting IP address (a host may have multiple NICs and then multiple IP addresses), connection protocol (TCP by default, but in many cases, other protocols are used for security considerations.) Port objects (on which port is used for connection waiting ).

For the Host parameter, you can select the IP address and Host server name in the listener. ora file of the server. The Oracle listener adopts different policy methods in two ways.

2. Prepare the environment

Prepare a host environment with multiple IP NICs. Install two Nic objects on the lab machine and configure different IP addresses.

[Root @ SimpleLinux network-scripts] # ifconfig

Eth0 Link encap: Ethernet HWaddr 08: 00: 27: C2: AB: D2

Inet addr: 192.168.0.100 Bcast: 192.168.0.255 Mask: 255.255.255.0

Inet6 addr: fe80: a00: 27ff: fec2: abd2/64 Scope: Link

Up broadcast running multicast mtu: 1500 Metric: 1

Eth1 Link encap: Ethernet HWaddr 08: 00: 27: 61: 80: AF

Inet addr: 192.168.0.101 Bcast: 192.168.0.255 Mask: 255.255.255.0

Inet6 addr: fe80: a00: 27ff: fe61: 80af/64 Scope: Link

The two IP addresses are bound to one host, 192.168.0.100 and 192.168.0.101 respectively. If you use name resolution, you must bind the IP address and server name to the DNS or local/etc/hosts file.

[Root @ SimpleLinux network-scripts] # cat/etc/hosts

# Do not remove the following line, or various programs

# That require network functionality will fail.

127.0.0.1 SimpleLinux. localdomain SimpleLinux localhost. localdomain localhost

: 1 localhost6.localdomain6 localhost6

192.168.0.100 SimpleLinux. localdomain

192.168.0.101 SimpleLinux. localdomain

3. Host connection binding Host Name

If the HOST parameter uses the HOST name, Oracle searches for all network name mappings on the HOST during connection listening and binds the listening action to all IP addresses. In this case, both IP addresses are monitored.

Oracle @ SimpleLinux admin] $ ls-l

Total 16

-Rw-r -- 1 oracle oinstall 357 Sep 9 listener. ora

Drwxr-xr-x 2 oracle oinstall 4096 Sep 9 samples

-Rw-r -- 1 oracle oinstall 205 May 11 2011 shrept. lst

-Rw-r ----- 1 oracle oinstall 322 Sep 9 tnsnames. ora

[Oracle @ SimpleLinux admin] $ cat listener. ora

# Listener. ora Network Configuration File:/u01/app/oracle/network/admin/listener. ora

# Generated by Oracle configuration tools.

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = SimpleLinux. localdomain) (PORT = 1521 ))

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521 ))

)

)

ADR_BASE_LISTENER =/u01/app

Note: The host name is used currently. Start the listener to listen.

[Oracle @ SimpleLinux admin] $ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0-Production on 02-JAN-2014 15:00:17

Listener Parameter File/u01/app/oracle/network/admin/listener. ora

Listener Log File/u01/app/diag/tnslsnr/SimpleLinux/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = SimpleLinux. localdomain) (PORT = 1521 )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521 )))

Test the connection from a remote server.

D: \> tnsping ora11g

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0-Production on 02-1-

15:00:51 2014

Copyright (c) 1997,201 0, Oracle. All rights reserved.

Used parameter files:

D: \ app \ Administrator \ product \ 11.2.0 \ client_1 \ network \ admin \ sqlnet. ora

Alias resolved using TNSNAMES Adapter

Try to connect (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.100) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = ora11g )))

OK (210 Ms)

D: \> tnsping ora11g_101

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0-Production on 02-1-

15:02:21 2014

Copyright (c) 1997,201 0, Oracle. All rights reserved.

Used parameter files:

D: \ app \ Administrator \ product \ 11.2.0 \ client_1 \ network \ admin \ sqlnet. ora

Alias resolved using TNSNAMES Adapter

Try to connect (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.101) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = ora11g )))

OK (10 ms)

Sqlplus connection successful.

SQL> conn scott/tiger @ ora11g

Connected.

SQL> conn scott/tiger @ ora11g_101

Connected.

Note: When we use the HOST name, the Oracle listener will enable the listening action for all IP addresses on the computer.

For more details, please continue to read the highlights on the next page:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.