本文主要是介绍oracle 查询 主机名和对应的IP地址,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
–查询对应的IP地址
select count(1), machine, a.CLIENT_INFO from v$session a group by machine, CLIENT_INFO;
–查询对应的主机名、IP地址
select distinct w.machine, a.CLIENT_INFO from DBA_HIST_ACTIVE_SESS_HISTORY w, v$session a where w.sql_exec_start >= sysdate - 30
–and w.machine not in (‘db2’,‘db1’)
and a.MACHINE = w.machine
—或者 select distinct w.machine, a.CLIENT_INFO from v a c t i v e s e s s i o n h i s t o r y w , v active_session_history w, v activesessionhistoryw,vsession a where w.sql_exec_start >= sysdate - 30
–and w.machine not in (‘db2’,‘db1’)
and a.MACHINE = w.machine
转载于:https://www.cnblogs.com/ss-33/p/8986837.htmloracle
这篇关于oracle 查询 主机名和对应的IP地址的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!