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 fcomunoz/alvarez@pdborcl schemas=test content=metadata_only directory=datapump dumpfile= test_06192013.dmp
Note
If you want to clone a schema including the data, all you need to do is repeat the preceding example, removing the parameter CONTENT
of it...