I have to confess I have no idea about this pluggable database thing. I have experience in PostgresSQL, MySQL, SQL Server, but Oracle has me defeated.
I have Oracle 18c running in a Docker image. I want to create a pluggable database called bookshop
. Following some instructions, I ran the following:
CREATE PLUGGABLE DATABASE bookshop ADMIN USER pdb_adm IDENTIFIED BY Oradoc_db1
file_name_convert=('/opt/oracle/oradata/XE/pdbseed','/opt/oracle/oradata/XE/BOOKSHOP');
Next in the instructions, I run:
ALTER PLUGGABLE DATABASE xepdb2 OPEN READ WRITE;
except that I can’t. I get the message:
ORA-01031: insufficient privileges.
I then try:
DROP PLUGGABLE DATABASE bookshop;
and I get the same message.
When I try:
SELECT vp.name, vp.open_mode
FROM v$pdbs vp;
I get
NAME | OPEN_MODE |
---|---|
PDB$SEED | READ ONLY |
XEPDB1 | READ WRITE |
XEPDB2 | READ WRITE |
BOOKSHOP | MOUNTED |
And finally, when I try to work out who I am:
SELECT user FROM dual;
I get SYSTEM
.
At this point I have no idea how to get control over this pluggable database. Do I need to switch to another user? How?