Effects of plugging/unplugging operations on users, roles, and privileges
The purpose of this recipe is to show what is going to happen to users, roles, and privileges when you unplug a pluggable database from one container database (cdb1
) and plug it into some other container database (cdb2
).
Getting ready
To complete this recipe, you will need the following:
Two container databases (
cdb1
andcdb2
)One pluggable database (
pdb1
) in the container databasecdb1
Local user
mike
in the pluggable databasepdb1
with the localcreate session
privilegeThe common user
c##john
with thecreate session
common privilege andcreate synonym
local privilege on the pluggable databasepdb1
How to do it...
Connect to the root container of
cdb1
as usersys
:SQL> connect sys@cdb1 as sysdba
Unplug
pdb1
by creating an XML metadata file:SQL> alter pluggable database pdb1 unplug into '/u02/oradata/pdb1.xml';
Drop
pdb1
and keep the datafiles:SQL> drop pluggable database pdb1 keep datafiles;
Connect...