Search Results unique_key_sequence




Overview

OE_DEF_AK_UKEY_COLS_V is a dictionary-style reporting view owned by the APPS schema in Oracle E-Business Suite, delivered as part of the Order Management (ONT) product family. It exposes metadata about the unique key definitions used by the Oracle Application Object Library (AK) flexible attribute framework, filtered to the attribute definitions relevant to Order Management entities. In practice, the view answers the question of which database columns participate in a given unique key, in what ordinal position, and against which underlying database object that column is defined.

The view name itself is instructive: "DEF" denotes definition metadata, "AK" identifies the Oracle Common Application Components attribute framework, and "UKEY_COLS" identifies unique key columns. Its role is predominantly diagnostic and developmental rather than transactional. Reporting and integration teams use it to resolve the physical column behind a logical descriptive flexfield or key flexfield attribute, which is essential when constructing custom queries, extracts, or interface programs that must join to Order Management data on a deterministic key. Because the view joins only metadata tables, it returns no transactional order data and is safe to query repeatedly without affecting application performance in a meaningful way.

Underlying Base Objects

Per the documented ETRM metadata, OE_DEF_AK_UKEY_COLS_V is defined over two referenced objects:

The two sources are joined on the composite pair ATTRIBUTE_CODE and ATTRIBUTE_APPLICATION_ID, which enforces that an attribute is matched only within its owning application. This join is significant because attribute codes are not globally unique across applications; scoping the join by application identifier prevents cross-product collisions. The view is therefore a narrow projection rather than a direct mirror of either base object, and it inherits the validation status of its underlying components.

Key Columns

  • ATTRIBUTE_CODE — the logical identifier of the attribute as understood by the AK framework.
  • COLUMN_NAME — the physical database column that implements the attribute.
  • DATA_TYPE — the datatype of that column, useful when generating dynamic SQL or validating extract logic.
  • DATABASE_OBJECT_NAME — the table or view on which the column is defined, providing the join target for transactional data.
  • UNIQUE_KEY_NAME — the name of the unique key to which the attribute belongs.
  • UNIQUE_KEY_SEQUENCE — the ordinal position of the column within that unique key; this is the column most relevant to the search term "unique_key_sequence" and determines key ordering.
  • ATTRIBUTE_APPLICATION_ID — the owning application identifier, used both as a join key and as a filter to isolate Order Management definitions.

Ordering by UNIQUE_KEY_SEQUENCE within a UNIQUE_KEY_NAME reproduces the canonical column order of the key, which is the correct basis for constructing deterministic lookups.

Common Use Cases and Queries

Typical scenarios include identifying the physical columns behind an Order Management unique key before writing a custom extract, verifying key composition after an upgrade, and generating dynamic SQL that must reference the correct database object.

To list all columns of every unique key together with their sequence:

  • SELECT unique_key_name, unique_key_sequence, attribute_code, column_name, data_type, database_object_name FROM apps.oe_def_ak_ukey_cols_v ORDER BY unique_key_name, unique_key_sequence;

To inspect a single key's composition in canonical order:

  • SELECT unique_key_sequence, column_name, data_type FROM apps.oe_def_ak_ukey_cols_v WHERE unique_key_name = :key_name ORDER BY unique_key_sequence;

To restrict results to a specific owning application and target object:

  • SELECT attribute_code, column_name FROM apps.oe_def_ak_ukey_cols_v WHERE attribute_application_id = :app_id AND database_object_name = :object_name;

Because the view is read-only metadata, it may be queried directly from SQL*Plus or any reporting tool without invoking concurrent programs. Results should be treated as configuration-dependent and re-verified after patches or upgrades.