The LOAD command moves dump data from files created by an unload operation into tables on a Teradata Database.
- Name of the database in which the table resides. Use a period (.) to separate the database name from the table name.
- 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.
- 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.
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.
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 Basic Teradata Query Reference.
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: