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


可能这是许多人遇到的问题,前几天换了IP,导致ORACLE启动不起来。

  首先,要知道一点。ORACLE使用是不能使用动态IP的,必须使用静态IP。开始-》运行输入CMD,输入命令

  IPCONFIG /ALL 查询需要的信息(IPD地址,网关,DNS服务器地址),网上邻居-》属性-》本地连接-》属性-》TCPIP

  在里面选择使用下面的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:oracleproduct10.1.0Db_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:oracleproduct10.1.0Db_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均是不可行的

—-想了解更多的数据库相关异常处理怎么解决关注<猴子技术宅>



本文来自网络收集,不代表猴子技术宅立场,如涉及侵权请点击右边联系管理员删除。

如若转载,请注明出处:https://www.ssfiction.com/sqljc/82828.html

发表评论

邮箱地址不会被公开。 必填项已用*标注