Restarting Mload delete job.

General
Highlighted

Restarting Mload delete job.

.LOGTABLE sample_log;
.LOGON hostname/user,password;
DROP TABLE WT_sampletable;
DROP TABLE ET_sampletable;
DROP TABLE UV_sampletable;
.BEGIN IMPORT MLOAD TABLES sampletable
CHECKPOINT 1000000 SESSIONS 4;
.LAYOUT TRANSACTION;
.FIELD filed1 * CHAR(11) NULLIF field1 = '';
.DML LABEL DELETE;
DELETE FROM sampletable WHERE filed1 = :filed1 ;
.IMPORT INFILE "input.txt"
FORMAT TEXT
LAYOUT TRANSACTION
APPLY DELETE;
.END MLOAD;
.LOGOFF;


using the above script can I able to restart the mload job if it was stopped in the middle of application phase?
with CHECKPOINT 1000000
11 REPLIES
Enthusiast

Re: Restarting Mload delete job.

Absolutely, as long as you don't drop the work table or log table until the job has completed successfully. Just resubmit the job with exactly the same script.

By the way, the CHECKPOINT option refers only to the acquisition phase. Application phase checkpointing is always at the data block level on each AMP.

Re: Restarting Mload delete job.

Thanks Jim,
if i stopped in the middle,and don't drop work table or logtable and do
relase mload in apply still the job restarts?
Enthusiast

Re: Restarting Mload delete job.

Once you execute RELEASE MLOAD, you lose the ability to restart the original job from any checkpoint. At that point, the delete may have been partially applied, but your table is made accessible again to regular SQL or utility operations. If you want to rerun the MLOAD delete job, you must first manually delete the work tables, restart log, and error tables that were left by the failed run.

Re: Restarting Mload delete job.

Hi Jim
during MultiLoad Application Phase ,does the table available for regular SQL or utility operations ?
i tried to select data with criteria from the mloaded table and not able to get the results .
Enthusiast

Re: Restarting Mload delete job.

It is, but there is a write lock on the table at that point.
You need to use an access lock on your read operation.
Enthusiast

Re: Restarting Mload delete job.

It is available only for selects (with access lock). All other DML and utility operations are prohibited.

Re: Restarting Mload delete job.

Hi Jim

If the MultiLoad job is aborted in the middle,then we should not RELEASE LOCK and not to drop the WT,ML,ET tables.
At this point,if i restart the mload job,will it resume from the last checkpoint??


Thanks
Pradeep
Enthusiast

Re: Restarting Mload delete job.

Yes.
Enthusiast

Re: Restarting Mload delete job.

Hi Jim and other guys I am new to Teradata can u explain how to restart log ? Awaiting for ur response