B417 Tale3T

Embed Size (px)

Citation preview

  • 7/27/2019 B417 Tale3T

    1/15

    Module 17: A Tale of Three Tables

    After completing this module, you will be able to:

    Analyze the efficiency of backup procedures after a

    single disk failure.

  • 7/27/2019 B417 Tale3T

    2/15

    Permanent Journal Scenario

    A Tale of Three Tables

    A user has three data tables:

    Table X Fallback

    Before and

    After Image JournalsTable Y No Fallback

    No Before and

    Dual After Image JournalsTable Z No Fallback

    Single Before and

    Single After Image Journals

  • 7/27/2019 B417 Tale3T

    3/15

    Table X

    Fallback protected data

    Fallback protected before images

    Fallback protected after images

    AMP 1 AMP 2 AMP 3 AMP 4

    Table X Table X Table X Table X

    Primary Primary Primary Primary1 2 3 4

    Table X Table X Table X Table X

    Fallback Fallback Fallback Fallback

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    After After After After

    1 2 3 4

    After After After After

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Before Before Before Before

    1 2 3 4

    Before Before Before Before

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Data

    PJ

  • 7/27/2019 B417 Tale3T

    4/15

    Table Y

    No fallback

    Dual after image

    AMP 1 AMP 2 AMP 3 AMP 4

    Table Y Table Y Table Y Table Y

    Primary Primary Primary Primary1 2 3 4

    After After After After

    1 2 3 4

    After After After After

    2 3 4 1

    Data

    PJ

  • 7/27/2019 B417 Tale3T

    5/15

    Table Z

    No fallback

    Single before images

    Single after images

    AMP 1 AMP 2 AMP 3 AMP 4

    Table Z Table Z Table Z Table ZPrimary Primary Primary Primary

    1 2 3 4

    Before Before Before Before

    1 2 3 4

    After After After After

    2 3 4 1

    Data

    PJ

  • 7/27/2019 B417 Tale3T

    6/15

    Permanent Journals(Putting all tables three together)

    AMP 1 AMP 2 AMP 3 AMP 4

    Table X Table X Table X Table X

    Primary Primary Primary Primary1 2 3 4

    Table X Table X Table X Table XFallback Fallback Fallback Fallback

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    After After After After1 2 3 4

    After After After After2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Before Before Before Before1 2 3 4

    Before Before Before Before2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Table Y Table Y Table Y Table YPrimary Primary Primary Primary

    1 2 3 4

    After After After After

    1 2 3 4After After After After

    2 3 4 1

    Table Z Table Z Table Z Table ZPrimary Primary Primary Primary

    1 2 3 4

    Before Before Before Before1 2 3 4

    After After After After2 3 4 1

  • 7/27/2019 B417 Tale3T

    7/15

    Archive Policy

    DAILY

    CHECKPOINT ALL JOURNALS with SAVE

    ARCHIVE JOURNAL TABLES

    DELETE SAVED JOURNALS

    ARCHIVE One Complete Table per Day

    WEEKLY

    Perform ALL-AMPs ARCHIVE of DATA TABLES

  • 7/27/2019 B417 Tale3T

    8/15

    Archive Scenario

    Monday:Archive journals X, Y and Z

    Archive table X

    Tuesday:

    Archive journals X, Y and ZArchive table Y

    Wednesday:

    Archive journals X, Y and Z

    Archive table Z

    Thursday:

    AMP 3: Two drives fail in a drive group

  • 7/27/2019 B417 Tale3T

    9/15

    After Restart Processing Completes

    AMP 1 AMP 2 AMP 3 AMP 4

    Table X Table X Table X

    Primary Primary Primary1 2 4

    Table X Table X Table XFallback Fallback Fallback

    2, 3, 4 1, 3, 4 1, 2, 3

    After After After1 2 4

    After After After2, 3, 4 1, 3, 4 1, 2, 3

    Before Before Before1 2 4

    Before Before Before2, 3, 4 1, 3, 4 1, 2, 3

    Table Y Table Y Table YPrimary Primary Primary

    1 2 4

    After After After

    1 2 4After After After

    2 3 1

    Table Z Table Z Table ZPrimary Primary Primary

    1 2 4

    Before Before Before1 2 4

    After After After2 3 1

    1. Replace the 2 drives.2. Initialize the rank.

    3. Format the array

    (RAID 1 or 5).

    4. Initialize and rebuild

    the AMPs Vdisk

    using Vprocmanager

    functions (e.g.,

    BOOT).

    5. Use the table

    REBUILD utility to

    rebuild AMP 3 - the

    VprocState will be

    UTILITY during this

    phase.

    7. REBUILD will set the

    VprocState to

    ONLINE when

    finished.

    8. Restart Teradata.

  • 7/27/2019 B417 Tale3T

    10/15

    After REBUILD and Restart of Teradata

    AMP 1 AMP 2 AMP 3 AMP 4

    Table X Table X Table X Table X

    Primary Primary Primary Primary1 2 3 4

    Table X Table X Table X Table XFallback Fallback Fallback Fallback

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    After After After After1 2 3 4

    After After After After2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Before Before Before Before1 2 3 4

    Before Before Before Before2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Table Y Table Y Table Y Table YPrimary Primary (Header) Primary

    1 2 4

    After After After After

    1 2 3 4After After After After

    2 3 4 1

    Table Z Table Z Table Z Table ZPrimary Primary Primary

    1 2 4

    Before Before Before1 2 4

    After After After2 3 1

  • 7/27/2019 B417 Tale3T

    11/15

    Table X Recovery

    Fallback protected data

    Fallback protected before images

    Fallback protected after images

    AMP 1 AMP 2 AMP 3 AMP 4

    Table X Table X Table X Table X

    Primary Primary Primary Primary

    1 2 3 4

    Table X Table X Table X Table X

    Fallback Fallback Fallback Fallback

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    After After After After

    1 2 3 4

    After After After After

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Before Before Before Before

    1 2 3 4

    Before Before Before Before

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Data

    PJ

    Fully Recovered

  • 7/27/2019 B417 Tale3T

    12/15

    Table Y Recovery

    Before

    Recovery:

    AMP 1 AMP 2 AMP 3 AMP 4

    Table Y Table Y Table Y Table YPrimary Primary (Header) Primary1 2 4

    After After After After1 2 3 4

    After After After After2 3 4 1

    Data

    PJ

    1. Specific AMP RESTORE of Tuesdays ARCHIVE of Table Y.

    2. Do NOT release utility locks.

    3. RESTORE of Wednesdays ARCHIVE of journal Y.

    4. Specific AMP ROLLFORWARD USE RESTORED journal of Table Y.

    5. DELETE RESTORED JOURNAL Y.

    6. Specific AMP ROLLFORWARD USE CURRENT journal of Table Y.

    7. RELEASE utility LOCKs.

    After

    Recovery:

    AMP 1 AMP 2 AMP 3 AMP 4

    Table Y Table Y Table Y Table YPrimary Primary Primary Primary

    1 2 3 4

    After After After After1 2 3 4

    After After After After2 3 4 1

    Data

    PJ

  • 7/27/2019 B417 Tale3T

    13/15

    Table Z Recovery

    Before

    Recovery:

    AMP 1 AMP 2 AMP 3 AMP 4

    Table Z Table Z Table Z Table ZPrimary Primary (Header) Primary1 2 4

    Before Before Before1 2 4

    After After After2 3 1

    Data

    PJ

    1. Specific AMP RESTORE of Wednesday's ARCHIVE of Table Z.

    2. Do NOT release utility locks.

    3. Specific AMP ROLLFORWARD USE CURRENT journal of Table Z.

    4. Perform all-AMPs ARCHIVE of Table Z.

    5. Run CHECKPOINT WITH SAVE and DELETE SAVED JOURNAL.

    6. RELEASE utility LOCKs.

    After

    Recovery:

    AMP 1 AMP 2 AMP 3 AMP 4

    Table Z Table Z Table Z Table ZPrimary Primary Primary Primary

    1 2 3 4

    Data

    PJ

  • 7/27/2019 B417 Tale3T

    14/15

    After Recovery

    AMP 1 AMP 2 AMP 3 AMP 4

    Table X Table X Table X Table X

    Primary Primary Primary Primary1 2 3 4

    Table X Table X Table X Table XFallback Fallback Fallback Fallback

    2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    After After After After1 2 3 4

    After After After After2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Before Before Before Before1 2 3 4

    Before Before Before Before2, 3, 4 1, 3, 4 1, 2, 4 1, 2, 3

    Table Y Table Y Table Y Table YPrimary Primary Primary Primary

    1 2 3 4

    After After After After

    1 2 3 4After After After After

    2 3 4 1

    Table Z Table Z Table Z Table ZPrimary Primary Primary Primary

    1 2 3 4

  • 7/27/2019 B417 Tale3T

    15/15

    Summary

    Fallback Tables Data is fully recoverable.

    Dual Image Journals Journals play no part in recovery.

    No Fallback Tables Data is partially available.

    Dual Image Journals Data and journals is fully recoverable.

    No Fallback Tables Data is partially available.

    Single Image Journals Data is recoverable, but journals are lost.

    No Fallback Tables Data is partially available.

    No Journals Data can be recovered only to the point of the

    last archive.