I have on a machine one XE 21c PDB named “OSDD”, which was initially created by XE 11.2 and upgraded to 18c then 21c following the documentations. Now I install XE 21c on another machine and want to clone “OSDD” as a test database. First I run “expdp system/password@localhost:1521/OSDD full=Y directory=DUMP_DIR dumpfile=OSDD.dmp logfile=OSDD.log” and successfully generated dump file OSDD.dmp. After copying OSDD.dmp to new machine under folder “C:\OSDD\dump”, I process below steps:
- sqlplus / as sysdba
- SQL> CREATE DIRECTORY dump_dir AS 'C:\OSDD\dump';
- SQL> GRANT READ, WRITE ON DIRECTORY dump_dir TO system;
- SQL> CREATE PLUGGABLE DATABASE OSDD ADMIN USER pdb_admin IDENTIFIED BY password FILE_NAME_CONVERT = ('C:\app\osddbsl\product\21c\oradata\XE\pdbseed\', 'C:\app\osddbsl\product\21c\oradata\XE\OSDD\');
- SQL> ALTER PLUGGABLE DATABASE OSDD OPEN;
- impdp system/password@localhost:1521/OSDD table_exists_action=replace full=Y directory=DUMP_DIR dumpfile=OSDD.dmp logfile=impdpOSDD.log
Error messages follow as:
Connected to: Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name DUMP_DIR is invalid
Then I repeat the command but with a wrong password, and I was asked to input the correct username and password again, while this time impdp runs but with error ORA-65096 as below (and database was not imported correctly):
ORA-39083: Object type USER:"P4_EXEC" failed to create with error:
ORA-65096: invalid common user or role name
Failing sql is:
CREATE USER "P4_EXEC" IDENTIFIED BY VALUES 'S:D7905E8E1618620C1D00A05123D688263B8F2ADED9BAECCEDA196D26E218;T:D8E87EE6CA1E824B625C6D84ADD6DCB7D010012863EE273BFB7C9423C7B9283D6BBC1A4555E9941DE2E80AF9654601A9FA8A3ABBE3132DCF220F1D39190E985413A08041E0FA294FFD0DF512FB9B6399' DEFAULT TABLESPACE "OSDD" TEMPORARY TABLESPACE "TEMP"
My questions are:
- Why does ORA-65096 appear (already specified PDB name in expdp/impdp)?
- How to avoid ORA-65096 and import the dump file successfully?
- Why ORA-39002, 39070 and 39087 were repotted with correct password, while disappear after wrong one then input again?
- Is this the right way to expdp/impdp one PDB to another machine?
Thanks in advance,
Juntao