You should check the status of Oracle tablespace frequently. When the idle ratio is too low, you should consider increasing the table's viewing space. Check the following SQL statement: Method 1: selectdbf. tab
You should check the status of Oracle tablespace frequently. When the idle ratio is too low, you should consider increasing the table's viewing space. Check the following SQL statement: Method 1: select dbf. tab
You should check the status of the Oracle tablespace frequently. When the idle ratio is too low, you should consider increasing the table's viewing space. The method is as follows:
Method 1:
Select dbf. tablespace_name,
Dbf. totalspace "Total (M )",
Dbf. Total number of totalblocks as blocks,
Dfs. freespace "total remaining amount (M )",
Dfs. freeblocks "remaining blocks ",
(Dfs. freespace/dbf. totalspace) * 100 "idle percentage"
From (select t. tablespace_name,
Sum (t. bytes)/1024/1024 totalspace,
Sum (t. blocks) totalblocks
From dba_data_files t
Group by t. tablespace_name) dbf,
(Select tt. tablespace_name,
Sum (tt. bytes)/1024/1024 freespace,
Sum (tt. blocks) freeblocks
From dba_free_space tt
Group by tt. tablespace_name) dfs
Where trim (dbf. tablespace_name) = trim (dfs. tablespace_name)
Method 2:
SELECT Total. name "Tablespace Name ",
Free_space, (total_space-Free_space) Used_space, total_space
FROM
(Select tablespace_name, sum (bytes/1024/1024) Free_Space
From sys. dba_free_space
Group by tablespace_name
) Free,
(Select B. name, sum (bytes/1024/1024) TOTAL_SPACE
From sys. v _ $ datafile a, sys. v _ $ tablespace B
Where a. ts # = B. ts #
Group by B. name
) Total
WHERE Free. Tablespace_name = Total. name