Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Search if tables fo an schema are used
Hi,
I need to audit a third-party software. They want to check whom is
using any of their software tables. I can't set the instance in AUDIT
because this will be made independent of cliente configuration and
without changing any parameter.
Once solution was to create triggers in some tables.
The other is to check every 30 minutos all the selects sql used by the
connected users.
But is this ok??
I've tried to set variable v_sql with the complete SQL command and
then search for the schema.
FOR v_proc in (
SELECT UNIQUE vs.sid,vs.username,c.address,v.piece,v.sql_text
FROM sys.V_$SQLTEXT v,sys.v_$open_cursor c, sys.v_$session vs
WHERE c.saddr=vs.saddr AND v.address = c.address AND v.hash_value = c.hash_value AND v.command_type = 3
IF INSTR(v_sql,'SCHEMA_I_SEARCH.') > 0 THEN
END IF; v_sql := UPPER(v_proc.sql_text); ELSE v_sql := v_sql || UPPER(v_proc.sql_text);END IF;