15.00 - LOAD - Teradata Database

Teradata Database Utilities

Product
Teradata Database
Release Number
15.00
Content Type
Configuration
Publication ID
B035-1102-015K
Language
English (United States)
Last Update
2018-09-25

LOAD

Purpose  

The LOAD command moves dump data from files (dul) or tape (dultape) created by an unload operation into tables on a Teradata Database.

Syntax  

 

Syntax element …

Is the …

database

name of the database in which the table resides. Use a period (.) to separate the database name from the table name.

table

name of the table to receive dump data.

The table cannot already exist. However, the database in which the table will reside must already exist.

FALLBACK

option that creates a fallback copy of the table specified in the LOAD command as well as the tables with the same name ending in _L, _C,
and _M.

FILE = filepath

the path of the file created in a previous unload operation.

The filepath specification is required.

The filepath is specified as directory/filename.

Note: Dul expects dump files to be in a compressed, gzip format. For compatibility, dul can load compressed files regardless of whether the file name includes the .gz extension.

Usage Notes  

Before you can perform a load operation, your username specified in the logon ID must have CREATE, DROP, and SELECT privileges on the DataBase Computer (DBC) tables of the Teradata Database.

If the username you specify when you invoke dul does not have the appropriate privileges, Teradata Database returns an error message, and the operation is cancelled.

The following table shows the tape drives that dultape supports.

 

On …

dultape supports …

Linux

4mm DAT tape drives.

Before you can perform a load operation, dul displays summary information, such as which processors are selected and error dates about the selection criteria that is set. After the load operation, dul displays event codes, if any exist, for the specified processors. For information on setting selection criteria, see “SELECT” on page 527.

As a general rule, type a DROP command before performing a load operation. This removes any existing tables that might have the same name as the name specified on the current LOAD command. For more information, see “DROP” on page 509.

Note: Dul uses the FastLoad utility to improve transfer speed. However, you can still transfer dump files on your host to a Teradata Database using BTEQ.

In most instances, a load operation is not performed at a customer site.

For detailed information on privileges, see Database Administration or consult your system administrator.

For more information about the FastLoad utility, see Teradata FastLoad Reference.

For information about BTEQ, see Basic Teradata Query Reference.

Example  

To check whether tables with the same name exist in the Crashdumps database, type the following:

HELP DATABASE crashdumps ; 

The following list of all the tables in the Crashdumps database appears:

*** Sending HELP DATABASE crashdumps to Teradata Database. 
*** Help information returned.  4 rows.
   CL100 
   CL100_C 
   CL100_L 
   CL100_M

Since no tables have the same name, you can type the LOAD command next. If tables with the same name already exist, verify that they are not needed and then use the DROP command to delete them from the Crashdumps database.

Example  

To transfer dump information from tape or disk files to tables onTeradata Database, type the following:

load crashdumptable1 file=TPFILE;

The following appears:

load crashdumptable1 file=TPFILE;
*** Opening tape file TPFILE
 
*** Creating table 'crashdumptable1'.
*** Table has been created.
*** Loading data into 'crashdumptable1' .
*** Logging on Amp sessions.
*** Growing Buffer to 4114
*** Starting Row 10000 at Wed Nov 16 15:54:46 2009
*** Starting Row 20000 at Wed Nov 16 15:54:46 2009
*** Starting Row 30000 at Wed Nov 16 15:54:46 2009
.
.
.
*** Starting Row 340000 at Wed Nov 16 16:07:10 2009
*** Starting Row 350000 at Wed Nov 16 16:07:10 2009
*** Starting Row 360000 at Wed Nov 16 16:07:10 2009
*** Starting Row 370000 at Wed Nov 16 16:07:10 2009
*** END LOADING phase...Please stand by...
Loading data into crashdumptable1 completes successfully.
*** Opening tape file TPFILE.log
*** End of Tape
*** Closing Tape file (and rewinding tape)
Dump Unload/Load to Tape - Enter your command: