Introduction to DB2 compatibility features
DB2® Version 9.5 introduced
a number of features that greatly simplify the task of enabling some
applications written for different relational database products to
run on DB2. DB2 Version 9.7 introduces additional features
that reduce this complexity and the time required to enable existing
applications even further.
DB2_COMPATIBILITY_VECTOR registry variable
The DB2_COMPATIBILITY_VECTOR registry
variable is used to enable one or more DB2 compatibility
features introduced since DB2 Version 9.5.
Character and graphic constant handling
An alternate way to parse character or graphic constants
is introduced to support applications that expect these constants
to be assigned the data types CHAR and GRAPHIC, respectively.
SQL data access level enforcement
The degree to which a routine (stored procedure or user-defined
function) can execute SQL statements is determined by its SQL access
level.
Outer join operator
When the DB2_COMPATIBILITY_VECTOR registry
variable is set to support the outer join operator, (+), queries can
use this alternative syntax within predicates of the WHERE clause.
Hierarchical queries
Hierarchical queries are a form of recursive query that
provides support for retrieving a hierarchy, such as a bill of materials,
from relational data using a CONNECT BY clause.
ROWNUM pseudocolumn
DB2 converts any unresolved and unqualified column
reference to ROWNUM to the OLAP specification ROW_NUMBER() OVER().
DUAL table
The DB2 data server
resolves any unqualified table reference to "DUAL" as a built-in
view returning one row and one column named "DUMMY", whose value
is 'X'.
Insensitive cursor
Starting with Version 9.7 Fix Pack 2 and later fix packs,
you have the option of making cursors insensitive to subsequent statements
by materializing the cursor at OPEN time.
INOUT parameter
Starting with Version 9.7 Fix Pack 2 and later fix packs,
a procedure can have INOUT parameters defined with a default and the
procedure can subsequently be invoked without an argument for those
parameters.
Oracle data dictionary-compatible views
When the DB2_COMPATIBILITY_VECTOR registry
variable is set to support Oracle data dictionary-compatible views,
the views are automatically created when the database is created.
DB2-Oracle terminology mapping
Because Oracle applications can be enabled to work with DB2 data servers when the DB2 environment is set up appropriately,
it is important to understand how certain Oracle concepts map to DB2 concepts.