What is the outcome?

You are connected to a pluggable database (PDB) as a common user with the sysdba
privilege. The PDB is open and you issue the shutdown immediate command.
What is the outcome?

You are connected to a pluggable database (PDB) as a common user with the sysdba
privilege. The PDB is open and you issue the shutdown immediate command.
What is the outcome?

A.
The PDB is closed.

B.
The PDB is placed in mount state.

C.
The command executes only if the common user is granted the set container privilege for
the PDB.

D.
The command results in an error because the PDB can be shut down only by a local user.

Explanation:
Reference:
http://docs.oracle.com/database/121/ADMIN/cdb_pdb_admin.htm#ADMIN13652



Leave a Reply 14

Your email address will not be published. Required fields are marked *


Vonpire

Vonpire

It is A and B : “When the current container is a PDB, the SQL*Plus SHUTDOWN command closes the PDB. After the SHUTDOWN command is issued on a PDB successfully, it is in mounted mode.”

Using the SQL*Plus SHUTDOWN Command on a PDB

When the current container is a PDB, the SQL*Plus SHUTDOWN command closes the PDB. After the SHUTDOWN command is issued on a PDB successfully, it is in mounted mode.

If you do not specify IMMEDIATE, then the PDB is shut down with the normal mode. When IMMEDIATE is specified, the PDB is shut down with the immediate mode.
To issue the SHUTDOWN command when the current container is a PDB, the following prerequisites must be met:
• The current user must have SYSDBA, SYSOPER, SYSBACKUP, or SYSDG 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, AS SYSOPER, AS SYSBACKUP, or AS SYSDG, respectively, at connect time.
• To close a PDB, the PDB must be open.
To modify a PDB with the SHUTDOWN command:
1. In SQL*Plus, ensure that the current container is a PDB.
See “Connecting to a PDB with SQL*Plus”.
2. Run the SHUTDOWN command.
Example 42-14 Closing a PDB with the SHUTDOWN IMMEDIATE Command
SHUTDOWN IMMEDIATE
Note:
• When the current container is a PDB, the SHUTDOWN command only closes the PDB, not the CDB instance.
• There is no SHUTDOWN command for a PDB that is equivalent to SHUTDOWN TRANSACTIONAL or SHUTDOWN ABORT for a non-CDB.

gsk

gsk

which one is correct?

Vonpire

Vonpire

Both are correct.

But A is probably what to expect.

Steve

Steve

A

Student guide says:

The statement SHUTDOWN IMMEDIATE when connected to a PDB is equivalent to ALTER PLUGGABLE DATABASE CLOSE. It closes the PDB.

Tri

Tri

I think B.

B.The PDB is placed in mount state.

SQL> shutdown immediate;
Pluggable Database closed.
SQL> select status from v$instance;

STATUS
————
MOUNTED

SQL>

max

max

B I think Tri is right. There is no closed Status in a PDB. PDB can have Mount/Read Write/Read Only.

mhnx

mhnx

B, tested

SQL> alter pluggable database TOOL open;
Pluggable database altered.

SQL> alter session set container=TOOL;
Session altered.

SQL> select open_mode from v$database;

OPEN_MODE
——————–
READ WRITE

SQL> shutdown immediate;
Pluggable Database closed.

SQL> select open_mode from v$database;

OPEN_MODE
——————–
MOUNTED