Export from Oracle 10g and import to Oracle 12c unable to create users

impdporacleoracle-10goracle-12c

I have and old install of Oracle 10g with a lot of users and tablespaces in it, for development purposes. Now, I need to migrate these users, tablespaces and everything else, to an Oracle 12c installation.

Following some posts online, I did this command to export, everything I hope, from the Oracle 10g.

CREATE DIRECTORY datapump AS '/oracle/datapump'
expdp system/password@osub full=Y directory=datapump dumpfile=DB10G.dmp logfile=expdpDB10G.log

It executed with no errors. To import on the oracle 12c instance I did this:

CREATE DIRECTORY datapump AS '/oracle/datapump'
impdp system/password@osub full=Y dumpfile=all.dmp logfile=impdpDB10G.log directory=datapump

But on the log file I get error like this:

CREATE USER "BI" IDENTIFIED BY VALUES 'FA1D2B85B70213F3' DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK
ORA-39083: Object type USER:"JBOSSDB" failed to create with error:
ORA-65096: invalid common user or role name
Failing sql is:
 CREATE USER "JBOSSDB" IDENTIFIED BY VALUES '00C6DD010C22FF42' DEFAULT TABLESPACE "JBOSSDB" TEMPORARY TABLESPACE "TEMP"

I read online about Oracle pluggable databases. I don't care about any of that.
I just wanted to import all the users, tablespaces etc, that I had on Oracle 10g, without having to do it manually one by one.

Is it possible?

Best Answer

You have created a CDB (Container Database), and connected to the root container. There you are not allowed to create regular users, you can create common users whose name starts with C##.

If you do not care about or want to use pluggable databases, I suggest that you drop your empty 12c database, and create a new non-CDB with DBCA (Database Configuration Assistant).