Identify three valid methods of opening, pluggable databases (PDBs).
A.
ALTER PLUGGABLE DATABASE OPEN ALL ISSUED from the root
B.
ALTER PLUGGABLE DATABASE OPEN ALL ISSUED from a PDB
C.
ALTER PLUGGABLE DATABASE PDB OPEN issued from the seed
D.
ALTER DATABASE PDB OPEN issued from the root
E.
ALTER DATABASE OPEN issued from that PDB
F.
ALTER PLUGGABLE DATABASE PDB OPEN issued from another PDB
G.
ALTER PLUGGABLE DATABASE OPEN issued from that PDB
Explanation:
E: You can perform all ALTER PLUGGABLE DATABASE tasks by connecting to a
PDB and running the corresponding ALTER DATABASE statement. This functionality is provided
to maintain backward compatibility for applications that have been migrated to a CDB
environment.
AG: When you issue an ALTER PLUGGABLE DATABASE OPEN statement, READ WRITE is the
default unless a PDB being opened belongs to a CDB that is used as a physical standby
database, in which case READ ONLY is the default.
You can specify which PDBs to modify in the following ways:
List one or more PDBs.
Specify ALL to modify all of the PDBs.
Specify ALL EXCEPT to modify all of the PDBs, except for the PDBs listed.
The correct is only E and G.
Not A: Syntax is incorrect
SQL> alter pluggable database open all;
alter pluggable database open all
*
ERROR at line 1:
ORA-00922: missing or invalid option
SQL> alter pluggable database all open;
Pluggable database altered.
However, the question demands three options. The only one is A. There is no possible execute a command on PDB from another PDB.
Mario,
The answer A says from root container, may be the reason why A?
A,E,G
All work
AEG
A, E and G.
A is selected based on best option although syntax is wrong.
AEG
To open a PDB or some of them or all of them, connect to the root as SYSOPERor SYSDBAand
issue an ALTER PLUGGABLE DATABASE OPEN statement, specifying the PDB or PDBs
names or ALL EXCEPTor ALL. Hence, A is correct.
You can also open a PDB while connected as SYSDBAwithin the PDB. In this case, it is not
necessary to name the PDB to open. E is correct.
A, E, G
In the real exam some questions has more choices and some questions has less choices for this reason if you sure that one choice is wrong like syntax in choice A in the real exam may be another choices will be there.
A E G
A correct
from root
SQL> alter pluggable database all open;
Pluggable database altered.
SQL> select CON_ID, NAME, OPEN_MODE from v$pdbs;
CON_ID NAME OPEN_MODE
———- —————————————- ———-
2 PDB$SEED READ ONLY
3 PDB2 READ WRITE
4 PDB2_2 READ WRITE
5 PDB_ORCL2 READ WRITE
6 PDB1_1 READ WRITE
7 PDB_LONDON READ WRITE
6 rows selected.
SQL> alter pluggable database all close;
Pluggable database altered.
SQL> select CON_ID, NAME, OPEN_MODE from v$pdbs;
CON_ID NAME OPEN_MODE
———- —————————————- ———-
2 PDB$SEED READ ONLY
3 PDB2 MOUNTED
4 PDB2_2 MOUNTED
5 PDB_ORCL2 MOUNTED
6 PDB1_1 MOUNTED
7 PDB_LONDON MOUNTED
from pdb
B incorrect
SQL> alter session set container =pdb2;
Session altered.
SQL> show con_name
CON_NAME
——————————
PDB2
SQL> select CON_ID, NAME, OPEN_MODE from v$pdbs;
CON_ID NAME OPEN_MODE
———- —————————————- ———-
3 PDB2 MOUNTED
SQL> alter pluggable database all open;
alter pluggable database all open
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database
C incorrect
SQL> alter session set container=PDB$SEED;
Session altered.
SQL> show con_name
CON_NAME
——————————
PDB$SEED
SQL>
SQL> alter pluggable database all open;
alter pluggable database all open
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database
D incorrect
SQL> alter database pdb2 open;
alter database pdb2 open
*
ERROR at line 1:
ORA-01509: specified name ‘PDB2’ does not match actual ‘CDB2’
E correct
SQL> alter session set container=pdb2;
Session altered.
SQL> show con_name
CON_NAME
——————————
PDB2
SQL>
SQL> select CON_ID, NAME, OPEN_MODE from v$pdbs;
CON_ID NAME OPEN_MODE
———- —————————————- ———-
3 PDB2 MOUNTED
SQL> alter database pdb2 open;
Database altered.
F incorrect
SQL> show con_name
CON_NAME
——————————
PDB2
SQL> alter pluggable database pdb2_2 open;
alter pluggable database pdb2_2 open
*
ERROR at line 1:
ORA-65118: operation affecting a pluggable database cannot be performed from
another pluggable database
SQL>
— The “A” option is badly drafted.
SQL> ALTER SESSION SET CONTAINER=CDB$ROOT;
Sesi¾n modificada.
SQL> ALTER PLUGGABLE DATABASE OPEN ALL;
ALTER PLUGGABLE DATABASE OPEN ALL
*
ERROR en lÝnea 1:
ORA-00922: falta la opci¾n o no es vßlida
— For the option A, the correct sentence is:
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
Base de datos de conexi¾n modificada.
— E
SQL> ALTER SESSION SET CONTAINER=db12cp1;
Sesi¾n modificada.
SQL> ALTER DATABASE OPEN;
Base de datos modificada.
— F
SQL> ALTER SESSION SET CONTAINER=db12cp2;
Sesi¾n modificada.
SQL> ALTER PLUGGABLE DATABASE DB12CP2 OPEN;
Base de datos de conexi¾n modificada.
SQL>
— G
SQL> ALTER PLUGGABLE DATABASE OPEN;
Base de datos de conexi¾n modificada.