SELECT a.file_name,
substr(A.tablespace_name,1,14) tablespace_name,
trunc(decode(A.autoextensible,'YES',A.MAXSIZE-A.bytes+b.free,'NO',b.free)/1024/1024) free_mb,
trunc(a.bytes/1024/1024) allocated_mb,
trunc(A.MAXSIZE/1024/1024) capacity,
a.autoextensible ae
FROM (
SELECT file_id, file_name,
tablespace_name,
autoextensible,
bytes,
decode(autoextensible,'YES',maxbytes,bytes) maxsize
FROM dba_data_files
GROUP BY file_id, file_name,
tablespace_name,
autoextensible,
bytes,
decode(autoextensible,'YES',maxbytes,bytes)
) a,
(SELECT file_id,
tablespace_name,
sum(bytes) free
FROM dba_free_space
GROUP BY file_id,
tablespace_name
) b
WHERE a.file_id=b.file_id(+)
AND A.TABLESPACE_NAME=B.TABLESPACE_NAME(+)
ORDER BY A.tablespace_name ASC;
Saturday, April 15, 2017
SQL query for finding all table spaces and their sizes in oracle database
Subscribe to:
Post Comments (Atom)
Opatch reports 'Cyclic Dependency Detected' error when patching ODI Issue: When applying a Patch Set Update (PSU) to WebLogic Se...
-
1. Creating a directory in hdfs $ hdfs dfs -mkdir <paths> 2. List the directories in hdfs $ hdfs dfs -l...
-
Prerequisites: 1. Java jdk 1.6+ 2. Maven 3.3.9 3. Hadoop 2.x Installing Oozie 4.3...
-
In general when we leave the database connection opened for a while in oracle sql developer, It will throw a "connection timeout"...
No comments:
Post a Comment