How to Copy Oracle Schema to Another Server

Contents

Introduction

Read this article to learn how to copy an Oracle schema from one server to another using two special products developed by Devart - dbForge Schema Compare for Oracle and dbForge Data Compare for Oracle . With the help of these two products, you can copy Oracle schema to another server in just a few moments.

How to copy server?

To copy a schema from one server to another, the first thing you need to do is to copy a schema. This means you have to create a copy of definitions for all or selected tables, indexes, triggers, relationships, views, procedures, etc in another server. Once schema schema copying is completed, you will need to copy data from all or selected tables to another server.

How to copy Oracle schema?

Before copying an Oracle schema, you should create an empty one on the selected server. For the detailed description of this step, refer to the How to Export DDL Script from Oracle Schema article. Once the empty schema was created, you can move on to copying Oracle schema.

To copy an Oracle schema, you have to:

  1. Start dbForge Schema Compare for Oracle.
  2. On the Start page, click New Schema Comparison to open the comparison wizard.
  3. Choose the needed Source and Target connections and schemas. Source should be the schema you are going to export, and Target - the empty schema you've created previously. For the detailed description of this step, refer to the Diff Between Two Oracle Schemas: How to See It article.
  1. Click Compare to compare the schemas.
  2. Review the comparison results. Click Synchronize. Schema Synchronization Wizard will open. For the detailed description of this step, refer to the How to Synchronize Oracle Schemas article.
  1. Run the generated synchronization script by clicking the Execute button on the SQL toolbar.

How to copy data to Oracle schema?

The following example will show you how to copy data to an Oracle schema.

  1. Start dbForge Data Compare for Oracle.
  2. On the Start page, click New Data Comparison. The new Data Comparison Wizard opens.
  3. Select source and target schemas in the grid to compare.
  1. On the Options wizard page, set the comparison options.
  1. On the Mapping wizard page, select objects that you want to compare. Click Compare.
  1. Review the comparison results to choose required objects for synchronization. For objects you don't want to synchronize, unselect the check boxes next to them. Click Synchronize.
  1. Select where to output synchronization script - open in the editor, save for the future execution, or immediately execute it.
  1. Specify synchronization options.
  1. Review the synchronization actions and warnings.
  1. Execute the resulting script by clicking the Execute button on the SQL toolbar.

Conclusion

From this article you have learned how to copy an Oracle schema along with data to another server. dbForge Schema Compare for Oracle will help you to compare Oracle schemas and quickly obtain the comparison results by completing just a few simple steps of Data Comparison Wizard.