如何修改Oracle服务IP地址
oracle数据库所在的机器更改IP地址后,发现无法连接,
解决这个问题,需要修改一下对应的文件:
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
把其中对应的IP地址进行修改后再重新启动oracle就可以解决问题了;
注:重启实例服务、OracleOraDb11g_home1TNSListener后,稍等1分钟后即可。
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) ) )
注意:HOST位置要用机器名或机器的网络IP(如192.168.1.5)
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。