Oracle function: Get Internet host name and IP address

Source: Internet
Author: User
Tags query
Oracle Package UTL_INADDR
Role: Used to obtain host names and IP addresses in the LAN or Internet environment.
1. IP address in utl_inaddr.get_host_address environment
Prompt for system error if query fails
Query www.qq.com IP Address
Select Utl_inaddr.get_host_address (' www.qq.com ') from dual;
Querying native IP addresses
Select Utl_inaddr.get_host_address () from dual;
Query the IP address of Yuechu within the LAN
Select Utl_inaddr.get_host_address (' Yuechu ') from dual;
2, Utl_inaddr.get_host_name return the host name in the environment
Returns the native host name
Select Utl_inaddr.get_host_name () from dual;
Returns the host name of the specified IP address within the LAN
Select Utl_inaddr.get_host_name (' 192.168.0.156 ') from dual;
Returns the URL of the specified IP address in intrenet
Select Utl_inaddr.get_host_name (' 219.153.50.84 ') from dual;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.