UTL_IDENT

The UTL_IDENT package indicates whether PL/SQL is running on TimesTen, an Oracle database client, an Oracle database server, or Oracle Forms. Each of these has its own version of UTL_IDENT with appropriate settings for the constants.

Table 7-11 shows the UTL_IDENT settings for TimesTen.

The primary use case for the UTL_IDENT package is for conditional compilation, resembling the following:

$if utl_ident.is_oracle_server $then
    [...Run code supported for Oracle Database...]
$elsif utl_ident.is_timesten $then
    [...code supported for TimesTen Database...]
$end

Table 7-11 UTL_IDENT Constants

Name Description

IS_ORACLE_CLIENT

BOOLEAN set to FALSE

IS_ORACLE_SERVER

BOOLEAN set to FALSE

IS_ORACLE_FORMS

BOOLEAN set to FALSE

IS_TIMESTEN

BOOLEAN set to TRUE

See Examples in Oracle TimesTen In-Memory Database PL/SQL Packages Reference for an example that uses TT_DB_VERSION and UTL_IDENT.