Tuesday, September 17, 2013

Tablespace Info

-----------------------------------
-Tablespace less than 20% free
-Hot Backup Status
-Datafiles info for given Tablespace
------------------------------------

SELECT a.tablespace_name,b.size_kb,a.free_kb,Trunc((a.free_kb/b.size_kb) * 100) "FREE_%" FROM
(SELECT tablespace_name,Trunc(Sum(bytes)/1024) FREE_KB FROM   dba_free_space GROUP BY tablespace_name) a,
(SELECT tablespace_name,Trunc(Sum(bytes)/1024) SIZE_KB FROM   dba_data_files GROUP BY tablespace_name) b
WHERE  a.tablespace_name = b.tablespace_name AND Round((a.free_kb/b.size_kb) * 100,2) < 20
/
select unique status from v$backup
/
col file_name for a60
set line 150
col "Auto Extend" for a10
SELECT tablespace_name,file_name,autoextensible "Auto Extend",bytes/1024/1024 "Used in MB",maxbytes/1024/1024 "Max in MB",increment_by
FROM dba_data_files where tablespace_name='&T_NAME' order by file_name

No comments:

Post a Comment

NLS boot file not found or invalid opmnctl ping – EBS 12.2 ADCFGCLONE FAIL

Error: adcfgclone.pl failed while performing clone of EBS 12.2 instance. This occurred while ohsT2PApply is in progress. INST_TOP/adm...