Friday, November 13, 2009

Free Space in Tempory Tablespace

Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
Connected as apps


SQL>
SQL> SELECT T.TABLESPACE_NAME,
2 NVL(ROUND(((SUM(U.BLOCKS) * P.VALUE) / 1024 / 1024), 2), 0) USED_MB,
3 T.TOT_MB,
4 NVL(ROUND(SUM(U.BLOCKS) * P.VALUE / 1024 / 1024 / T.TOT_MB * 100, 2),
5 0) "USED %"
6 FROM GV$SORT_USAGE U,
7 GV$PARAMETER P,
8 (SELECT TABLESPACE_NAME, SUM(BYTES) / 1024 / 1024 TOT_MB
9 FROM DBA_TEMP_FILES
10 GROUP BY TABLESPACE_NAME) T
11 WHERE P.NAME = 'db_block_size' AND U.TABLESPACE(+) = T.TABLESPACE_NAME
12 GROUP BY T.TABLESPACE_NAME, P.VALUE, T.TOT_MB
13 ORDER BY 1, 2;

TABLESPACE_NAME USED_MB TOT_MB USED %
------------------------------ ---------- ------ ----------
TEMP2 160 6000 2.67

SQL>

No comments:

Post a Comment

Command to do active duplicate for Oracle Database

1. First login to target server 2. Validate tns connectivity between Source DB and Target DB 3. Prepare and validate space availability 4. S...