O select abaixo permite descobrir quais as tablespaces que estão relacionadas a um owner no oracle:

SELECT DISTINCT
       T.OWNER,
       T.TABLESPACE_NAME,
       TS.STATUS,
       DF.FILE_NAME,
       DF.BYTES,
       DF.STATUS
  FROM DBA_TABLES T
 INNER JOIN DBA_TABLESPACES TS
    ON TS.TABLESPACE_NAME = T.TABLESPACE_NAME
 INNER JOIN DBA_DATA_FILES DF
    ON DF.TABLESPACE_NAME = TS.TABLESPACE_NAME
 WHERE T.TABLESPACE_NAME IS NOT NULL
   AND UPPER(T.OWNER) = 'SEU_OWNER'
 ORDER BY T.OWNER
Anúncios