码迷,mamicode.com
首页 > 数据库 > 详细

PLSQL NOTE--------network utl_inaddr package

时间:2016-05-16 17:32:44      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!