Home >Database >Mysql Tutorial >显示连接Oracle数据库的客户端IP地址

显示连接Oracle数据库的客户端IP地址

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:16:031643browse

显示连接Oracle数据库的客户端IP地址,在数据库中创建登录触发器:利用v$session视图的client_info列可以看到新登录的客户端IP地

1、在数据库中创建登录触发器:

create or replace trigger on_logon_trigger
after logon on database
begin
dbms_application_info.set_client_info(sys_context('userenv', 'ip_address'));
end;
/

2、利用v$session视图的client_info列可以看到新登录的客户端IP地址。

select sid,serial#,username,program,client_info from v$session

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn