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 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 need 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.

Schema Compare for Oracle: Create New Schema Comparison Project

4. Click Compare to compare the schemas.

5. 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.

Schema Compare for Oracle: Open Synchronization Wizard

6. Run the generated synchronization script by clicking the Execute button on the SQL toolbar.

Schema Compare for Oracle: Execute Derived SQL Script

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.

Schema Compare for Oracle: Select Source and Target Schemas for Comparison

4. On the Options wizard page, set the comparison options.

Schema Compare for Oracle: Tune Oracle Schema Comparison Behaviour

5. On the Mapping wizard page, select objects that you want to compare. Click Compare.

Schema Compare for Oracle: Select Objects for Comparison

6. 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.

Schema Compare for Oracle: Review Data Comparison Results

7. Select where to output synchronization script - open in the editor, save for the future execution, or immediately execute it.

Schema Compare for Oracle: Set Output Options

8. Specify synchronization options.

Schema Compare for Oracle: Tune Synchronization Process

9. Review the synchronization actions and warnings.

Schema Compare for Oracle: Review Action Plan and Warnings

10. Execute the resulting script by clicking the Execute button on the SQL toolbar.

Schema Compare for Oracle: Review and Execute SQL Script

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.