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 .. 110 111 112 113 114 115 < 116 > 117 118 119 120 121 122 .. 218 >> Next


For more information on primary indexes and partitioning, see "Primary Index (PI)" on page 2-22 and "Solving PPI and RI Validation Errors" on page 12-27.

8 - 8

Teradata RDBMS Database Administration Chapter 8: Archiving, Restoring and Recovering Data

Arc Recovery versus FastLoad

ARC Recovery versus FastLoad

You can run a FastLoad utility job to restore archived information to disk. To do this, instead of archiving to tape, use BTEQ EXPORT, or FastExport to store the information in a host file. (Note, however, that FastLoad requires an empty table.)

Process Export/FastLoad ARC
Back up the data. FastExport Archive
Restore to a different database or system. FastLoad Copy
Restore to same system. Block at a time sent to AMP. Redistribute by row to target AMPs. Blocks are sorted. Table blocks are built. Blocks sent directly to target AMPs. Tables are built.
Table-by-table only. Can restore entire system with one command.

FastLoad Steps to Restore a Table

Note: FastLoad operates only on tables with no secondary or join indexes or triggers. You have to recreate these objects when the FastLoad completes.

FastLoad uses the following steps to restore a table.

Step Process
1 FastLoad uses a single session to send the INSERT statement to the PE and AMPs.
2 Multiple sessions are then used to facilitate sending rows to the AMPs.
3 Upon receipt, each AMP hashes each record and redistributes it over the BYNET. This is done in parallel.
4 The receiving AMP then writes these rows as unsorted blocks directly to the target table.
5 When loading completes, each AMP sorts the target table, puts the rows into blocks, and writes the blocks to disk
6 Fallback rows are generated if required.

8 - 10 Teradata RDBMS Database Administration

Chapter 8: Archiving, Restoring and Recovering Data

Arc Recovery versus FastLoad

Recovery Steps

Recovering to the same configuration includes:

Recovery of data blocks to the AMP.

The blocks are already in the appropriate format.

Recovering to a different configuration includes:

The block is first sent to the AMP in the old configuration.

Then, it strips off its own rows and forwards (redistributes) the remainder of the block to the AMP for the new configuration. Since the original rows were sorted in data blocks by ROWID, the result is usually much faster than a normal redistribution.

ARC is the easiest and fastest method for recovering a very large number of

objects. FastLoad operates on a table-by-table basis, while ARC can restore an

entire machine with one command.

8 - 10

Teradata RDBMS Database Administration Chapter 8: Archiving, Restoring and Recovering Data

Scripts

Scripts

A script is an executable file containing a series of ARC commands. You create ARC scripts and execute them to perform ARC functions.

Script Management

Script management consists of the following functions:

This statement . Is used to .
CREATE create a new script using a text editor.
EDIT view or modify a set of statements that you have already created and saved in a file.
IMPORT import an existing script file.
DBCINFO display or change the Teradata RDBMS tdpid, logon, password, or account associated with the script execution.
DELETE delete existing scripts.

Teradata Logon

All scripts require a Teradata Database user to LOGON to the database prior to using ARC commands. In addition, that user requires the appropriate privileges to perform the functions. For example, the DUMP privilege is required if you wish to ARCHIVE a Table.

A Script Logon Parameters screen is displayed when you indicate that you wish to create a script. This screen allows you to enter the appropriate LOGON information. If you had chosen the DBC Info, a similar screen would appear for you to define the default LOGON information.

After you have made the appropriate entries, select 'OK' to indicate that the entries are correct and the LOGON statement will be defined for you as the initial entry in your script.

Creating a Script

By selecting the ARC Language statement you want, you can facilitate the creation of the script by responding to the questions asked for the statement options.

If you click on the 'Editable' button, you can type the script in the box on the right-hand side of the screen. It may be easier to select the commands from the left side and respond to the questions presented.

Teradata RDBMS Database Administration

8 - 11 Restoring and Recovering Data

Script

If you select ARCHIVE, fields for the Database and/or Table names and the name of the ARCHIVE file are displayed. After entering the name of the object you wish to archive, click on Add to add it to the list. Indicate you want All objects in a Database and Databases owned by the specified database or user by clicking on the All descendants button.

To archive a script:

Enter the Archive List (Database and/or Table names).
Previous << 1 .. 110 111 112 113 114 115 < 116 > 117 118 119 120 121 122 .. 218 >> Next