Wednesday, March 28, 2012

Flashback Database 11g

To enable flashback database login as sysdba and execute the following:

SQL> alter system set db_recovery_file_dest_size=12G scope=both;

SQL> alter system set db_recovery_file_dest='/oraarch/oracle/flash_recovery_area' scope=both;

SQL> alter system set db_flashback_retention_target = 2880 scope=both;

SQL>  shutdown immediate;

SQL> startup mount;

SQL> alter database flashback on;

SQL> alter database open;

 
To restore to a previous state:

SQL> shutdown immediate;

 SQL> startup mount exclusive;

-- be sure to substitute your SCN

SQL> FLASHBACK DATABASE TO SCN 19513917;

or

SQL> FLASHBACK DATABASE TO RESTORE POINT bef_damage;

 or

 SQL> FLASHBACK DATABASE TO TIMESTAMP (SYSDATE-1/24);

or

 SQL> FLASHBACK DATABASE TO TIMESTAMP timestamp'2012-03-27 14:00:00';

or

 SQL> FLASHBACK DATABASE
TO TIMESTAMP to_timestamp('2012-03-27 16:00:00', 'YYYY-MM-DD HH24:MI:SS');

SQL> alter database open resetlogs;

 

Flashback Related Database Views

GV_$FLASHBACK_DATABASE_LOG

V_$FLASHBACK_DATABASE_LOG

GV_$FLASHBACK_DATABASE_LOGFILE

V_$FLASHBACK_DATABASE_LOGFILE

GV_$FLASHBACK_DATABASE_STAT

5 comments:

Anonymous said...

Hello, its pleasant paragraph on the topic of media print, we
all be aware of media is a fantastic source of data.

Here is my page - voyance par telephone

Anonymous said...

Admiring the persistence you put into your website and
detailed information you offer. It's nice to come across a blog every once in a while that isn't the same
outdated rehashed information. Wonderful read! I've saved your site and I'm adding your RSS feeds to
my Google account.

My site ... voyance par mail :: ::

Anonymous said...

Quality articles is the secret to be a focus for the viewers to pay a visit the website, that's what this web page is providing.

My web page; voyance par telephone *www.irisvoyance.com*

Anonymous said...

e cigarette, electronic cigarette starter kit, e cigarette, electronic cigarette, electronic cigarette, smokeless cigarettes

Anonymous said...

louis vuitton outlet, nike air max, polo ralph lauren outlet, ray ban sunglasses, louis vuitton outlet, cheap oakley sunglasses, prada handbags, ugg boots, louis vuitton, chanel handbags, air max, oakley sunglasses, tiffany jewelry, air jordan pas cher, uggs on sale, oakley sunglasses, louis vuitton, jordan shoes, tory burch outlet, sac longchamp, kate spade outlet, louboutin shoes, louboutin pas cher, burberry, longchamp outlet, replica watches, louis vuitton, ray ban sunglasses, nike outlet, michael kors, ray ban sunglasses, nike free, longchamp pas cher, nike roshe run, oakley sunglasses, louboutin outlet, nike air max, longchamp, tiffany and co, christian louboutin outlet, nike free, louboutin, prada outlet, ugg boots, gucci outlet, oakley sunglasses, replica watches, ralph lauren pas cher, polo ralph lauren outlet, longchamp outlet