The machine on which the Oracle database is located changes the IP address and finds that it cannot connect.
To solve this problem, you need to modify the corresponding file:
F:\app\zhaohe\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
F:\app\zhaohe\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
Modify the corresponding IP address and then restart Oracle to solve the problem;
Note: After restarting the instance service, Oracleoradb11g_home1tnslistener, wait 1 minutes.
Listener.ora
# Listener.ora Network Configuration file:f:\app\zhaohe\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\zhaohe\product\11.2.0\dbhome_1) ( Program=Extproc) (Envs="Extproc_dlls=only:f:\app\zhaohe\product\11.2.0\dbhome_1\bin\oraclr11.dll")) LISTENER=(Description_list=(DESCRIPTION=(ADDRESS= (PROTOCOL = IPC) (KEY =EXTPROC1521)) (ADDRESS= (PROTOCOL = TCP) (HOST =192.168.1.5) (PORT =1521))) Adr_base_listener= F:\app\zhaohe
Tnsnames.ora
# Tnsnames.ora Network Configuration file:f:\app\zhaohe\product\11.2.0\dbhome_1\network\admin\tnsnames.ora# Generated by Oracle configuration tools. Oraclr_connection_data=(DESCRIPTION=(Address_list=(ADDRESS= (PROTOCOL = IPC) (KEY =EXTPROC1521)) ) (Connect_data=(SID=Clrextproc) (PRESENTATION=RO)) ) LISTENER_ORCL=(ADDRESS= (PROTOCOL = TCP) (HOST =192.168.1.5) (PORT =1521)) ORCL=(DESCRIPTION=(Address_list=(ADDRESS= (PROTOCOL = TCP) (HOST =192.168.1.5) (PORT =1521)) ) (Connect_data=(SERVER=dedicated) (Service_Name=ORCL)) )
Note: Host location to use machine name or machine's network IP (e.g. 192.168.1.5)
How to modify the Oracle service IP address