Thursday, June 02, 2005

 

dbls.sql


column object_name format a30
column tablespace_name format a30
column object_type format a12
column status format a1

break on object_type skip 1

select object_type, object_name,
decode( status, 'INVALID', '*', '' ) status,
decode( object_type,
'TABLE', (select tablespace_name from user_tables where
table_name = object_name),
'INDEX', (select tablespace_name from user_indexes where
index_name = object_name),
null ) tablespace_name
from user_objects a
where object_name like upper('%&1%')
order by object_type, object_name
/
clear break
column status off

This page is powered by Blogger. Isn't yours?