Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 98 99 100 101 102 103 < 104 > 105 106 107 108 109 110 .. 218 >> Next

InconsistentRI the consequence of a RESTORE operation. (Use the ARC REVALIDATE REFERENCES FOR command to revalidate the RI.)
UnresolvedRI the result of a forward reference, where a Child table references a non-existent Parent table. (Once the Parent table is created, the UnresolvedRI value changes to ValidRI.)

DBID

The ID of the database in which the Child table resides (the Child owner database).

TableID ID of the Child table.
ChildEntry The value FALSE.
SecIdxId Secondary index number, or 0 (zero) if the PK column(s) (or alternate key column) in this table are defined as a UPI.
FKFields Describes the FK columns.

Comparable state settings indicate the state of a Referential Constraint table:

ValidSoftRI

InvalidSoftRI

UnresolvedSoftRI

InconsistentSoftRI

Comparable state settings indicate the state of a Batch RI table:

ValidBatchRI

InvalidBatchRI

InconsistentBatchRI

UnResolvedBatchRI

The meaning and rules for SoftRI and BatchRI states are the same as for RI states.

7 - 10 Teradata RDBMS Database Administration

Chapter 7: Protecting Data

Using Referential Integrity

Some operations depend on the state of the RI for success. For example, if the state is Invalid, Inconsistent, or Unresolved, the following operations are not allowed:

Update, insert, delete

ARC ARCHIVE/RESTORE or COPY/RESTORE

Use the ARC REVALIDATE REFERENCES FOR command to reset states that are set to "inconsistent" as a result of RESTORE operations.

For more information on revalidating references, see "Changing the State of RI Tables with REVALIDATE REFERENCES FOR" on page 8-32.

Tracking RI Definitions

You can track the definitions of referential constraints with the following views:

This view . Provides information about .
DBC.All_RI_Children defined referential constraints from the child-parent perspective.
DBC.All_RI_Parents defined referential constraints from the parent-child perspective.
DBC.RI_Child_Tables tables in child-parent order. This view is similar to the All_RI_Children view, but returns the internal IDs of databases, tables, and columns.
DBC.RI_Distinct_Children tables in child-parent order without the duplication that could result from multi-column FKs.
DBC.RI_Distinct_Parents tables in parent-child order without the duplication that could result from multi-column FKs.
DBC.RI_Parent_Tables tables in parent-child order. This view is similar to the All_RI_Parents view, but returns the internal IDs of databases, tables, and columns.

7 - 10

Teradata RDBMS Database Administration Chapter 7: Protecting Data

Transaction Data Protection

Transaction Data Protection

The system protects data integrity by managing transactions to maintain consistent data for all users.

A transaction is a single unit of work. It is made up of one or more SQL statements that are completed as a single request. Work is not committed until every statement within the transaction completes successfully.

If any statement within the transaction fails, all work completed from the start of the transaction up to that point is rolled back.

Transactions and Data Integrity

An application-initiated asynchronous abort causes full transaction rollback. This type of abort is generated through a Call Level Interface Version 2 (CLIv2) abort request or is performed by the TDP when the application terminates without proper session cleanup.

Teradata RDBMS supports two transaction modes:

ANSI mode

Teradata mode

You can alter the transaction mode via the SET SESSION command in Basic Teradata Query (BTEQ). See Teradata Basic Query Reference for more information.

An explicit transaction consists of one or more requests enclosed by BEGIN TRANSACTION/END TRANSACTION statements.

An implicit transaction is typically a macro, a data manipulation statement that affects a number of table rows, or a multi-statement request that is not part of an explicit transaction, and for which the system automatically supplies BEGIN/END TRANSACTION statements.

See Teradata RDBMS SQL Reference, Volume 6 for detailed syntax on BEGIN TRANSACTION and END TRANSACTION statements, and on transaction semantics.

ANSI Mode

If the system detects a statement error, or a privilege or false constraint violation, and all statements in a request cannot complete successfully, in ANSI mode the system:

Aborts only the request

Backs out any changes to mode by the request

Does not release locks held by the request

Teradata RDBMS Database Administration

7 - 15 Chapter 7: Protecting Data

Transaction Data Protection

Returns an error response to the user

Note: If the statement in error is a DDL statement, not releasing the locks makes the system vulnerable to single-user deadlock between the locks placed by the DDL statement and those required for a parser dictionary cache request for a subsequent request from the same user.

If a deadlock or DDL error occurs, the system cannot successfully complete all statements in a request, and aborts the entire transaction.
Previous << 1 .. 98 99 100 101 102 103 < 104 > 105 106 107 108 109 110 .. 218 >> Next