- 先创建个触发器获取ip
create or replace trigger on_logon_trigger
after logon on database
begin
dbms_application_info.set_client_info(sys_context( 'userenv', 'ip_address' ) );
end;
- 可以使用下方语句查看session的ip
select /*+ PARALLEL(4) */ a.inst_id,
a.sid,
a.schemaname,
a.machine,
a.program,
a.client_info,
b.INSTANCE_NAME || '_ora_' || c.SPID || '.trc' file_name ,
D.VALUE file_path
from gv$session a, gV$instance b, gv$process c, gv$system_parameter d
where a.inst_id = b.inst_id
and a.inst_id = c.INST_ID
and a.PADDR = c.ADDR
and a.INST_ID = d.INST_ID
and sid=
标签:gv,ip,session,inst,oracle,INST,id
From: https://www.cnblogs.com/BY1314/p/17996785