Today I will be explaining How to Make Copy of Schema in Oracle Data Pump.
1. We take an export backup of the schema to be copied.
1 |
-bash-3.2$ expdp "'/ as sysdba'" directory=dump_dir schemas=scott dumpfile=scott.dmp logfile=scott.log reuse_dumpfiles=y |
2. With the import operation, we give a new name to the schema and a backup of the original schema is created with all the objects.
1 |
-bash-3.2$ impdp "'/ as sysdba'" directory=dump_dir remap_schema=scott:burcu dumpfile=scott.dmp logfile=scott_brc.log |
If only the metadata of the schema is requested, then our import will be as follows.
1 |
-bash-3.2$ impdp "'/ as sysdba'" directory=dump_dir remap_schema=scott:burcu content=metadata_only dumpfile=scott.dmp logfile=scott_brc_meta.log |