oracle list tablespaces
SELECT DISTINCT TABLESPACE_NAME FROM DBA_EXTENTS ORDER BY TABLESPACE_NAME;
SELECT TABLESPACE_NAME,
sum(BYTES / 1024 / 1024) AS MB
FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME;
oracle list tablespaces
SELECT DISTINCT TABLESPACE_NAME FROM DBA_EXTENTS ORDER BY TABLESPACE_NAME;
SELECT TABLESPACE_NAME,
sum(BYTES / 1024 / 1024) AS MB
FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME;
oracle tablespace tables list
SELECT e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME, sum(e.bytes) / 1048576 AS Megs
FROM dba_extents e
WHERE
e.OWNER = 'MY_USER' AND
e.TABLESPACE_NAME = 'MY_TABLESPACE'
GROUP BY e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME
ORDER BY e.TABLESPACE_NAME, e.SEGMENT_NAME;
oracle tablespace usage
-- Size and usage of tablespaces
SELECT T1.TABLESPACE_NAME,
T1.BYTES / 1024 / 1024 as "bytes_used (Mb)",
T2.BYTES / 1024 / 1024 as "bytes_free (Mb)",
T2.largest / 1024 / 1024 as "largest (Mb)",
round(((T1.BYTES - T2.BYTES) / T1.BYTES) * 100, 2) percent_used
FROM (
select TABLESPACE_NAME,
sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
) T1,
(
select TABLESPACE_NAME,
sum(BYTES) BYTES,
max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
) T2
where T1.TABLESPACE_NAME = T2.TABLESPACE_NAME
order by ((T1.BYTES - T2.BYTES) / T1.BYTES) desc;
Tablespace ORACLE
CREATE TABLESPACE
TBS_NOME_TABLESPACE
DATAFILE 'NOME_DATAFILE.dbf' SIZE 40M ONLINE;
Tablespace ORACLE
CREATE TABLE TB_NOME_TABELA
(
CODIGO NUMBER(38)
)TABLESPACE TBS_NOME_TABLESPACE;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us