The UNLOAD command moves dump data from a system‑generated table on the Teradata Database to a file on a host or directly to removable media.
Syntax element …
the name of the database in which the table resides and the separator between the database name and table name. Use a period (.) to separate the database name from the table name.
The default database is Crashdumps.
the name of the table that contains the dump data.
the path of the file into which the dump data is unloaded.
filepath is specified as directory/filename.
Note: Dul saves files in a compressed, gzip format, and appends a file extension of .gz to the file name automatically, if the specified name does not include .gz.
an option for unloading dumps from a foreign Teradata Database.
Before you can perform a dump/unload operation, your username specified in the logon ID must have the following:
The UNLOAD command selects dump data according to the selection criteria specified in a previous SELECT command. If you do not specify a SELECT command, the entire dump table is searched. You should always type a SELECT command before an UNLOAD command.
Before you perform an unload 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.
In moving dump data, the _C, _L, and _M files are always included. If the _C or _L table is not found, it is generated.
If you load the unloaded data back into some other Teradata Database system, the table created by the LOAD command is called dump data in a foreign Teradata Database and will be one of the following tables:
When you enter the UNLOAD command without the F option, dul or dultape unloads the data specified in tname from the DBC.SW_EVENT_LOG table.
The F option is required to unload the dump data from the foreign Teradata Database. Dul or dultape will unload data from the table specified in the UNLOAD command and the corresponding tname_C, tname_L, and tname_M tables.
Dul uses the FastExport utility to improve transfer speed for unloading dumps. However, you can still unload dumps using BTEQ.
To use the UNLOAD command, you must have CREATE, DROP, and SELECT privileges on the following:
For more information about the FastExport utility, see Teradata FastExport Reference.
For information about BTEQ, see Basic Teradata Query Reference.
For additional information on access privileges, see Database Administration.
The following example assumes that a system failure occurred on 6/6/00 at 2:36 p.m. To confirm that a dump table has been created, you would examine the Crashdumps databases using the following command:
HELP DATABASE Crashdumps ;
Since dump tables are named according to the date and time that the system failure occurred, you should be able to find the correct dump table. In this example, the table named crash_200000606_143623_01 contains the dump information.
To display the contents of the dump table, use the SEE command:
SEE crash_20000606_143623_01 ;
The SEE command displays summary information about all of the processors and error codes that were captured in the dump. Some of the processors might not contain any information. Generally, only processors that contain errors are needed for an unload operation.
By typing a SELECT command next, you can choose the processors for the unload operation. To select only the processors that contain error codes, type the following command:
SELECT ERROR ;
Dul responds with this message:
*** Processor selection set to list of processors.
Now you are ready to unload the dump data from table crash_20000606_143623_01 on the Crashdumps database onto your host using the following command:
UNLOAD crash_20000606_143623_01 file=filepath;
Dul responds with these messages:
*** Unloading data from crash_20000606_143623_01 for processor(s) 1‑6.
*** Query completed. 263 rows found. 3 columns returned.
*** Processor 1‑6
*** Number of rows = 263
*** Unloading Procedure Information
*** Query completed. 200 rows found. 4 columns returned.
*** Number of rows = 200
*** Unloading Errorlog Information
*** Query completed. 413 rows found. 6 columns returned.
*** Number of rows = 413
*** Unloading Memo Information
*** Query completed. 123 rows found. 5 columns returned.
*** Number of rows = 123
Event = 2490:
On 6/6/96 at 09:26:27 in processor 1‑6, partition 14,
Severity = UserError
Category = User
HostEvent = None
*** Number of rows = 263
Dul creates two files when accessing Teradata Database on the tape. The tape can then be sent to the Teradata Support Center for analysis.
Note: If the dump data is copied to the local hard disk on your host, you must copy the data to a removable medium for shipment.