sb92075 wrote:The following statement above produced an extremely large scrolling list which ran well past my scroll back buffer...
SELECT OWNER, OBJECT_NAME, CREATED FROM ALL_OBJECTS;
What exactly is that command showing me? All users on the entire database system? Is there something I can filter with to just show me regular (non-system) users for example, like my user account being 'cmennens'?
74361 rows selected.
I was going to start and remove the user roles and assigned schemas for all non-system accounts that had no tables and or data in it.What if it is a database account that, although not owning any objects (tables) in the database, has been granteed access (SELECT , INSERT/UPDATE/DELETE) to another schema's objects ? This non-owning database account might be in use for a particular application or user.
will list database accounts that don't own objects.
select username from dba_users where username not in (select distinct(owner) from dba_objects);
select owner,round(sum(bytes)/1024/1024,0) from dba_segments where owner not like '%SYS%' and owner not in('PERFSTAT','OUTLN','XDB') group by owner order by 2 desc; select 'drop table '|| owner ||'.'|| table_name ||';' from dba_tables where owner in ('&owner'); drop user <owner> cascade;