Which constraints will remain enabled by default during this operation?

You plan to move data from a flat file to a table in your database. You decide to use
SQL*Loader direct path load method to perform this task. The table in which you plan to
load data in an important table having various integrity constraint defined on it. Which
constraints will remain enabled by default during this operation? (Choose all that apply.)

You plan to move data from a flat file to a table in your database. You decide to use
SQL*Loader direct path load method to perform this task. The table in which you plan to
load data in an important table having various integrity constraint defined on it. Which
constraints will remain enabled by default during this operation? (Choose all that apply.)

A.
CHECK

B.
FOREIGN KEY

C.
PRIMARY KEY

D.
NOT NULL

E.
UNIQUE



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Spencer Tesoh

Spencer Tesoh

The correct answers should be PRIMARY KEY, NOT NULL & UNIQUE. (C, D, E).

mostramistra

mostramistra

Integrity Constraints and SQL*Loader

All integrity constraints are enforced during direct path loads, although not necessarily at the same time. NOT NULL constraints are enforced during the load. Records that fail these constraints are rejected.

UNIQUE constraints are enforced both during and after the load. A record that violates a UNIQUE constraint is not rejected (the record is not available in memory when the constraint violation is detected).

Integrity constraints that depend on other rows or tables, such as referential constraints, are disabled before the direct path load and must be reenabled afterwards. If REENABLE is specified, SQL*Loader can reenable them automatically at the end of the load. When the constraints are reenabled, the entire table is checked. Any rows that fail this check are reported in the specified error log.

mostramistra

mostramistra

Integrity Constraints
During a direct path load, some integrity constraints are automatically disabled. Others are not. For a description of the constraints, see the information about maintaining data integrity in the Oracle Database Advanced Application Developer’s Guide.

Enabled Constraints
During a direct path load, the constraints that remain enabled are as follows:

NOT NULL
UNIQUE
PRIMARY KEY (unique-constraints on not-null columns)
NOT NULL constraints are checked at column array build time. Any row that violates the NOT NULL constraint is rejected.

Even though UNIQUE constraints remain enabled during direct path loads, any rows that violate those constraints are loaded anyway (this is different than in conventional path in which such rows would be rejected). When indexes are rebuilt at the end of the direct path load, UNIQUE constraints are verified and if a violation is detected, the index will be left in an Index Unusable state. See Indexes Left in an Unusable State.

Disabled Constraints
During a direct path load, the following constraints are automatically disabled by default:
CHECK constraints
Referential constraints (FOREIGN KEY)

https://docs.oracle.com/cd/B28359_01/server.111/b28319/ldr_modes.htm#i1008078

ANSWER: C,D,E