Flashback Database is a very powerful feature offered by Oracle. We can enable flashback in CDB same way we are doing in the non-cdb database.

Enable Flashback Database in CDB :

Step 1 : Check flashback_on from v$database

SQL> select name,open_mode,cdb,flashback_on from v$database;

NAME	  OPEN_MODE	       CDB FLASHBACK_ON
--------- -------------------- --- ------------------
DUPCDB	  READ WRITE	       YES NO

Step 2: Set flashback retention target

SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=2880 SCOPE=BOTH;

System altered.

Step 3: Enable flashback database

SQL> ALTER DATABASE FLASHBACK ON;

Database altered.

Step 4: Check flashback_on from v$database

SQL> select name,open_mode,cdb,flashback_on from v$database;

NAME	  OPEN_MODE	       CDB FLASHBACK_ON
--------- -------------------- --- ------------------
DUPCDB	  READ WRITE	       YES YES

Flashback Operation on CDB and PDB : 

CDB Flashback: To flashback cdb root we need to flashback entire CDB. We can not flashback cdb root without flashing back entire CDB.

PDB Flashback: All datafiles belonging to a PDB can be flashed back and recovered in-place. All undo application that is needed to make a PDB consistent after flashback is applied in-place. After a PDB flashback operation, the old backup of the PDB is still valid.

Flashback Pluggable Database 

Step 1 : Close pluggable database

SQL> alter pluggable database pdb1 close;

Pluggable database altered.

Step 2 : Flashback pluggable database

SQL> FLASHBACK PLUGGABLE DATABASE pdb1 TO SCN 2910633;

Flashback complete.

Step 3 : Open pluggable database pdb1 in resetlogs

SQL> alter pluggable database pdb1 open resetlogs;

Pluggable database altered.

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us an Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.