Saturday, February 14, 2009

HOW to check the maximum flashback possible of a database

If you want to check how far back you can flashback the database.please do following:
sql> alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS';
Session altered.
sql> select * from v$flashback_database_log;

-------------------- -------------------- ---------------- -------------- ----------------------------------------------------------------------------------------------
14-FEB-2009 12:37:20----- 1440------ 8192000--------73728

so we can flashback database to any time in betweeen upto 14-feb-2009 till 12:37:20 or upto the scn number 907191. but the condition is , we should have the flashback logs available and the archived logs are also available. Because flashback feature uses archive logs to undo the changes.

OLDEST_FLASHBACK_SCN-->The oldest SCN to which you can flash back the database.
OLDEST_FLASHBACK_TIME-->The earliest time to which you can flash back the database.
RETENTION_TARGET-->The initialization parameter db_flashback_retention_target
determines how long the flashback logs are retained,values measurement is in minutes.
Current size (in bytes) of the flashback data.
Estimated size of flashback data needed for the current target retention(will be discussed shortly)

This parameter value decides how long the flashback logs should be kept. remember undo_retention parameter, it behaves the same way. It will keep the flashback logs for that much time but still conditions apply.....
as it depends on the size of flash recovery area also.DB_RECOVERY_FILE_DEST_SIZE decides the size of flashback recovery area. So,
DB_FLASHBACK_RETENTION_TARGET will try to keep the flashback logs until the time , if it has sufficient space. If not , FRA will delete the oldest logs to keep new one.the reverse of this, if space is enough , it can keep logs more than the time mentioned in DB_FLASHBACK_RETENTION_TARGET parameter.

in my query to v$flashback_database_log you can see FLASHBACK_SIZE is 8192000(which is 8 MB almost) and ESTIMATED_FLASH_SIZE is 73728(which is 72 KB).So, as of my retention parameter i require 72 kb of space and compare to that i have 8MB. So it will be well enough . But on the real time active database,the reverse is almost always true.


have a nice day


Anonymous said...

Me and ozzy fucked tougher, trying to show to our god!
FUCK YES!' right before cumming inside my warm pussy. were still fucking

Feel free to visit my web-site - hcg injections

Anonymous said...

Appreсiating the hard worκ you put intο your site anԁ іn dеpth informаtion you pгesent.
Ӏt's awesome to come across a blog every once in a while that isn't the
same outdatеd rehashed mateгial. Wonderful read!
Ӏ've saved your site and I'm including your RSS feedѕ tο my Google

My web-sіte Login

Anonymous said...

I know this site gives quality depending articles or reviews and extra stuff, is
there any other web site which presents these information in quality?

my website ... movers who pack for you

Anonymous said...

Good day! I know this is kind of off topic but I was wondering if you knew where I could locate a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm having difficulty
finding one? Thanks a lot!

Also visit my blog - background check

Anonymous said...

I have been surfing online more than three hours today,
yet I never found any interesting article like yours.
It's pretty worth enough for me. In my view, if all web owners and bloggers made good content as you did, the internet will be much more useful than ever before.

my website :: live roulette **