http://dbissues.blogspot.com/2016/01/how-to-get-ip-domain-host-product.html
TNS NAMES
---------
tt =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ?)(PORT = ?))
(CONNECT_DATA =
(SID = ?)
)
)
select utl_inaddr.get_host_address(sys_context('userenv','server_host'))
from dual;
how to get server ip address in oracle
================================
1. For Server IP Address
SELECT UTL_INADDR.get_host_address
FROM DUAL
-------------------------------------
2. For Host Name (Server Address)
SELECT UTL_INADDR.get_host_name
FROM DUAL
-------------------------------------
3. For Domain and host name
SELECT sys_context('USERENV', 'HOST')
FROM dual;
----------------------------------------------
4. For host name (TO Check, wether Live or Clone)
SELECT sys_context('USERENV', 'SERVER_HOST')
FROM dual;
------------------------------------------------------
For Product Version
--------------------
SELECT PRODUCT, VERSION FROM SYS.PRODUCT_COMPONENT_VERSION;
For Operating System Version
----------------------------
select dbms_utility.port_string from dual;
----------------------------------------------
select * from V$version;
select * from V$instance;
----------------------------------
System Network IP Address and Port
-------------------------------------
select sys_context('userenv', 'ip_address') ip_address, port
from gv$session
where gv$session.inst_id = sys_context('userenv', 'instance')
and gv$session.sid = sys_context('userenv', 'sid');
Profile Option:
---------------
AMS : Server URL
Helpfull Knowledge!
ReplyDelete