命令显示Oracle 10g R2中的IP地址?

时间:2022-09-15 18:24:12

I have been searching online and only found commands to retrieve the hostname.

我一直在网上搜索,只找到了检索主机名的命令。

As far as I can make out there is no reverse-resolution mechanism within Oracle itself; it relies on DNS, HOST records or its own Net Management.

就我所知,在Oracle内部没有反向解析机制;它依赖于DNS、主机记录或自己的网络管理。

Is it possible to return the database server's local IP address from an SQL command?

是否可以从SQL命令返回数据库服务器的本地IP地址?

1 个解决方案

#1


3  

SQL> SELECT UTL_INADDR.get_host_address from dual;

GET_HOST_ADDRESS
----------------------------------
192.168.2.5

Following URL would be helpful: http://www.oracle-base.com/articles/misc/identifying-host-names-and-addresses.php

下面的URL可能会有帮助:http://www.oracle-base.com/articles/misc/identifying-host- nam-addresses.php

#1


3  

SQL> SELECT UTL_INADDR.get_host_address from dual;

GET_HOST_ADDRESS
----------------------------------
192.168.2.5

Following URL would be helpful: http://www.oracle-base.com/articles/misc/identifying-host-names-and-addresses.php

下面的URL可能会有帮助:http://www.oracle-base.com/articles/misc/identifying-host- nam-addresses.php