To Get server HOST NAME and 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;
/
Using SYS_CONTEXT to get client host address:
select SYS_CONTEXT('USERENV', 'IP_ADDRESS', 15) ipaddr from dual;
Comentários
Postar um comentário