[Oralce pickup] oracle modifies the listening IP Address
When you remotely connect to oracle in a LAN, you are always prompted to reject the connection. When the firewall is disabled and the oracle server listening port is enabled, the possible error is that the oracle listening IP address is not the default one, instead, it is the local 127.0.0.1.
The Troubleshooting process will not be detailed. Here we will only share the solution to oracle connection rejection due to incorrect host names.
====================================
Modify the hosts fileOpen cmd, enter hostname, write down the host name, and use NotePad to open the c: \ windows \ system32 \ drivers \ etc \ hosts file and add the host name.
# Copyright (c) 1993-2009 Microsoft Corp. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # This file contains the mappings of IP addresses to host names. each # entry shoshould be kept on an individual line. the IP address shoshould # be placed in the first column followed by the corresponding host name. # The IP address and the host name shocould be separated by at least one # space. # Additionally, comments (such as these) may be 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 address] [host name]
==========================
Modify the oracle listening File
1. Open listener. ora and change the localhost in the directory F: \ app \ young \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN.
# 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 \ lrlr11.dll "))) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) (ADDRESS = (PROTOCOL = TCP) (HOST = Young-PC) (PORT = 1521) // Young-PC is originally localhost) ADR_BASE_LISTENER = F: \ app \ young
2. Change tnsnames. ora to the same directory as above, and change localhost to the 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 )) // The original Young-PC is localhost1_lr_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 )) // The original Young-PC is localhost (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl )))
3. Restart tnslsnr.
Open cmd and enter the following command.
lsnrctl stoplsnrctl startlsnrctl stat
=============================
Remote connection again. It can be connected.