impdp in Oracle. Why it does not create users?

Carlos Antidio Morales picture Carlos Antidio Morales · Jun 8, 2015 · Viewed 9.1k times · Source

I am newbie in oracle and I am facing troubles with impdp. I have a production server and I have created a new server for testing purposes, so I installed centos, oracle and created the database "sire". Now I make a dump from the production server with the following command:

expdp system/password@sire full=Y 
directory=pump_dir dumpfile=sire_dump.dmp logfile=sire.log

The I come to the new server, and I execute impdp:

    impdp system/password@sire full=Y 
directory=pump_directorio dumpfile=sire_dump.dmp logfile=sire_imp.log

It starts to do the import but then I receive errors such as:

"the user vberrios does not exist". And also error beause it cannot found some schemas and tablespaces.

My question is: It is not supposed that impdp full=Y must import all users and schemas? I have read that I have to create the users in the destination server but I have about 300 users in the database. How can I do a full import in a empty server. I just want to import the full database and user and all objects.

Answer

stefan.schwetschke picture stefan.schwetschke · Jun 8, 2015

The documentation states, that impdp will create uses, when the dump file contains the create user statements:

If the schema you are remapping to does not already exist, the import operation creates it, provided the dump file set contains the necessary CREATE USER metadata and you are importing with enough privileges.

So either your dump file is incomplete (for example due to missing privileges) or you are lacking privileges on the target database.

So please check your privileges on both, the source database and the target database. Please update your question with then according information. For the export to include the schema definitions, you must have the DATAPUMP_EXP_FULL_DATABASE privilege.