Mohamed Azar Shaj

Oracle DBA, azarmohds@gmail.com, Riyadh Kingdom Of Saudi Arabia

Oracle Certification ** Oracle-Base ** Export and Import ** Charater set migration

About Me

My photo
Database Administrator and like to read about hackers and them activities...and completed Oracle 10g Certified associate. Active member of Oracle Forum

Undo_Retention

3:18 PM / Posted by Azar Mohamed Shaj /


Rollback Segments are renamed Undo logs.Traditionally transaction undo information stroed in rollback segments until a commit or rollback statment was issued.


Automatic undo management allows the dba to how long undo information should retained after commit.preventing 'snapshot-too old' error on long running queries.


This is done by undo_retention parameter.the default is 900 seconds(5minutes).you can set this parameter to gurantte that oracle keeps undo logs for extended period of time.


rather then having to define rollback segments,you can simply define an undo tablespace and oracle let take the rest and automatic tuning. Undo_management=AUTO
Calculate Undo_Retention:-
Actual undo size :-
sql> Select sum(a.bytes) "Undo_Size" from v$datafile a, v$tablespace b,dba_tablespaces c where c.contents='UNDO' and c.status='ONLINE' and b.name=c.tablespace_name and a.ts#=b.ts#;
Undo block per second :-
sql>select max(undoblks/((end_time-begin_time)*3600*24)) " Undo_block_per_second" from v$undostat;
Db_block_size:-
sql>select to_number(value) from 'db_block_size' from v$parameter where name='db_block_size';

**** 04/04/2008 Oracle 10g OCA 1z0-042 question
Your database is configured for automatic undo management.Undo_retention is set to three hours.You want to fashback a table that was created last year.how far back can the flash back query go?
a.3 hours
b.6months
c.until last year
d.until last commit
e.until the point when the undo tablespace was refreshed.
f.until the database is shutdown and the memory erased.
Ans : A .3 Hours



0 comments:

Post a Comment