Which three statements are true about using flashback database in a multitenant container
database (CDB)?
A.
The root container can be flashed back without flashing back the pluggable databases (PDBs).
B.
To enable flashback database, the CDB must be mounted.
C.
Individual PDBs can be flashed back without flashing back the entire CDB.
D.
The DB_FLASHBACK RETENTION_TARGET parameter must be set to enable flashback of
the CDB.
E.
A CDB can be flashed back specifying the desired target point in time or an SCN, but not a
restore point.
Explanation:
C: * RMAN provides support for point-in-time recovery for one or more pluggable
databases (PDBs). The process of performing recovery is similar to that of DBPITR. You use the
RECOVER command to perform point-in-time recovery of one or more PDBs. However, to recover
PDBs, you must connect to the root as a user with SYSDBA or SYSBACKUP privilege
D: DB_FLASHBACK_RETENTION_TARGET specifies the upper limit (in minutes) on how far
back in time the database may be flashed back. How far back one can flashback a database
depends on how much flashback data Oracle has kept in the flash recovery area.Range of values0 to 231 – 1
Note:
Reference; Oracle Database, Backup and Recovery User’s Guide 12c
Statement C. is False. In 12.1 you can only flashback the entire CDB. You can point-in-time recover individual PDBs but that is different than flashback.
I agree, [A] and [C] are obviously wrong.
[E] isn’t correct either, as one can flashback a CDB to a restore point. I’ve tested it myself.
Hence, there isn’t 3 correct statements to choose from!?!
Wording of E itself is wrong. If wording of E is “A CDB can be flashed back specifying the desired target point in time or an SCN, but not BEFORE a restore point.” then E would be the right answer. Cannot flashback BEFORE a restore point.
B is also wrong
B D and E appears to be best answer.
DE
DE – C but no with FLASHBACK but with PITR
C – ????
https://docs.oracle.com/database/121/BRADV/rcmflash.htm#BRADV640
B – FALSE
Using Flashback Database
Ensure the database instance is open or mounted. If the instance is mounted, then the database must be shut down cleanly unless it is a physical standby database. Other Oracle RAC instances can be in any mode.
When you enable Flashback Database while the database is open, there is a very small chance the command may not be able to obtain the memory it needs. If the command fails because of that reason, retry the command after a while or retry after a shutdown and restart of the instance.
https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV597
A, B and D are correct.
C is wrong
E is wrong since we can use restore point to flashback the CDB
But A is correct with a work around, Flashback CDB, restore and recover the PDB to the point before flashback of CDB.
The workaround for this is to do the following.
Take a backup of everything (CDB and PDBs). It’s always a good idea to take a backup before doing anything major to your database.
Shutdown the PDB.
Offline all datafiles for the PDB.
Flashback the CDB.
Restore and recover the PDB to the point it was at before the flashback of the CDB.
You can see an example of this below.
rman target=/
# Backup everything.
BACKUP DATABASE PLUS ARCHIVELOG;
# Close PDB and take the datafiles offline.
ALTER PLUGGABLE DATABASE pdb1 CLOSE;
ALTER PLUGGABLE DATABASE pdb1 DATAFILE ALL OFFLINE;
# Flashback the CDB, along with all the PDBs.
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
FLASHBACK DATABASE TO TIME “TO_DATE(’30-DEC-2013 10:00:00′,’DD-MON-YYYY HH24:MI:SS’)”;
ALTER DATABASE OPEN RESETLOGS;
# Open all pluggable databases, except pdb1.
ALTER PLUGGABLE DATABASE ALL EXCEPT pdb1 OPEN;
# PITR of pdb1.
RUN {
# PDB already closed. No SET UNTIL. We want to recover to the latest time.
#ALTER PLUGGABLE DATABASE pdb1 CLOSE;
#SET UNTIL TIME “TO_DATE(’30-DEC-2013 10:15:00′,’DD-MON-YYYY HH24:MI:SS’)”;
RESTORE PLUGGABLE DATABASE pdb1;
RECOVER PLUGGABLE DATABASE pdb1;
ALTER PLUGGABLE DATABASE pdb1 DATAFILE ALL ONLINE;
ALTER PLUGGABLE DATABASE pdb1 OPEN;
}
Only D!!!
Agree.
Only D is right (or maybe none of them! see below)
A,C is wrong (for 12.1):
In Oracle Database 12.1 flashback database operations were limited to the root container, and therefore affected all pluggable databases (PDBs) associated with the root container.
Oracle Database 12.2 now supports flashback of a pluggable database, making flashback database relevant in the multitenant architecture again.https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV595
https://oracle-base.com/articles/12c/multitenant-flashback-pdb-12cr2
B is wrong:
To enable flashback logging: Ensure the database instance is open or mounted.
https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV595
E is wrong:
Performing a Flashback Database Operation
This section presents a basic technique for performing a flashback of the database, specifying the desired target point in time with a time expression, the name of a normal or guaranteed restore point, or an SCN.
https://docs.oracle.com/database/121/BRADV/rcmflash.htm#BRADV89752
D is right
(actually there’s a contradiction in the documentation):
“To enable logging for Flashback Database, you must set the DB_FLASHBACK_RETENTION_TARGET initialization parameter and issue the ALTER DATABASE FLASHBACK ON statement.”
https://docs.oracle.com/database/121/BRADV/rcmflash.htm#BRADV89752
—
“To enable flashback logging: Optionally, set the DB_FLASHBACK_RETENTION_TARGET to the length of the desired flashback window in minutes:”
https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV594
CDB must be mounted for flashback database. B is correct.
Crash and instance recovery is supported for a CDB as a whole, because there is one single instance for the root and all its PDBs. When the instance crashes, the only possible instance recovery is a CDB instance recovery.
If redo log files or control files, data files from the root SYSTEM or UNDO tablespace are lost, because these files belong to the root, the only possible media recovery is at CDB level.
There exists a new level of media recovery supported, individual PDB media recovery after datafile loss or corruption of a PDB.
There is no way to perform a PDB instance recovery. Instance recovery should be done at the CDB level only.
You can configure Flashback Database for the CDB as you would do for any non-CDB:
1. Configure the Fast Recovery Area.
2. Set the retention target with the DB_FLASHBACK_RETENTION_TARGET initialization
parameter. So, Choice D is correct as well.
3. Enable Flashback Database with the following command:
SQL> ALTER DATABASE FLASHBACK ON;
Before you can issue the command to enable Flashback Database, the database must be configured for archiving.
Restrictions:
• You cannot flash back the root alone without flashing back the entire CDB.
Choice A is ruled out.
• Flashback Database operations on a CDB may not be permitted if point-in-time recovery has been performed on any of its PDBs. When point-in-time recovery is performed on a PDB, you cannot directly rewind the CDB to a point that is earlier than the point at which DBPITR for the PDB was performed.
This rules out Choice C.
The CDB must be mounted in exclusive mode to issue the FLASHBACK DATABASE
command and opened read-only to review changes. This proves that Choice B is correct. The CDB must be opened read/write with the RESETLOGS option when finished.
• When the CDB is opened in READ ONLY mode, the PDBs are still mounted. Open PDBs in READ ONLY mode, too, to review changes.
A common schema has been accidently dropped in the root. You have to flash back the CDB to the time before the common user was dropped impacting all PDBs.
You can use the RMAN FLASHBACK DATABASE command to execute the Flashback Database operation. You can use SEQUENCE and THREAD to specify a redo log sequence number and thread as a lower limit.
Alternatively, you can use the SQL FLASHBACK DATABASE command to return the database to a past time or SCN. If you use the TO SCN clause, you must provide a number. If you specify TO TIMESTAMP, you must provide a time stamp value. You can also specify a restore point name.
Choice E is incorrect.
Therefore, B,D are correct in my view. All the other choices are incorrect.
in the exam they asked for 2 answers only not three
the correct answers B,D.
Strange answers for that question:
A is not working with flashback database but with a workaround (which isn’t asked)
B is correct
C is totally wrong
D is partly correct, but this parameter defaults to 1 day, so you don’t need to set it explicitly and to ENABLE flashback you have to issue ALTER DATABASE FLASHBACK ON; and not only to set the parameter
E is wrong, you can use restore points, scn and timestamps to flash back a database
C is absolutely correct. Refer: https://oracle-base.com/articles/12c/multitentant-flashback-of-container-database-12cr1?display_type=printable#pitr-of-pdb-restrictions
you can flashback/recover a PDB
B – If DB is already not in ARCHIVELOG mode, then requires putting CDB in MOUNT to bring the DB to ARCHIVELOG. otherwise not requires just for enabling flashback.
CDE are correct answers.
A – partially correct, but would require a workaround
B – partially correct, starting 11g Flashback can be turned ON/OFF without the need to mount the instance
C – correct
D – partially correct, since it already defaults to 1 day
E – incorrect
So answers could be: A, B, C, D
But for the exam I would choose: B, C, D
I believe “A” is not documented in 12c OU doc.
Seem only BD are correct. Rest are wrong.
Only D is right (or maybe none of them! see below)
A,C is wrong (for 12.1):
In Oracle Database 12.1 flashback database operations were limited to the root container, and therefore affected all pluggable databases (PDBs) associated with the root container.
Oracle Database 12.2 now supports flashback of a pluggable database, making flashback database relevant in the multitenant architecture again.https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV595
https://oracle-base.com/articles/12c/multitenant-flashback-pdb-12cr2
B is wrong:
To enable flashback logging: Ensure the database instance is open or mounted.
https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV595
E is wrong:
Performing a Flashback Database Operation
This section presents a basic technique for performing a flashback of the database, specifying the desired target point in time with a time expression, the name of a normal or guaranteed restore point, or an SCN.
https://docs.oracle.com/database/121/BRADV/rcmflash.htm#BRADV89752
D is right
(actually there’s a contradiction in the documentation):
“To enable logging for Flashback Database, you must set the DB_FLASHBACK_RETENTION_TARGET initialization parameter and issue the ALTER DATABASE FLASHBACK ON statement.”
https://docs.oracle.com/database/121/BRADV/rcmflash.htm#BRADV89752
—
“To enable flashback logging: Optionally, set the DB_FLASHBACK_RETENTION_TARGET to the length of the desired flashback window in minutes:”
https://docs.oracle.com/database/121/BRADV/flashdb.htm#BRADV594