Forum Stats

  • 3,872,018 Users
  • 2,266,364 Discussions
  • 7,911,026 Comments

Discussions

Duplicate schema using rman

Ajay Vijayan
Ajay Vijayan Member Posts: 179 Red Ribbon
edited Jun 16, 2016 4:56AM in Database Ideas - Ideas

I think Duplicate schema  using rman like duplicate database option will be a very good option for cloning a schema for testing and development.

The syntax can be something like duplicate schema <schema_name> to <db_name> with the various options available.

Ajay VijayanSven W.CloudDBmarkmevansMKJ10930279
7 votes

Active · Last Updated

Comments

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    So you mean duplicate a schema in a duplicate database (ie auxiliary database)?

    Or do you mean duplicate a schema in the target database?

  • Ajay Vijayan
    Ajay Vijayan Member Posts: 179 Red Ribbon

    So you mean duplicate a schema in a duplicate database (ie auxiliary database)?

    Or do you mean duplicate a schema in the target database?

    It can be any other database or even the target database.

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    It can be any other database or even the target database.

    So the way to do it now is to use the datapump, but do you think the datapump is not suitable?

  • Ajay Vijayan
    Ajay Vijayan Member Posts: 179 Red Ribbon

    So the way to do it now is to use the datapump, but do you think the datapump is not suitable?

    Its time consuming take export,transfer the file and then import.Or  other methods of datapump. So this will reduce the steps used in datapump.

      This doesn't mean datapump is not a suitable tool.

  • Maybe you should read about datapump Import/Export via database link.

    I use this method to move schemas from one database to another without dumpfile.

    You have the whole flexibility of datapump, you can remap the username, tablespaces, do time-travel-Magic, ...

    The only thing you have to do is defining a database link to the source database, addingt "network_link=<linkname>" to impdp command line and removing "dumpfile=".

    Maybe this can solve your need.

    Regards

    Andreas

  • Ajay Vijayan
    Ajay Vijayan Member Posts: 179 Red Ribbon

    Maybe you should read about datapump Import/Export via database link.

    I use this method to move schemas from one database to another without dumpfile.

    You have the whole flexibility of datapump, you can remap the username, tablespaces, do time-travel-Magic, ...

    The only thing you have to do is defining a database link to the source database, addingt "network_link=<linkname>" to impdp command line and removing "dumpfile=".

    Maybe this can solve your need.

    Regards

    Andreas

    I know this method but again for this you will have to create a dblink.But having a dblink from production to testing environment is recommended?

    I think you didnt get what i am saying datapump do have all the feature but why not one single tool for all the activity.

  • I know this method but again for this you will have to create a dblink.But having a dblink from production to testing environment is recommended?

    I think you didnt get what i am saying datapump do have all the feature but why not one single tool for all the activity.

    You are right.

    I still don't understand.


    In my opinion RMAN is a tool for physical backup, recovery and data movement.

    Datapump is a tool for logical data movement,

    Schemas have no direct physical representation - so you have to use datapump.

    Maybe you can explain a little bit more, where the benefit of doing logical data movement with rman would lie.

    Do you have an example?

    Regards

    Andreas

  • Ajay Vijayan
    Ajay Vijayan Member Posts: 179 Red Ribbon

    You are right.

    I still don't understand.


    In my opinion RMAN is a tool for physical backup, recovery and data movement.

    Datapump is a tool for logical data movement,

    Schemas have no direct physical representation - so you have to use datapump.

    Maybe you can explain a little bit more, where the benefit of doing logical data movement with rman would lie.

    Do you have an example?

    Regards

    Andreas

    As I said there may be security policies like we have in our environment that there wont be any dblink between Test/dev environment and production. in that case all you have to do is the manual transfer of the dumpfiles which may get corrupt during transfer (just faced the issue).

    I am not saying DP is not a solution but rather than doing so much activity like taking expdp the transfer then impdp on can just run a single command and do some other tasks.

    AJ