UTL_INADDR°ü»ñÈ¡ipµØÖ·µÄÄÚ²¿Ô­Àí_OracleÊý¾Ý¿â_ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤»ùµØ--Powered by WWW.RONGSEN.COM.CN

UTL_INADDR°ü»ñÈ¡ipµØÖ·µÄÄÚ²¿Ô­Àí

×÷ÕߣººÚ¿Í·ÀÏßÍø°²Oracleά»¤»ùµØ À´Ô´£ººÚ¿Í·ÀÏßÍø°²Oracleά»¤»ùµØ ä¯ÀÀ´ÎÊý£º0

±¾Æª¹Ø¼ü´Ê£ºOracleÊý¾Ý¿âOracleÊý¾Ý¿â
ºÚ¿Í·ÀÏßÍø°²ÍøѶ£º½ñÌìÓÐÅóÓÑÔÚMSNÉÏÎÊÎÒÈçºÎ»ñµÃÒѾ­Á¬½ÓÓû§µÄµØÖ·¡£ÎÒÃÇÖªµÀ£¬Í¨¹ýSYS_CONTEXTº¯Êý¿ÉÒÔ»ñµÃÕⲿ·ÖÐÅÏ¢£¬µ±Ç°Óû§µÄipµÈÐÅÏ¢¿ÉÒÔͨ¹ýÈçÏÂÃüÁîÇáÒ×»ñÈ¡£ºSQL> select sys_context('usere...

½ñÌìÓÐÅóÓÑÔÚMSNÉÏÎÊÎÒÈçºÎ»ñµÃÒѾ­Á¬½ÓÓû§µÄµØÖ·¡£

ÎÒÃÇÖªµÀ£¬Í¨¹ýSYS_CONTEXTº¯Êý¿ÉÒÔ»ñµÃÕⲿ·ÖÐÅÏ¢£¬µ±Ç°Óû§µÄipµÈÐÅÏ¢¿ÉÒÔͨ¹ýÈçÏÂÃüÁîÇáÒ×»ñÈ¡£º

SQL> select sys_context('userenv','host') from dual;
SYS_CONTEXT('USERENV','HOST')
--------------------------------------------------------------------------------
WORKGROUPGQGAI

SQL> select sys_context('userenv','ip_address') from dual;

SYS_CONTEXT('USERENV','IP_ADDR
--------------------------------------------------------------------------------
172.16.34.20

¿ÉÊÇÈç¹ûÎÒÃÇÏ£Íû»ñÈ¡ÆäËüsessionµÄµØÖ·ÐÅÏ¢µÈ£¬Í¨¹ýSYS_CONTEXTº¯Êý¾ÍÖ»ÄÜͨ¹ýLOGON´¥·¢Æ÷À´Íê³É¡£

¶øÈç¹ûûÓд¥·¢Æ÷¼Ç¼£¬ÔòÎÒÃÇ¿ÉÒÔͨ¹ýUTL_INADDR PackageÀ´ÊµÏÖ¡£
ÎÒÃÇ¿´Ò»ÏÂUTL_INADDR°ü»ñÈ¡ipµÈÐÅÏ¢µÄʵÏÖÔ­Àí¡£

ÎÒÃÇÔÚÊý¾Ý¿âÖнøÐÐÈçϲéѯ£º

[oracle@jumper oracle]$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Wed Oct 25 11:24:22 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

SQL> !
[oracle@jumper oracle]$ ps -ef|grep sql
oracle 14700 14663 1 11:24 pts/0 00:00:00 sqlplus
oracle 14732 14702 0 11:24 pts/0 00:00:00 grep sql
[oracle@jumper oracle]$ ps -ef|grep LO
oracle 14701 14700 0 11:24 ? 00:00:00 oracleeygle (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 14734 14702 0 11:24 pts/0 00:00:00 grep LO
[oracle@jumper oracle]$ exit
exit

SQL> SELECT UTL_INADDR.get_host_address('www.anysql.net') from dual;

UTL_INADDR.GET_HOST_ADDRESS('WWW.ANYSQL.NET')
---------------------------------------------------------------------
208.113.151.109

    ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤·½°¸±¾ÆªÁ¬½Ó£ºhttp://www.rongsen.com.cn/show-12494-1.html
Íøվά»¤½Ì³Ì¸üÐÂʱ¼ä:2012-03-23 00:41:33  ¡¾´òÓ¡´ËÒ³¡¿  ¡¾¹Ø±Õ¡¿
ÎÒÒªÉêÇë±¾Õ¾£ºNµã | ºÚ¿Í·ÀÏß¹ÙÍø |  
רҵ·þÎñÆ÷ά»¤¼°Íøվά»¤ÊÖ¹¤°²È«´î½¨»·¾³£¬ÍøÕ¾°²È«¼Ó¹Ì·þÎñ¡£ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤»ùµØÕÐÉ̽øÐÐÖУ¡QQ:29769479

footer  footer  footer  footer