Hay que aplicar el monitoreo, casos básicos:
/*
select * from v$resource_limit where resource_name = 'processes' or resource_name = 'sessions'
SELECT * FROM V$SQL
SELECT * FROM V$OPEN_CURSOR
SELECT /*+ choose */
s.status "Status", s.serial# "Serial#", s.TYPE "Type",
s.username "DB User", s.osuser "Client User", s.server "Server",
s.machine "Machine", s.module "Module", s.terminal "Terminal",
s.program "Program", p.program "O.S. Program",
s.logon_time "Connect Time", lockwait "Lock Wait",
si.physical_reads "Physical Reads", si.block_gets "Block Gets",
si.consistent_gets "Consistent Gets",
si.block_changes "Block Changes",
si.consistent_changes "Consistent Changes", s.process "Process",
p.spid, p.pid, si.sid, s.sql_address "Address",
s.sql_hash_value "Sql Hash", s.action
FROM v$session s, v$process p, sys.v_$sess_io si
WHERE s.paddr = p.addr(+)
AND si.sid(+) = s.sid
AND (s.username IS NOT NULL)
AND (NVL (s.osuser, 'x') <> 'SYSTEM')
AND (s.TYPE <> 'BACKGROUND')
ORDER BY 4 DESC
select username, action_name, priv_used, returncode from dba_audit_trail
select name, value from v$parameter
where name like 'audit_trail'
select * from dba_audit_trail WHERE TO_CHAR(TIMESTAMP, 'DD/MM/YYYY') = '08/02/2010'
select count(*), userhost,TIMESTAMP, os_username from dba_audit_trail group by TIMESTAMP, userhost, os_username order by TIMESTAMP, userhost, os_username
*/
No hay comentarios:
Publicar un comentario