For ALR: Analyze Objects, use RMINC_run_stat.sql For ALR: Coalesce Tablespaces, use RMINC_run_coal.sql For ALR: Rebuild Indexes, use RMINC_run_ixrb.sql For ALR: Indexes Too Large or Fragmented: select s.owner, s.segment_name, s.bytes, s.extents, t.pct_increase, :maxbytes, :maxextents, i.name into &OWNER, &TABLE_NAME, &BYTES, &EXTENTS, &EXTPCT, &MAXBYTES, &MAXEXTENTS, &DBINSTANCE from dba_segments s, dba_tables t, sys.v_$database i where s.segment_type = 'TABLE' and s.segment_name like decode(upper(:table_name),'ALL','%',upper(:table_name)) and s.segment_name = t.table_name and s.tablespace_name = t.tablespace_name and s.owner like decode(upper(:user),'ALL','%',upper(:user)) and s.owner = t.owner and ((upper(:check_bytes) = 'YES' and s.bytes > :maxbytes) or (upper(:check_extents) = 'YES' and s.extents > :maxextents)) order by s.owner, s.segment_name For ALR: Indexes Unable to Allocate Another Extent: SELECT di.tablespace_name, di.index_name, di.pct_increase, di.next_extent*power(1.+di.pct_increase/100.,ds.extents-1), i.name INTO &TABLESPACE, &INDEX_NAME, &PCTINC, &NXTEXT, &DBINSTANCE FROM dba_indexes di, dba_segments ds, dba_free_space df, sys.v_$database i WHERE di.tablespace_name = ds.tablespace_name and ds.segment_type = 'INDEX' and di.owner = ds.owner and di.index_name = ds.segment_name and df.tablespace_name = di.tablespace_name and ds.owner = decode(upper(:user),'ALL',ds.owner,upper(:user)) and ds.segment_name like decode(upper(:index_name),'ALL','%',upper(:index_name)) GROUP BY di.tablespace_name, di.index_name, di.pct_increase, di.next_extent*power(1.+di.pct_increase/100.,ds.extents-1),i.name HAVING max(df.bytes) < di.next_extent*power(1.+di.pct_increase/100.,ds.extents-1) For ALR: Tables Too Large or Fragmented select s.owner, s.segment_name, s.bytes, s.extents, t.pct_increase, :maxbytes, :maxextents, i.name into &OWNER, &TABLE_NAME, &BYTES, &EXTENTS, &EXTPCT, &MAXBYTES, &MAXEXTENTS, &DBINSTANCE from dba_segments s, dba_tables t, sys.v_$database i where s.segment_type = 'TABLE' and s.segment_name like decode(upper(:table_name),'ALL','%',upper(:table_name)) and s.segment_name = t.table_name and s.tablespace_name = t.tablespace_name and s.owner like decode(upper(:user),'ALL','%',upper(:user)) and s.owner = t.owner and ((upper(:check_bytes) = 'YES' and s.bytes > :maxbytes) or (upper(:check_extents) = 'YES' and s.extents > :maxextents)) order by s.owner, s.segment_name For ALR: Tables Unable to Allocate Another Extent: SELECT dt.tablespace_name, dt.table_name, dt.pct_increase, dt.next_extent*power(1.+dt.pct_increase/100.,ds.extents-1), i.name INTO &TABLESPACE, &TABLE_NAME, &PCTINC, &NXTEXT, &DBINSTANCE FROM dba_tables dt, dba_segments ds, dba_free_space df, sys.v_$database i WHERE dt.tablespace_name = ds.tablespace_name and ds.segment_type = 'TABLE' and dt.owner = ds.owner and dt.table_name = ds.segment_name and df.tablespace_name = dt.tablespace_name and ds.owner = decode(upper(:user),'ALL',ds.owner,upper(:user)) and ds.segment_name like decode(upper(:table_name),'ALL','%',upper(:table_name)) GROUP BY dt.tablespace_name, dt.table_name, dt.pct_increase, dt.next_extent*power(1.+dt.pct_increase/100.,ds.extents-1), i.name HAVING max(df.bytes) < dt.next_extent*power(1.+dt.pct_increase/100.,ds.extents-1) ORDER BY dt.tablespace_name, dt.table_name