What Is Oracle Database Compatibility?

Before you upgrade, review compatibility between your earlier release Oracle Database and the new Oracle Database release as part of your upgrade plan.

Understanding Oracle Database Compatibility

If new features are incompatible with your earlier release, then Database compatibility can cause issues.

Databases from different releases of Oracle Database software are compatible if they support the same features, and if those features perform the same way. When you upgrade to a new release of Oracle Database, certain new features can make your database incompatible with your earlier release.

Your upgraded database becomes incompatible with your earlier release under the following conditions:

  • A new feature stores any data on disk (including data dictionary changes) that cannot be processed with your earlier release.

  • An existing feature behaves differently in the new environment as compared to the old environment.

When to Set the COMPATIBLE Initialization Parameter in Oracle Database

Oracle recommends increasing the COMPATIBLE parameter only after you have completed testing the upgraded database.

After the upgrade is complete, you can increase the setting of the COMPATIBLE initialization parameter to the maximum level for the new Oracle Database release. However, after you increase the COMPATIBLE parameter to the maximum value, you cannot subsequently downgrade the database to an earlier release.

If you can provide for an additional maintenance window after your upgrade window, then consider increasing the COMPATIBLE parameter 7 to 10 days after the upgrade, when you have run your applications on the upgraded system, and are sure that a downgrade is not required. If you do not have an additional maintenance window available, then either raise COMPATIBLE after the upgrade (and lose downgrade capability), or continue to use the earlier release COMPATIBLE setting until you are near a maintenance window, so you have the option of downgrading available to you.

About the COMPATIBLE Initialization Parameter in Oracle Database

Review to understand how to set the COMPATIBLE initialization parameter for non-CDB and multitenant architecture containers in Oracle Database 21c.

Oracle Database enables you to control the compatibility of your database with the COMPATIBLE initialization parameter.

Understanding the COMPATIBLE Initialization Parameter

Learn about what the COMPATIBLE parameter does, when to raise the parameter release value, and what effects you can expect when you set the parameter to the new Oracle Database release.

In Oracle Database 21c, when the COMPATIBLE initialization parameter is not set in your parameter file, the COMPATIBLE parameter value defaults to 21.0.0 If you do not set the COMPATIBLE initialization parameter to 21.0.0, then you cannot use the new Oracle Database 21c features, because your upgraded database is not running in the required COMPATIBILITY setting for Oracle Database 21c features.

Note the following restrictions for COMPATIBLE values:

  • The minimum Oracle Database release supported for direct upgrade is Oracle Database 12c Release 2 (12.2).

    Before upgrading to Oracle Database 21c, you must set the COMPATIBLE initialization parameter to at least 12.2.0, which is the minimum compatible setting for Oracle Database 21c.

  • In Oracle Real Application Clusters (Oracle RAC) environments, each Oracle Database instance in the Oracle RAC cluster must run with the same COMPATIBLE setting.

  • The compatible parameter must be at least 3 decimal numbers, separated by periods. For example:

    SQL> ALTER SYSTEM SET COMPATIBLE = '21.0.0' SCOPE=SPFILE;

    Oracle strongly recommends that you only use three decimals in your COMPATIBLE setting.

  • After you increase the COMPATIBLE parameter, you cannot downgrade the database, and you cannot flash back to restore points.

Caution:

Oracle recommends that you only raise the COMPATIBLE parameter to the current release level after you have thoroughly tested the upgraded database.

After the COMPATIBLE parameter has been increased be aware that downgrade to your earlier release can be unsupported, even though upgrades from that release are supported.

When you plug in an earlier release PDB to a later release CDB where COMPATIBLE is set to a later release than the earlier release PDB, and you upgrade the PDB by using an unplug/plug/upgrade procedure, the COMPATIBILE setting of the upgraded PDB is automatically updated to the COMPATIBLE setting of the later release CDB. The COMPATIBLE setting for PDBs must always be the same setting as CDB$ROOT.

Rules for COMPATIBLE Parameter Settings in Multitenant Architecture

When you plug in PDBs to a later release CDB, the CDB$ROOT COMPATIBLE parameter setting can change the PDB COMPATIBLE parameter, or prevent plug-ins.

