Which statement is true concerning dropping a pluggable database (PDB)?
A.
The PDB must be open in read-only mode.
B.
The PDB must be in mount state.
C.
The PDB must be unplugged.
D.
The PDB data files are always removed from disk.
E.
A dropped PDB can never be plugged back into a multitenant container database (CDB).
Explanation:
The best question! definitely 2 correct answers!
From http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_8027.htm#SQLRF55700
The PDB you want to drop must be in mounted mode or it must be unplugged.
hi smth
you righ
but only choose one
To unplug a PDB, it must be in MOUNTED state:
SYS@DEMO12 AS SYSDBA> alter pluggable database pdb11 unplug into ‘/tmp/pdb11.xml’;
alter pluggable database pdb11 unplug into ‘/tmp/pdb11.xml’
*
ERROR at line 1:
ORA-65025: Pluggable database PDB11 is not closed on all instances.
SYS@DEMO12 AS SYSDBA> alter pluggable database pdb11 close;
Pluggable database altered.
SYS@DEMO12 AS SYSDBA> alter pluggable database pdb11 unplug into ‘/tmp/pdb11.xml’;
Pluggable database altered.
After that, it cannot be opened anymore:
SYS@DEMO12C AS SYSDBA> alter pluggable database pdb11 open;
alter pluggable database pdb11 open
*
ERROR at line 1:
ORA-65086: cannot open/close the pluggable database
So it will alway have to be mounted before dropping. But do you really need to unplug it for dropping? No. I consider the documentation to be wrong on this point. The correct answer should be B.
Correct Answer: B
Possible to drop a PDB without unplugging it. The PDB must be in MOUNT stage.
“The PDB must be closed before it can be unplugged. When you unplug a PDB from a CDB, the unplugged PDB is in mounted mode. The unplug operation makes some changes in the PDB’s data files to record, for example, that the PDB was successfully unplugged. Because it is still part of the CDB, the unplugged PDB is included in an RMAN backup of the entire CDB. Such a backup provides a convenient way to archive the unplugged PDB in case it is needed in the future.
To completely remove the PDB from the CDB, you can drop the PDB. The only operation supported on an unplugged PDB is dropping the PDB. The PDB must be dropped from the CDB before it can be plugged back into the same CDB. A PDB is usable only when it is plugged into a CDB.”
Unplug a PDB implies PDB is in Mount state. I suppose C is a better answer, B is also correct.
C
The question is very specific for dropping.
Right answer is C.
C. The PDB must be unplugged.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
—————————— ———-
PDB$SEED READ ONLY
PDB2 READ WRITE
PDB2_2 MOUNTED
PDB_ORCL2 MOUNTED
PDB1_1 MOUNTED
SQL> drop pluggable database pdb2 including datafiles;
drop pluggable database pdb2 including datafiles
*
ERROR at line 1:
ORA-65025: Pluggable database PDB2 is not closed on all instances.
SQL> alter pluggable database PDB2 close immediate;
Pluggable database altered.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
—————————— ———-
PDB$SEED READ ONLY
PDB2 MOUNTED
PDB2_2 MOUNTED
PDB_ORCL2 MOUNTED
PDB1_1 MOUNTED
SQL> drop pluggable database pdb2 including datafiles; <<< This will drop the DB.
Answer is B
Thanks – Answer is B.
According to this answer is B and C
http://docs.oracle.com/database/121/ADMIN/cdb_plug.htm#BAJEFEHI
Dropping a PDB
The DROP PLUGGABLE DATABASE statement drops a PDB. You can drop a PDB when you want to move the PDB from one CDB to another or when you no longer need the PDB.
When you drop a PDB, the control file of the CDB is modified to eliminate all references to the dropped PDB. Archived redo log files and backups associated with the PDB are not removed, but you can use Oracle Recovery Manager (RMAN) to remove them.
When dropping a PDB, you can either keep or delete the PDB’s data files by using one of the following clauses:
•KEEP DATAFILES, the default, retains the data files.
The PDB’s temp file is removed even when KEEP DATAFILES is specified because the temp file is no longer needed.
•INCLUDING DATAFILES removes the data files from disk.
If a PDB was created with the SNAPSHOT COPY clause, then you must specify INCLUDING DATAFILES when you drop the PDB.
The following prerequisites must be met:
•The PDB must be in mounted mode, or it must be unplugged.
•The current user must have SYSDBA or SYSOPER administrative privilege, and the privilege must be either commonly granted or locally granted in the PDB. The user must exercise the privilege using AS SYSDBA or AS SYSOPER at connect time.
Read this – The PDB must be closed before it can be unplugged. When you unplug a PDB from a CDB, the unplugged PDB is in *mounted mode*.
So B is correct.
I have to correct myself. On exam you should choose only one option. So it’s definately the correct answer only B.
Both B and C are correct.
https://docs.oracle.com/database/121/SQLRF/statements_8028.htm#SQLRF55699
You must be connected to a CDB.
The current container must be the root, you must be authenticated AS SYSDBA or AS SYSOPER, and the SYSDBA or SYSOPER privilege must be either granted to you commonly, or granted to you locally in the root and locally in PDB you want to drop.
The PDB you want to drop must be in mounted mode or it must be unplugged.
I passed my exam today. I selected Answer as B. in my score report this question is missed.it means B is correct.
Correct B:
alter pluggable database TEST5 close immediate;
NAME OPEN_MODE
—————————— ———-
TEST5 MOUNTED
drop pluggable database TEST5;
ERROR at line 1:
ORA-65179: cannot keep datafiles for a pluggable database that is not unplugged
drop pluggable database TEST5 including datafiles;
Pluggable database dropped.
BC if two statements needed. B if only one is needed.
B(C)
The following is from the Oracle Documentation:
Prerequisites for dropping a pluggable database
You must be connected to a CDB.
The current container must be the root, you must be authenticated AS SYSDBA or AS SYSOPER, and the SYSDBA or SYSOPER privilege must be either granted to you commonly, or granted to you locally in the root and locally in PDB you want to drop.
The PDB you want to drop must be in mounted mode or it must be unplugged.
Therefore, both B and C are correct. This question may appear differently in the exam. Who knows?
RSV
B
C.
To specify KEEP DATAFILES (the default), the PDB you want to drop must be unplugged.
https://docs.oracle.com/database/121/SQLRF/statements_8028.htm#SQLRF55699
B
The following prerequisites must be met:
The PDB must be in mounted mode, or it must be unplugged.
The current user must have SYSDBA or SYSOPER administrative privilege, and the privilege must be either commonly granted or locally granted in the PDB. The user must exercise the privilege using AS SYSDBA or AS SYSOPER at connect time.
B is correct
I think the question is:
Which two statement is true concerning dropping a pluggable database (PDB)?
B, C
I agree with dziri…… and either B or C should be marked correct
As people have already deduced, it is more B than C, since being unplugged places it in “MOUNT” state. C is not as correct because you aren’t specifically unplugging the DB anytime it is in “MOUNT” state, although it seems unplugged and mount state are the same.