Skip to Main Content

How can I get "create user" definitions in an oracle 18c expdp export?

PVCGSPMar 22 2022 — edited Mar 22 2022

I have two environments. Oracle XE 11 release 2, and Oracle XE 18 release 4.
When I export in oracle 11.2 with this commandline:
expdp 'sys/*** as sysdba' schemas=firstschema,secondschema,thirdschema directory=data_pump_dir exclude=statistics dumpfile=%variable1% logfile=%variable2%

Everything goes fine.
The logging contains:
Processing object type SCHEMA_EXPORT/USER
When I look into this dumpfile with
impdp sys/***directory=TEMP_IN dumpfile=xxx.dmp sqlfile=xxx-ddl.sql
The dumpfile contains
CREATE USER -statements

However

When I export in oracle 18.4 with that commandline.
I am missing in the output the following line:
Processing object type SCHEMA_EXPORT/USER
And when l look into this dumpfile with:
impdp sys/***directory=TEMP_IN dumpfile=xxx.dmp sqlfile=xxx-ddl.sql
The dumpfile does not contain
CREATE USER -statements

When I change the commandline to include the parameter INCLUDE=USER I get an error.
ORA-39165: Schema xxx was not found

I guess it has something to do with the fact that in 18 we have a container database with pluggable databases.
Of course it is possible to create the users before we import the dump. But I would like to have that while importing the dumpfile.

Is there a way to include the create user definitions in de export on 18c? Or am I forgetting something?
Thanks in advance!

Comments
Post Details
Added on Mar 22 2022
5 comments
308 views