The COMPATIBLE parameter of the container database (CDB) affects the COMPATIBLE parameter settings of pluggable databases (PDBs) plugged into that container database. Review the following scenarios that occur when you plug in a PDB to a CDB:

  • PDB COMPATIBLE equal to CDB$ROOT COMPATIBLE parameter setting.

    Result: No change to the PDB COMPATIBLE parameter setting.

  • PDB COMPATIBLE is lower than CDB$ROOT COMPATIBLE parameter setting.

    Result: The PDB COMPATIBLE parameter is increased automatically to the same COMPATIBLE parameter setting as CDB$ROOT. After you plug in the PDB, you cannot downgrade the PDB to an earlier release.

  • PDB COMPATIBLE is higher than CDB$ROOT COMPATIBLE parameter setting.

    Result: The PDB cannot be plugged in. Only PDBs with a COMPATIBLE parameter setting equal to or lower than CDB$ROOT can be plugged in to the CDB.

Values for the COMPATIBLE Initialization Parameter in Oracle Database

Review to find the default and minimum values for the COMPATIBLE initialization parameter for Oracle Database 21c.

Default and Minimum COMPATIBLE Parameter Values

The minimum supported release for direct upgrade to Oracle Database 21c is Oracle Database 12c Release 2 (12.2). The minimum COMPATIBLE parameter value for Oracle Database 21c is 12.2.0. The default value for the COMPATIBLE parameter is 21.0.0. Before you use a direct upgrade to Oracle Database 21c, you must set the COMPATIBLE parameter on your source Oracle Database release to at least 12.2.0.

The COMPATIBLE parameter should not be changed for a Release Update (RU) or a Release Update Revision (RUR), either for CDB or Non-CDB instances. The following table lists the default and minimum values for the COMPATIBLE parameter in Oracle Database 21c, compared to earlier releases supported for direct upgrade:

Caution:

After the COMPATIBLE parameter is increased, database downgrade is not possible.

When you plug in an earlier release PDB to a later release CDB where COMPATIBLE is set to a later release than the earlier release PDB, and you upgrade the PDB by using an unplug/plug/upgrade procedure, the COMPATIBILE setting of the upgraded PDB is automatically increased to the COMPATIBLE setting of the later release CDB.

Do not alter the COMPATIBLE parameter to a value other than a default release value. Use only one of the default values listed in the following table.

Table 1-2 The COMPATIBLE Initialization Parameter

Oracle Database Release Default Value Minimum Value
Oracle Database 21c

21.0.0

12.2.0

Oracle Database 19c

19.0.0

11.2.0

Oracle Database 18c

18.0.0

11.2.0

Oracle Database 12c Release 2 (12.2)

12.2.0

11.2.0

About Downgrading and Compatibility for Upgrading Oracle Database

Before upgrading to Oracle Database 21c, you must set the COMPATIBLE initialization parameter to at least 12.2.0.

After upgrading to Oracle Database 21c, you can set the COMPATIBLE initialization parameter to match the release number of the new release. Doing so enables you to use all features of the new release, but prevents you from downgrading to your earlier release. Only a subset of Oracle Database 21c features are available while the COMPATIBLE initialization parameter is set to a lower value.

Caution:

After you increase the COMPATIBLE parameter to the current release, the database cannot be downgraded to an earlier release.

How the COMPATIBLE Initialization Parameter Operates in Oracle Database

The COMPATIBLE initialization parameter enables or disables Oracle Database features based on release compatibility.

The COMPATIBLE initialization parameter operates in the following way:

  • The COMPATIBLE initialization parameter enables or disables the use of features, to help protect your existing application use of data.

    If you run an Oracle Database 21c database with the COMPATIBLE initialization parameter set to 12.2.0, then the database software generates database structures on disk that are compatible with Oracle Database Release 12c Release 2 (12.2). If you try to use features that are part of a later release of Oracle Database, and make the database incompatible with the COMPATIBLE initialization parameter, then an error occurs. However, some new features are enabled that do not create changes on disk that are incompatible with Oracle Database Release 12c Release 2.

  • If you make changes to the database that make the database incompatible with the COMPATIBLE initialization parameter setting for the database, then does not start, and initialization terminates in an error. To resolve this issue, set the COMPATIBLE initialization parameter to a value that is equivalent to the setting required for the changes you made.

See Also:

Oracle Database Concepts for more information about database structures

Checking the Compatibility Level of Oracle Database

Use this SQL query to find the COMPATIBLE initialization parameter value set for your database.

SQL> SELECT name, value FROM v$parameter
         WHERE name = 'compatible';