Database Differences

This wizard is displayed if you click Tools, then Database Diff. You can find differences between objects of the same type and name (for example, tables named CUSTOMERS) accessible from two different connections, and optionally generate DDL to update the objects in the destination schema to reflect the differences in the source schema.

Use the Source/Destination page to specify the source and destination database connections. Database objects in the schemas associated with these connections will be compared. The schemas for the source and destination connections can be in the same database or different databases.

Some pages include Proceed to Summary, which lets you accept the default values for remaining pages and go directly to the Summary page by clicking Next.

Source/Destination page

Source Connection: Database connection that has access to the source objects to be compared.

Destination Connection: Database connection that has access to the destination objects to be compared.

DDL Generation Options: Check the options or features to be included if you later generate a script to update the objects in the destination schema to reflect differences in the source schema: comments, schema name (prefixed to schema objects), constraints, password values, constraint indexes, referential constraints. Options that are not checked are ignored or not performed during the script generation.

Schema: This option, if you also select Consolidate Schema under DDL Comparison Options, causes object names to be prefixed with the target schema name in the generated script (for example, CREATE TABLE "HR"."SKILLS" instead of CREATE TABLE "SKILLS"). If you select Maintain Schema under DDL Comparison Options, this Schema option is ignored and object names are prefixed with the source schema name in the generated script.

DDL Comparison Options: Check various options, including differences to be ignored, when objects in the source and destination schemas are compared.


Note:

The DDL Generation Options apply to how the DDL will be generated, whereas the DDL Comparison Options apply to how the comparison is made between the two objects.

Consolidate Schema and Maintain Schema enable you either to compare the source objects with objects owned by the target connection user (schema) or with any object accessible by the target connection. The resulting behavior is largely based on which option you select and which objects your connection has access to.

Match Constraints By: Controls whether constraints are matched for comparison by the names (Name) or definitions (Definition).

Ignore Segment Attributes: Causes differences in segment specification to be ignored.

Ignore Table Column Position: Causes differences in the positions of table columns to be ignored when objects are compared. For example, if this option is enabled (checked), two tables would not be considered different in the only difference is that Column1 and Column2 appear first and second in one table but second and first in the other table.

Ignore Storage: Causes differences in storage specification to be ignored.

Ignore High Values: Causes differences in partition high values for tables to be ignored.

Ignore Tablespace: Causes differences in the tablespace specified for the object to be ignored.

Logical Compare: Causes meaningless SQL formatting differences in definitions of objects (such packages, package bodies, procedures, and functions) to be ignored.

Ignore Partitioning: Causes differences in partitioning specifications for the object to be ignored

Report Constraint Name Difference: If Match constraints by Definition is selected, causes the constraint name to be displayed when differences are reported.

Types to Diff page

See Types under Shared Wizard Pages.

Specify Objects page

See Specify Objects under Shared Wizard Pages.

Summary page

See Summary under Shared Wizard Pages.

The results are displayed in a Diff Report window, where you can see the DDL statements to update the objects in the destination schema to reflect differences from the source schema. To create a file containing these DDL statements, click the Generate Script (SQL) icon in that window. In the Generate SQL dialog box you can specify the Save As destination or type (Single File, Separate Files, Type Files, Separate Directories, Worksheet, Clipboard), the location, and the encoding.

To display only objects with differences that have the same name in both connections, select Show Equal Objects. To display all objects that have differences or that exist one one connection but not the other, select Show New Objects.

Related Topics

Database Connections

Database Objects