[Oralce Supplements]oracle Modify the Listening IP address

Source: Internet
Author: User

When you connect to Oracle remotely in a local area network, you are always prompted to reject the connection, and in the case of a firewall shutdown and the Oracle server listening port turned on, the possible error is that Oracle's listening IP address is not the default, but local 127.0.0.1.

The troubleshooting process is no longer in detail, only to share the solution that causes Oracle to reject the connection because the hostname is incorrect.

===============================

Modify the Hosts file
    1. Open cmd, enter hostname, note the hostname
    2. c:\windows\system32\drivers\etc\hoststo open a file with Notepad, add a host name
# Copyright (c) 1993-2009 Microsoft Corp.## This was a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings for IP addresses to host names. each# Entry should is kept on a individual line. The IP address should# is placed in the first column followed by the corresponding host name.# The IP address and the host name should is separated by at least one# space.## Additionally, comments (such as these) may is inserted on individual# lines or following the machine name denoted by a ' # ' symbol.## for example:## 102.54.94.97 rhino.acme.com # source Server# 38.25.63.10 x.acme.com # x client host# localhost name resolution is handled within DNS itself.# 127.0.0.1 localhost#:: 1 localhost[Host IP] [Host name]

==========================

Modifying an Oracle Listener file

1, open listener.ora , file in the F:\app\young\product\11.2.0\dbhome_1\NETWORK\ADMIN directory, will be inside for localhost their own host name.

#Listener.ora Network Configuration file:f:\app\young\product\11.2.0\dbhome_1\network\admin\listener. ora#Generated by Oracle configuration tools. Sid_list_listener = (Sid_list = (Sid_desc = (Sid_name = clrextproc) (Oracle_home = F:\app\young\product\11.2.0\dbhome_1) (program = Extproc) (Envs = "Extproc_dlls=only:f:\app\young\product\11.2.0\dbhome_1\ Bin\ORACLR11.dll ")) LISTENER = (Description_list = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP) (HOST = young-pc) (PORT = 1521))//young-pc originally localhost)) Adr_base_listener = F:\app\young

2, modify tnsnames.ora , the directory above, will also be localhost changed to host name.

#  tnsnames.ora Network Configuration file:f:\app  \young  \product  \11.2.0\dbhome  _1\ Network  \admin  \tnsnames . Ora#  Generated by Oracle configuration tools.  LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP) (HOST = young-pc) (PORT = 1521))//young-pc originally localhostoraclr_connection_data =  (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))) (Connect_data = (SID =  Clrextproc) (PRESENTATION = RO))) ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = young-pc) (PORT = 1521))//young-pc original as localhost (connect_data = (SERVER = dedicated) (service_name = ORCL))  

3, restart the Tnslsnr.

Open cmd and enter the following command.

startlsnrctl stat

=============================

Connect again remotely, already can connect, success.

[Oralce Supplements]oracle Modify the Listening IP address

Related Article

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.