How to create copy of full schema on same database in oracle How to create copy of full schema on same database in oracle oracle oracle

How to create copy of full schema on same database in oracle


You don't need a fancy network link or anything just the expdp/impdp commands.First export the schema that you want:

expdp fromUser/fromPword schemas=sourceSchema directory=DUMPDIR dumpfile=dump.dmp logfile=explog.txt

Tip: make sure that that user has the ability to write to DUMPDIR or whatever it is you call it

Then reimport the schema using the remap_schema parameter:

impdp toUser/toPword directory=DUMPDIR dumpfile=dump.dmp logfile=implog.txt remap_schema=fromUser:toUser

If you really want to use the network_link parameter (so you don't create a dumpfile for some reason) then I recommend reading this or this.
Great info on your question is found here also.


Try this:

Copy schema into same database

I tested and it worked. but you have to create a public link like mentioned in the comments.

If you create a .par file which remaps your tablespaces you can reuse it. With some search replace of course.

O and don't forget to put the transaform in the .par file:

TRANSFORM=oid:n

Otherwise you might get errors.