15.10 - FALLBACK PROTECTION - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

Whether to create and store a duplicate copy of each table created in the new database.

The FALLBACK keyword used alone implies PROTECTION.

NO
The default value is NO FALLBACK. This setting can be overridden for a particular data table when the table is created.

Example: Creating a Database with Fallback and Journaling

The following request creates a database named personnel from database administration:

    CREATE DATABASE personnel FROM administration
    AS PERMANENT = 5000000 BYTES, FALLBACK, BEFORE JOURNAL, 
    DUAL AFTER JOURNAL, DEFAULT JOURNAL TABLE = personnel.fin_copy;

The FALLBACK keyword specifies that for each table created in the personnel database, the default is to store a secondary, duplicate copy in addition to the primary copy.

The JOURNAL option specifies that the default journaling for each data table is to maintain a single copy of the before change image and dual copies of the after change image. A duplicate before change image is maintained automatically for any table in this database that uses both the fallback and the journal defaults.

The DEFAULT JOURNAL TABLE clause is required because journaling is requested. This clause specifies that a new journal table named fin_copy is to be created in the new database.

Permanent journaling is activated because you specified the BEFORE JOURNAL and AFTER JOURNAL options. Either option, by itself, is sufficient to activate journaling.