可以利用登录触发器,如 CREATE OR REPLACE TRIGGER tr_login_record AFTER logon ON DATABASE DECLARE miUserSid NUMBER; mtSession v$session%ROWTYPE; CURSOR cSession(iiUserSid IN NUMBER) IS SELECT * FROM v$session WHERE sid=iiUserSid; BEGIN SELECT sid INTO miUserSid
可以采用dml触发器,如 CREATE OR REPLACE TRIGGER tr_capt_sql BEFORE DELETE OR INSERT OR UPDATE ON manager.test DECLARE sql_text ora_name_list_t; state_sql capt$sql.sql_text%TYPE; BEGIN FOR i IN 1..ora_sql_txt(sql_text) LOOP state_sql := state_sql || sql_text(i