Cloning a user

In the past when a DBA had the need to create a new user with the same structure (all objects, tablespaces quota, synonyms, grants, system privileges, and so on) using the old exp/imp, it was a very painful experience. This is because not all the metadata was included, and it was a very slow process when moving a big volume of data. Now this can be done very easily using Data Pump. Let's use an example where you want to create the user TEST2 exactly like the user TEST. In order to achieve this goal, all you will need to do is first export the schema TEST definition, and then import it again asking the Data Pump to change the schema TEST for the new schema named TEST2 using the REMAP_SCHEMA parameter available with impdp:

$ expdp ...

Get Oracle Database 12c Backup and Recovery Survival Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.