My Oracle Support Banner

How To Use DBMS_METADATA_DIFF API To Compare Object Metadata (Doc ID 1366469.1)

Last updated on FEBRUARY 01, 2022

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
RDBMS version 11gR2.


The provided information/example shows how to use DBMS_METADATA_DIFF API to compare object metadata.
For the example a new test schema and two test tables need to be created as summarized below:

  1. Create a new testschema.
  2. Create two tables under the test schema.
    These tables are going to have a few DDL differences for this example.
  3. Run DBMS_METADATA_DIFF API to compare the tables and show the differences


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.