how to list of all users who own tables in more than one tablespace.
Printable View
how to list of all users who own tables in more than one tablespace.
Something like this?
HTH,Code:select owner
from (select owner,count(tablespace_name) from dba_tables group by owner)
group by owner
having count(*)>1
/
Erik
Code:select
owner
from
dba_tables
where
partitioned = 'NO'
group by
owner
having count(distinct tablespace)>1
union
select
owner
from
dba_tab_partitions
group by
owner
having count(distinct tablespace)>1
cool trumps simple every time!