All Forums General
chandra7g 3 posts Joined 04/11
02 Jun 2011
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

Jim Chapman 449 posts Joined 09/04
02 Jun 2011

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.

chandra7g 3 posts Joined 04/11
06 Jun 2011

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?

Jim Chapman 449 posts Joined 09/04
06 Jun 2011

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.

chandra7g 3 posts Joined 04/11
07 Jun 2011

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 .

Jimm 298 posts Joined 09/07
14 Jun 2011

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.

Jim Chapman 449 posts Joined 09/04
15 Jun 2011

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

PradeepKumarU 4 posts Joined 11/10
18 Jun 2011

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

Jim Chapman 449 posts Joined 09/04
20 Jun 2011

Yes.

MSwetha 6 posts Joined 06/11
25 Jun 2011

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

Jim Chapman 449 posts Joined 09/04
27 Jun 2011

May I just mention that all the questions that have been posted in this thead could easily have been answered by reading a bit of the MultiLoad user manual?

redravi207 2 posts Joined 07/11
20 Jul 2011

Jim,

Could you please explain me the Mload restart in Acquisition and Application Phase in details. like how it works in both the phases and how the Checkpoint helps.

You must sign in to leave a comment.