首页 > 代码库 > 如何修改Oracle服务IP地址
如何修改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)
如何修改Oracle服务IP地址
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。