如何更改 Oracle 10g 上的 IP 地址

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/83991/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 01:29:29  来源:igfitidea点击:

How do I change the IP address on Oracle 10g

oracleoracle10gip-address

提问by Joshua

What steps do I need to take to change an IP address for Oracle 10g? I cannot connect to the database after going from a dhcp address to a static IP and a reboot.

我需要采取哪些步骤来更改 Oracle 10g 的 IP 地址?从 dhcp 地址转到静态 IP 并重新启动后,我无法连接到数据库。

回答by Dave Costa

If the server's IP address changed, these are the first things I would look at:

如果服务器的 IP 地址发生了变化,这些是我首先要考虑的事情:

The TNSNAMES.ORA file on the client -- does it have the IP address hardcoded? If so, change it. Does it use the machine name? If so, does the machine name resolve to the correct IP address on your client machine?

客户端上的 TNSNAMES.ORA 文件——它有硬编码的 IP 地址吗?如果是这样,请更改它。它使用机器名称吗?如果是,机器名称是否解析为客户端机器上的正确 IP 地址?

The LISTENER.ORA file on the server -- does it explicitly specify the old IP address as its listening address?

服务器上的 LISTENER.ORA 文件——它是否明确指定旧 IP 地址作为其侦听地址?

回答by cagcowboy

Most obvious files to check are:

要检查的最明显的文件是:

$ORACLE_HOME/network/admin/tnsnames.ora $ORACLE_HOME/network/admin/listener.ora

$ORACLE_HOME/network/admin/tnsnames.ora $ORACLE_HOME/network/admin/listener.ora

Other than that we'd need more info...

除此之外,我们还需要更多信息……

  • I presume you mean the Oracle 10g DB and not the Oracle 10g Application Server?
  • Does the database start ok?
  • Is there anything in the database alert log?
  • Are the error(s) connecting from a client or the server?
  • What error message(s) do you get?
  • Can you ping the machine on it's new address (by both name + IP address) From both client + server?
  • Does a TNSPING work?
  • Can you connect using SQL*Plus on the server?
  • What other tool(s) have you tried connecting with?
  • 我想您是指 Oracle 10g DB 而不是 Oracle 10g Application Server?
  • 数据库启动正常吗?
  • 数据库警报日志中是否有任何内容?
  • 错误是从客户端还是从服务器连接?
  • 您收到什么错误消息?
  • 您可以从客户端 + 服务器的新地址(通过名称 + IP 地址)ping 机器吗?
  • TNSPING 有效吗?
  • 您可以在服务器上使用 SQL*Plus 进行连接吗?
  • 您尝试过连接哪些其他工具?

Update after comment

评论后更新

Please can you post...

请问可以发...

  • Your old ip address (if you know it)
  • Your new ip address
  • Your FQDN (e.g. machine.domain.com)
  • The output of "ipconfig/all" (or equivalent)
  • Your listener.ora file
  • The output of "$ORACLE_HOME/bin/lsnrctl start"
  • The output of "$ORACLE_HOME/bin/lsnrctl status"
  • 您的旧 IP 地址(如果您知道)
  • 您的新 IP 地址
  • 您的 FQDN(例如 machine.domain.com)
  • “ipconfig/all”(或等价物)的输出
  • 你的 listener.ora 文件
  • “$ORACLE_HOME/bin/lsnrctl start”的输出
  • “$ORACLE_HOME/bin/lsnrctl 状态”的输出

回答by David Aldridge

More info please. Do you mean that you have changed the ip address of the host that the database is on and now you have to connect to it from a different macine, or are you having trouble starting the database after the ip change?

请提供更多信息。您的意思是您更改了数据库所在主机的 ip 地址,现在您必须从不同的机器连接到它,还是在更改 ip 后无法启动数据库?

... and what error message do you receive?

...您收到什么错误消息?

回答by Stellios

Check that LOCAL_LISTENER is not defined (or defined correctly) in the database - it may not be registering correctly because of an incorrect entry here. Also try 'ALTER SYSTEM REGISTER' to attempt to register with the listener (rather than waiting up to 3 minutes for an auto-register). Examine the listener.log to see the instance registered (service_update * ) and 'lsnrctl status' to see if it is there.

检查 LOCAL_LISTENER 是否未在数据库中定义(或正确定义) - 由于此处输入不正确,它可能无法正确注册。还可以尝试使用“ALTER SYSTEM REGISTER”来尝试向侦听器注册(而不是等待最多 3 分钟进行自动注册)。检查 listener.log 以查看注册的实例 (service_update * ) 和“lsnrctl status”以查看它是否存在。

回答by Tony BenBrahim

Did you change the hostname in DNS? Can you ping the hostname from another machine?

您是否更改了 DNS 中的主机名?你能从另一台机器ping主机名吗?