How To Check UNDO Tablespace Usage
How To Check UNDO Tablespace Usage
How To Check UNDO Tablespace Usage
6 rows selected.
Find out what user and which SQL statement is eating up all the UNDO space.
executing transaction.
TEMP
select * from
(SELECT
d.tablespace_name,a.sid,a.serial#,a.program,a.module,a.action,a.username "DB
Username",a.osuser,ROUND((b.blocks*d.block_size)/1024/1024,2) "Used
MB",c.sql_text
FROM v$session a, v$tempseg_usage b, v$sqlarea c,dba_tablespaces d
WHERE a.saddr = b.session_addr AND c.address= a.sql_address AND c.hash_value
= a.sql_hash_value AND d.tablespace_name=b.tablespace ORDER BY
b.tablespace, b.blocks DESC)
where rownum <=10
cursor bigtemp_sids is
select * from (
select s.sid,
s.status,
s.sql_hash_value sesshash,
u.SQLHASH sorthash,
s.username,
u.tablespace,
sum(u.blocks*p.value/1024/1024) mbused ,
sum(u.extents) noexts,
nvl(s.module,s.program) proginfo,
floor(last_call_et/3600)||':'||
floor(mod(last_call_et,3600)/60)||':'||
mod(mod(last_call_et,3600),60) lastcallet
from v$sort_usage u,
v$session s,
v$parameter p
where u.session_addr = s.saddr
and p.name = 'db_block_size'
group by s.sid,s.status,s.sql_hash_value,u.sqlhash,s.username,u.tablespace,
nvl(s.module,s.program),
floor(last_call_et/3600)||':'||
floor(mod(last_call_et,3600)/60)||':'||
mod(mod(last_call_et,3600),60)
order by 7 desc,3)
where rownum < 11;
SELECT *
FROM database_properties
WHERE property_name like '%TABLESPACE';
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------------ ------------------------------ --------------------------------------
DEFAULT_TEMP_TABLESPACE TEMP Name of default temporary tablespace
DEFAULT_PERMANENT_TABLESPACE USERS Name of default permanent
tablespace
i.block_changes
ORDER BY 5 desc, 1, 2, 3, 4;
........
19 rows selected.
Find numbers of archive generated per day
SELECT TO_CHAR(FIRST_TIME,'DD-MON-YYYY HH24'),
COUNT(*)
FROM V$LOGHIST
WHERE TO_CHAR(FIRST_TIME,'DD-MON-YY HH24') > '01-NOV-2013'
GROUP BY TO_CHAR(FIRST_TIME,'DD-MON-YYYY HH24')
ORDER BY TO_CHAR(FIRST_TIME,'DD-MON-YYYY HH24') ASC
select decode(grouping
(trunc(COMPLETION_TIME)),1,'TOTAL',TRUNC(COMPLETION_TIME)) TIME,
SUM(BLOCKS * BLOCK_SIZE)/1024/1024/1024 SIZE_MB
from V$ARCHIVED_LOG group by cube (trunc (COMPLETION_TIME)) order by 1
This script will report on all currently running RMAN backups like full, incremental & archivelog backups:
V$rman_output