wait events with discriptions

original db file sequential reads Possible Causes : · Use of an unselective index · Fragmented Indexes · High I/O on a particular disk or mount point · Bad application design · Index reads performance can be affected by slow I/O subsystem and/or poor database files layout, which result in a higher average wait time […]

trace trigger

grant execute on dbms_monitor to some_user db username: [code language=»sql»] CREATE OR REPLACE TRIGGER trace_some_user AFTER LOGON ON some_user.SCHEMA BEGIN execute immediate ‘alter session set timed_statistics = true’; execute immediate ‘alter session set max_dump_file_size = unlimited’; execute immediate ‘alter session set tracefile_identifier = »some_user»’; dbms_monitor.session_trace_enable (null,null,true,true); END; [/code] Os username: [code language=»sql»] CREATE OR REPLACE […]

Create restore point without sysdba role

create procedure to create\drop restore point: [code language=»sql»] create or replace procedure sys.restore_point_proc ( g_operation in varchar2 DEFAULT ‘LIST’, g_rp_name in varchar2 DEFAULT NULL) as l_rp_check varchar2(20); e_rp_name_t EXCEPTION; e_rp_name_f EXCEPTION; e_not_valid_input EXCEPTION; e_rp_check EXCEPTION; begin select count(*) into l_rp_check from v$restore_point where upper(name)=upper(g_rp_name); CASE upper(g_operation) when ‘CREATE’ THEN if l_rp_check >0 then dbms_output.put_line (‘Restore […]