Oracle7 Server SQL Reference

Contents Index Home Previous Next

Compatibility Modes

The compatibility mode controls Oracle7's behavior in a few areas for which there are minor differences between Oracle Version 6 and Oracle7. Oracle7 can operate in these compatibility modes:

V7 compatibility mode

In this mode, Oracle interprets SQL exactly as described in this manual.

V6 compatibility mode

In this mode, Oracle interprets SQL as described in this manual, with some exceptions for compatibility with Oracle Version 6.

Table 4 - 14 describes the differences between V6 and V7 compatibility modes:

V6 Compatibility Mode V7 Compatibility Mode
If you define a column of datatype CHAR, Oracle creates the column with the Oracle7 VARCHAR2 datatype, which is equivalent to the Oracle Version 6 CHAR datatype. The column is a variable-length character string with non-padded comparison semantics and a maximum length of 2000 bytes. If you define a column of datatype CHAR, Oracle creates the column with the Oracle7 CHAR datatype, which is not equivalent to the Oracle Version 6 CHAR datatype. The column is fixed-length character string with blank-padded comparison semantics and a maximum length of 255 bytes.
The optimal CONSTRAINT identifier can only appear at the end of a CONSTRAINT clause. The optional CONSTRAINT identifier can only appear at the beginning of a CONSTRAINT clause.
By default, PRIMARY KEY, UNIQUE, referential integrity, and CHECK constraints are disabled upon creation. NOT NULL constraints are enabled upon creation by default. By default, all integrity constraints are enabled upon creation.
If you specify a PCTINCREASE value for a rollback segment, Oracle ignores this value and uses a value of 0. If you specify a PCTINCREASE value for a rollback segment, Oracle returns an error.
If you specify a MAXEXTENTS value that exceeds the maximum possible value based on the data block size, Oracle ignores the specified value and uses the maximum possible value. If you specify a MAXEXTENTS value that exceeds the maximum possible value based on the data block size, Oracle returns an error.
Table 4 - 14. Differences Between V6 and V7 Compatibility Modes

There are additional differences between the V6 and V7 compatibility modes that are specific to the Oracle Precompilers and the Oracle Call Interfaces (OCIs). For information on these differences, see Programmer's Guide to the Oracle Precompilers and Programmer's Guide to the Oracle Call Interface.

Migrating to Oracle7

You may want to establish V6 compatibility mode when you initially upgrade to Oracle7 in order ease the migration of your existing Oracle Version 6 applications. Establishing V6 compatibility mode reduces (but does not eliminate) the number of changes you may have to make to your applications before running them on Oracle7. Note that there is some SQL syntax supported by Oracle Version 6 that is not supported by Oracle7 in either V6 or V7 compatibility mode. If you have existing applications that you have run on Oracle Version 6, see Oracle7 Server Migration for a list of the changes that you must make to these applications before running them on Oracle7.

You should eventually upgrade your applications so that they can be run in V7 compatibility mode, rather than V6 compatibility mode.

Establishing and Switching Between Compatibility Modes

By default, all sessions on Oracle7 initially run in V7 compatibility mode. Some Oracle application tools allow you to establish and switch between compatibility modes for your sessions. For information on how to establish and switch between compatibility modes, see the manual for the specific tool. For example, to find out how to switch between compatibility modes with SQL*Plus, see SQL*Plus User's Guide and Reference.


Contents Index Home Previous Next