IP地址修改后ORACLE不能使用问题

2010-08-20
 
可能这是许多人遇到的问题,前几天换了IP,导致ORACLE启动不起来。
  首先,要知道一点。ORACLE使用是不能使用动态IP的,必须使用静态IP。开始-》运行输入CMD,输入命令
  IPCONFIG /ALL 查询需要的信息(IPD地址,网关,DNS服务器地址),网上邻居-》属性-》本地连接-》属性-》TCP\IP
  在里面选择使用下面的IP地址,填写查询到的信息
  然后使用NET CONFIGURATION ASSISTANT删除原来的LISTENER,然后重新配置一个LISTENER即可。
  重启服务
  使用PL/SQL DEVELOPER登陆即可。
  下面来比较一下TNSNAME.ORA LISTENER.ORA前后的不同
  原TNSNAMES.ORA
  ORCL =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = orcl)
  )
  )
  EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
  )
  (CONNECT_DATA =
  (SID = PLSExtProc)
  (PRESENTATION = RO)
  )
  )
  新文件
  ORCL =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.13)(PORT = 1521))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = orcl)
  )
  )
  EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
  )
  (CONNECT_DATA =
  (SID = PLSExtProc)
  (PRESENTATION = RO)
  )
  )
  不同处仅在于HOST参数
  员阿里的是默认的HOST
  新建的是计算机IP
  原LISTENER.ORA
  SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = PLSExtProc)
  (ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
  (PROGRAM = extproc)
  )
  )
  LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
  )
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )
  )
  )
  新LISTENER.ORA
  SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = PLSExtProc)
  (ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
  (PROGRAM = extproc)
  )
  )
  LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = PC-201003270020)(PORT = 1521))
  )
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
  )
  )
  HOST参数原来的是默认LOCALHOST
  新建的改成了计算机名
  所以
  更改IP后只需要将TNSNAMES 中的HOST改成IP地址,
  LISTENER中的HOST改成计算机名即可
  经验证,TNSNAMES中修改成计算机名或者是LISTENER种修改成IP均是不可行的
posted @ 2013-06-01 21:37  linux,dev  阅读(601)  评论(0编辑  收藏  举报