Oracle PL/SQL get server's IP v4?

余生颓废 提交于 2019-11-28 04:46:58

问题


How can I get the IP v4 Of the server by using PL/SQL ? UTL_INADDR.GET_HOST_ADDRESS gives me IPv6, while I need IPv4

what I did I disabled the IPv6 on the sever, still it's bringing me the the IPv6 of the "Tunnel adapter Teredo Tunneling Pseudo-Interface" !!

I'm using Oracle 11g database on Windows 2008 R2 Server


回答1:


UTL_INADDR.GET_HOST_ADDRESS returns just an ip which is nonsense since a server may have dozens of them. Probably your best bet it's to create a pl/sql wrapper of a Java method which returns every possible ip address using NetworkInterface.getNetworkInterfaces();



来源:https://stackoverflow.com/questions/6267905/oracle-pl-sql-get-servers-ip-v4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!