ORA-17628
In some situations, you might see errors like the following when cloning a remote pluggable database (PDB):
SQL> create pluggable database finance_pdb from finanpdb@link_to_test1
file_name_convert=('/u01/app/oracle/oradata/orcl/FINANPDB','/u01/app/oracle/oradata/orcl/FINANCE_PDB');
*
ERROR at line 1:
ORA-17628: Oracle error 1031 returned by remote Oracle server
ORA-01031: insufficient privileges
ORA-17628 means that the PDB cannot be cloned due to an error ORA-01031 has occurred, you have to fix ORA-01031 first then try again.
What ORA-01031 alerted above is that the remote account has no CREATE PLUGGABLE DATABASE system privileges to clone the PDB.
Solution
This is because your release update (patched 18c or 19c) make it stricter. You have to directly grant CREATE PLUGGABLE DATABASE to the account used in DB link inside the PDB to make it work. In this case, it is SYSTEM.
Remote PDB (Source)
In remote PDB, we grant the proper privilege to SYSTEM.
[oracle@test2 ~]$ sqlplus / as sysdba
...
SQL> alter session set container=finanpdb;
Session altered.
SQL> grant create pluggable database to system;
Grant succeeded.
Local CDB (Target)
In local CDB, we may now try to clone it again!
SQL> create pluggable database finance_pdb from finanpdb@link_to_test1
file_name_convert=('/u01/app/oracle/oradata/orcl/FINANPDB','/u01/app/oracle/oradata/orcl/FINANCE_PDB');
Pluggable database created.
Please note that, if your system privilege is inherited from a role, it will not work here.
fantastic worked like a charm
Thanks you!
Thanks you!!!!!
My pleasure!