patternMinor
What units used in DBA_TABLESPACE_USAGE_METRICS?
Viewed 0 times
unitsusedwhatdba_tablespace_usage_metrics
Problem
What units are used in the usage metrics (
The Oracle Database Reference only tells they are the "Total space consumed by the tablespace" and "Total size of the tablespace", without mentioning units. Are they in bytes? Megabytes? Blocks?
USED_SPACE and TABLESPACE_SIZE columns) described in Oracle's DBA_TABLESPACE_USAGE_METRICS static data dictionary view?The Oracle Database Reference only tells they are the "Total space consumed by the tablespace" and "Total size of the tablespace", without mentioning units. Are they in bytes? Megabytes? Blocks?
Solution
Blocks. Blocks are the units of the
EDIT: I'm not sure what is the meaning of USED_SPACE for undo tablespace though. For example:
DBA_TABLESPACE_USAGE_METRICS.USED_SPACE and DBA_TABLESPACE_USAGE_METRICS.TABLESPACE_SIZE. The latter column accounts for possible AUTOEXTEND MAXSIZE.EDIT: I'm not sure what is the meaning of USED_SPACE for undo tablespace though. For example:
SQL> SELECT tablespace_name, sum(blocks), status FROM dba_undo_extents GROUP BY tablespace_name, status ;
TABLESPACE_NAME SUM(BLOCKS) STATUS
------------------------------ ----------- ---------
UNDOTBS1 128 ACTIVE
UNDOTBS1 5312 UNEXPIRED
UNDOTBS1 8960 EXPIRED
SQL> select USED_SPACE from DBA_TABLESPACE_USAGE_METRICS WHERE TABLESPACE_NAME='UNDOTBS1';
USED_SPACE
----------
2864
SQL> show parameter block_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_block_size integer 8192Code Snippets
SQL> SELECT tablespace_name, sum(blocks), status FROM dba_undo_extents GROUP BY tablespace_name, status ;
TABLESPACE_NAME SUM(BLOCKS) STATUS
------------------------------ ----------- ---------
UNDOTBS1 128 ACTIVE
UNDOTBS1 5312 UNEXPIRED
UNDOTBS1 8960 EXPIRED
SQL> select USED_SPACE from DBA_TABLESPACE_USAGE_METRICS WHERE TABLESPACE_NAME='UNDOTBS1';
USED_SPACE
----------
2864
SQL> show parameter block_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_block_size integer 8192Context
StackExchange Database Administrators Q#16160, answer score: 6
Revisions (0)
No revisions yet.