You are connected using SQL* Plus to a multitenant container database (CDB) with SYSDBA
privileges and execute the following sequence statements:
What is the result of the last SET CONTAINER statement and why is it so?
A.
It succeeds because the PDB_ADMIN user has the required privileges.
B.
It fails because common users are unable to use the SET CONTAINER statement.
C.
It fails because local users are unable to use the SET CONTAINER statement.
D.
If fails because the SET CONTAINER statement cannot be used with PDB$SEED as the target
pluggable database (PDB).
Explanation:
just test it. PDB_ADMIN is a LOCAL user! So answer C
C
http://docs.oracle.com/database/121/ADMIN/cdb_admin.htm#ADMIN13616
When you are connected to a container as a common user, you can use the following statement to switch to a different container:
ALTER SESSION SET CONTAINER = container_name
Answer is C:
SQL> create pluggable database cdb1pdb3 admin user cdb1pdb3_admin identified by password file_name_convert=(‘/oradata/CDB1/pdbseed’,’/oradata/CDB1/CDB1PDB3′) ;
Pluggable database created.
SQL> alter pluggable database cdb1pdb3 open;
Pluggable database altered.
SQL> alter session set container=cdb1pdb3
2 /
Session altered.
SQL> grant connect to cdb1pdb3_admin;
Grant succeeded.
SQL> connect cdb1pdb3_admin/password@nonrac12c-oel6u5/cdb1pdb3
Connected.
SQL> select * from session_privs;
PRIVILEGE
—————————————-
SET CONTAINER
CREATE PLUGGABLE DATABASE
CREATE SESSION
SQL> alter session set container=PDB$SEED;
ERROR:
ORA-01031: insufficient privileges
SQL>
The answer correct this A:
Switching to a Container Using the ALTER SESSION Statement
When you are connected to a container as a common user, you can use the following statement to switch to a different container:
ALTER SESSION SET CONTAINER = container_name
http://docs.oracle.com/database/121/ADMIN/cdb_admin.htm#ADMIN13616
Please take a look at the web pages we adhere to, such as this one, because it represents our picks from the web.
we prefer to honor many other net web pages on the net, even though they arent linked to us, by linking to them. Underneath are some webpages worth checking out
Great work abc
usually posts some really fascinating stuff like this. If youre new to this site
just beneath, are numerous entirely not associated web pages to ours, on the other hand, they’re certainly worth going over
although sites we backlink to beneath are considerably not connected to ours, we feel they are really really worth a go through, so possess a look
Sites of interest we have a link to
although web sites we backlink to below are considerably not related to ours, we really feel they’re actually worth a go through, so possess a look
Here are a number of the sites we suggest for our visitors
just beneath, are a lot of entirely not connected sites to ours, nonetheless, they may be surely worth going over
check beneath, are some absolutely unrelated sites to ours, even so, they’re most trustworthy sources that we use
usually posts some very interesting stuff like this. If you are new to this site
very handful of websites that take place to be in depth below, from our point of view are undoubtedly very well really worth checking out
that is the finish of this write-up. Here youll locate some web sites that we feel you will appreciate, just click the links over
C -> Local user will not allowed to use set container.
C is correct
SQL> CREATE PLUGGABLE DATABASE new_pdb ADMIN USER pdb_admin identified by 123 file_name_convert = (‘C:\app\oracle\oradata\orcng\pdbseed\’,’C:\app\oracle\oradata\orcng\pdb_admin\’);
Pluggable database created.
SQL> alter pluggable database new_pdb open;
Pluggable database altered.
SQL> alter session set container=new_pdb;
Session altered.
SQL> grant connect to pdb_admin;
Grant succeeded.
SQL> connect pdb_admin/123@localhost/new_pdb
Connected.
SQL> select * from session_privs;
PRIVILEGE
—————————————-
SET CONTAINER
CREATE PLUGGABLE DATABASE
CREATE SESSION
SQL> alter session set container=pdb$seed;
ERROR:
ORA-01031: insufficient privileges
SQL>
C