You are here
oracle
Submitted by Graham on Tue, 2006-11-14 11:56
audit create session whenever not successful;
set linesize 120
column OS_USERNAME format a20
column USERHOST format a20
column TERMINAL format a20
column CLIENT_ID format a20
select * from dba_audit_session where returncode != 0;
noaudit create session whenever not successful;
more on auditing
Submitted by Graham on Mon, 2006-11-13 19:00
CREATE TABLE log_messages (
id NUMBER NOT NULL
,message varchar2(255) not null
,logged_time date not null
,username varchar2(38) not null
,sid number not null
) TABLESPACE app_support;
CREATE SEQUENCE log_message_id;
Submitted by Graham on Thu, 2006-10-05 13:41
Metalink note 271855.1 has a script aqcoalesce.sql
To quote from the note
The procedure performs the following operations relating to AQ objects
alter table AQ$_ < QUEUE_TABLE_NAME > _X coalesce;
where X=I (dequeue), T (time_manager), and H (history) IOTS for multi-consumer queue tables and
alter index AQ$_ < QUEUE_TABLE_NAME > _Y rebuild;
where Y=I (dequeue), and T (time-manager) indexes for single-consumer queue tables
Submitted by Graham on Wed, 2006-07-19 16:36
session
on: dbms_system.set_ev(sid,serial#,10046,level,'');
off: dbms_system.set_ev(sid,serial#,10046,0,'');
system wide
on: alter system set events '10046 trace name context forever, level <level>';
off: alter system set events '10046 trace name context off';
levels
4=binds
8=waits
12=binds and waits
Submitted by Graham on Wed, 2006-07-19 16:29
Metalink article 262353.1
essentially
select count (distinct dbms_rowid.rowid_block_number(r.rowid)) "used blocks", blocks "below hwm", empty_blocks "above hwm"
from r, dba_tables
where table_name = '&table_name'
group by blocks, empty_blocks;
|