LOAD - Advanced SQL Engine - Teradata Database

Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-15
dita:mapPath
boh1556732696163.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1102
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

The LOAD command moves dump data from files created by an unload operation into tables on a Teradata Database.

Syntax

LOAD [ database. ] table [ FALLBACK ] FILE = filepath ;
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.
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 tables in the DBC database.

If you do not have the appropriate privileges, Teradata Database returns an error message, and the operation is canceled.

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.

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.

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 Teradata Vantage™ - Database Administration, B035-1093 or consult your system administrator.

For more information about the FastLoad utility, see Teradata® FastLoad Reference, B035-2411.

For information about BTEQ, see Basic Teradata® Query Reference, B035-2414.

Example: Checking for duplicate table names in the Crashdumps database

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: Loading dump information to tables

To transfer dump information to tables on Teradata Database, type the following:

load crashdumptable1 file=TPFILE;

The following appears:

load CRASH_20170219_004121_02 file=sanity;

*** Creating table 'CRASH_20170219_004121_02'.
*** Table has been created.
*** Loading data into 'CRASH_20170219_004121_02'
*** Logging on Amp sessions.
*** Growing Buffer to 789
*** Growing Buffer to 977
*** Growing Buffer to 2198
*** Growing Buffer to 2427
*** Growing Buffer to 2481
*** Growing Buffer to 2662
*** Growing Buffer to 2758
*** Growing Buffer to 4118
*** Starting Row 10000 at Mon Feb 20 19:25:49 2017

*** Starting Row 20000 at Mon Feb 20 19:26:01 2017
.
.
.

*** Starting Row 70000 at Mon Feb 20 19:27:06 2017

*** END LOADING phase...Please stand by...
Loading data into CRASH_20170219_004121_02 completes successfully.

Dump Unload/Load - Enter your command: