Example: Creating a Database with Fallback and Journaling - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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 of 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.