标签:
utl_inaddr 的使用
(1)获取本地主机名(host_name)和地址(host_address) SET serveroutput on BEGIN DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_NAME); -- get local host name DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_ADDRESS); -- get local IP addr END; / (2)根据host_name 获取address或根据address取name UTL_INADDR.GET_HOST_ADDRESS ( host IN VARCHAR2 DEFAULT NULL) RETURN host_address VARCHAR2; --host The name of the host to retrieve the IP address. --host_address The IP address of the specified host, or that of the local host if host is NULL. UTL_INADDR.GET_HOST_NAME ( ip IN VARCHAR2 DEFAULT NULL) RETURN host_name VARCHAR2; --ip The IP address of the host used to determine its host name. If ip is not NULL, the official name of the host with its domain name is returned. --If this is NULL, the name of the local host is returned and the name does not contain the domain to which the local host belongs. --host_name The name of the local or remote host of the specified IP address.
PLSQL NOTE--------network utl_inaddr package
标签:
原文地址:http://www.cnblogs.com/ct-blog/p/5498192.html