1.对客服提交数据的ip地址记录. 获取ip地址的方法: public function getIP() { global $ip; if (getenv("HTTP_X_REAL_IP")) $ip = getenv("HTTP_X_REAL_IP"); else if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if(getenv(&quo
//实现详细记录登陆过系统的用户,IP地址,shell命令及详细操作的时间 将下面代码加入/etc/profile //history USER_IP = who -u am i 2> /dev/null | awk '{print $NF}'| sed -e 's/[()] //g' HISTDIR = /usr/share/.history if [ -z $USER_IP ] then USER_IP = hostname fi if [ ! -d $HISTDIR ] then mkdi
----触发器--- ---创建中间插入的表 create table session_history tablespace bap_data as (select sid,username,program,machine,'000.000.000.000'ipadd,sysdate moditime from v$session where 0=1); ---创建触发器---只要登陆数据库就触发 create or replace trigger on_logon_trigger after