Difference between revisions of "Oracle"

From Tom's notes
Jump to navigation Jump to search
(Created page with "=DBA / Tuning= ==Index monitoring== Enable monitoring: <source lang="sql"> select 'alter index ' || owner || '.' || index_name || ' monitoring;' from dba_indexes where owne...")
 
Line 3: Line 3:
 
Enable monitoring:
 
Enable monitoring:
 
<source lang="sql">
 
<source lang="sql">
select 'alter index ' || owner || '.' || index_name || ' monitoring;'
+
select 'alter index ' || owner || '.' || index_name || ' monitoring usage;'
 
   from dba_indexes
 
   from dba_indexes
 
  where owner = '?'
 
  where owner = '?'

Revision as of 11:52, 31 March 2016

DBA / Tuning

Index monitoring

Enable monitoring:

select 'alter index ' || owner || '.' || index_name || ' monitoring usage;'
  from dba_indexes
 where owner = '?'
   and index_type not in ('LOB');

Verify, make sure to connect as the owner of the objects you are monitoring:

select *
   from v$object_usage;