Diff Between Two Oracle Schemas

Contents

Introduction

Read this article to get acquainted with Devart dbForge Schema Compare for Oracle. This Oracle diff tool can help you effectively compare and synchronize Oracle database schemas. After comparison, it represents differences in schemas in a separate document, where they are ready for analyzing and can be synchronized in a wink.

What is schema comparison?

Schema comparison is a process aimed at comparing two database structures (Source and Target) to find any differences and make these structures identical, i.e., synchronize.

Source is a database content of which is inserted to Target after synchronization. Target is a database content of which you compare and synchronize with Source.

After comparison process is completed, you will be able to view differences in schemas and analyze them in a special document.

Five stages of schema comparison:

1. Creating connections to Oracle servers, where the databases to be compared are located.

2. Selecting Source and Target and setting up additional parameters for comparison.

3. Mapping required schemas in Source and Target manually if automatic mapping cannot satisfy your specific needs.

4. Analyzing comparison results and selecting actions to apply during synchronization (e.g., Create, Drop, Update objects).

5. Synchronizing database structures.

Getting the difference of two Oracle schemas

Now let's compare two database schemas using New Schema Comparison Wizard available in dbForge Schema Compare for Oracle.

1. Click New Schema Comparison on the product Start Page to open New Schema Comparison Wizard.

2. In the wizard, select Database in the Type fields of Source and Target.

Schema Compare for Oracle: Database, Snapshot, Version Control

3. Specify the connections to Oracle servers in the Connection fields.

4. Check the schemas you want to compare in the grid. (You can select one schema or the whole list to compare at once.)

Schema Compare for Oracle: Oracle Schemas

When connections are selected, schemas are automatically mapped and displayed in the grid in the Schema Mapping area. In this grid, you can select the needed target schema to map to the source one from the dropdown list. Also you can select or deselect schemas to compare by checking or unchecking the corresponding checkboxes in the grid.

5. Click Next to go to other wizard pages and customize schema comparison.

Schema Compare for Oracle: Customize Schema Comparison

6. Click Compare to start comparison. The wizard closes, and the schema comparison document, where you can view schema differences, opens.

Schema Compare for Oracle: View Diffs Between Two Oracle Schemas

Analyzing Oracle schema diffs

Schema comparison document provides you a clear view of differences found in the schemas, and offers rich settings to analyze these diffs. When analyzing Oracle schema diffs, you can:

1. Group or filter comparison results in the grid using the Group By field and the Filter list to better understand them.

2. See SQL differences of compared objects in the text comparer under the grid.

Schema Compare for Oracle: Group Comparison Result

3. If required, change update operations for compared objects in the Operation fields. These operations will be applied during schema synchronization.

4. If required, include only necessary objects into synchronization by selecting checkboxes near the needed objects. To exclude objects from synchronization, unselect the checkboxes next to them.

Schema Compare for Oracle: Operations for Compared Objects

Conclusion

There are many alternative Oracle schema diff tools, but you should choose the most appropriate one. dbForge Schema Compare for Oracle can boast of convenient UI, comprehensive database comparison and synchronization wizards, rich settings, high performance, and stable work.

After studying this article, you will be able to perform simple actions related to comparing Oracle databases, viewing and analyzing diffs between them.