Error in MLOAD

Tools
Enthusiast

Error in MLOAD

Hello All,

This the first time i am running MLOAD Script. Please Help me find the error.

Script:

.LOGTABLE DB.logs2;

.LOGON Jugal/jbhatt,jugal;

CREATE MULTISET TABLE DB.Mload_Input ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      Empid INTEGER,

      EmpName VARCHAR(5) CHARACTER SET LATIN CASESPECIFIC)

PRIMARY INDEX ( Empid );

.BEGIN IMPORT MLOAD TABLES DB.Mload_Input;

.LAYOUT S1;

.FIELD EmpId * VARCHAR(10);

.FIELD EmpName * VARCHAR(5);

.DML LABEL L1;

INSERT into DB.Mload_Input values(:EmpId,:EmpName);

.IMPORT INFILE /home/jbhatt/data.txt FORMAT VARTEXT ','

LAYOUT S1

APPLY L1;

.END MLOAD;

.LOGOFF;

Logs:

$ mload<MLOAD.txt

     ========================================================================

     =                                                                      =

     =          MultiLoad Utility    Release MLOD.14.00.00.08               =

     =          Platform LINUX                                              =

     =                                                                      =

     ========================================================================

     =                                                                      =

     =     Copyright 1990-2011 Teradata Corporation. ALL RIGHTS RESERVED.   =

     =                                                                      =

     ========================================================================

**** 09:10:51 UTY2411 Processing start date: FRI MAR 21, 2014

     ========================================================================

     =                                                                      =

     =          Logon/Connection                                            =

     =                                                                      =

     ========================================================================

0001 .LOGTABLE DB.logs2;

0002 .LOGON Jugal/jbhatt,;

**** 09:10:52 UTY8400 Teradata Database Release: 14.00.05.02

**** 09:10:52 UTY8400 Teradata Database Version: 14.00.05.03

**** 09:10:52 UTY8400 Default character set: ASCII

**** 09:10:52 UTY8400 Current RDBMS has interval support

**** 09:10:52 UTY8400 Current RDBMS has UDT support

**** 09:10:52 UTY8400 Current RDBMS has Large Decimal support

**** 09:10:52 UTY8400 Current RDBMS has TASM support

**** 09:10:52 UTY8400 Maximum supported buffer size: 1M

**** 09:10:52 UTY8400 Data Encryption supported by RDBMS server

**** 09:10:52 UTY6211 A successful connect was made to the RDBMS.

**** 09:10:52 UTY6210 Logtable 'DB.logs2' indicates that a restart is

     in progress.

     ========================================================================

     =                                                                      =

     =          Processing Control Statements                               =

     =                                                                      =

     ========================================================================

0003 .BEGIN IMPORT MLOAD TABLES DB.Mload_Input;

     ========================================================================

     =                                                                      =

     =          Processing MultiLoad Statements                             =

     =                                                                      =

     ========================================================================

0004 .LAYOUT S1;

0005 .FIELD EmpId * VARCHAR(10);

0006 .FIELD EmpName * VARCHAR(5);

0007 .DML LABEL L1;

0008 INSERT into DB.Mload_Input values(:EmpId,:EmpName);

0009 .IMPORT INFILE /home/jbhatt/data.txt FORMAT VARTEXT ','

     LAYOUT S1

     APPLY L1;

0010 .END MLOAD;

     ========================================================================

     =                                                                      =

     =          MultiLoad Initial Phase                                     =

     =                                                                      =

     ========================================================================

**** 09:10:52 UTY0829 Options in effect for this MultiLoad import task:

     .       Sessions:    One session per available amp.

     .       Checkpoint:  15 minute(s).

     .       Tenacity:    4 hour limit to successfully connect load sessions.

     .       Errlimit:    No limit in effect.

     .       AmpCheck:    In effect for apply phase transitions.

**** 09:10:52 UTY0817 MultiLoad submitting the following request:

     Select NULL from DB.logs2 where (LogType = 125) and (Seq = 1)

     and (MloadSeq = 0);

**** 09:10:52 UTY0817 MultiLoad submitting the following request:

     Select NULL from DB.logs2 where (LogType = 120) and (Seq = 1);

**** 09:10:52 UTY0817 MultiLoad submitting the following request:

     SET QUERY_BAND='UTILITYNAME=MULTLOAD;' UPDATE FOR SESSION;

**** 09:10:52 UTY0817 MultiLoad submitting the following request:

     CHECK WORKLOAD FOR BEGIN MLOAD DB.Mload_Input;

**** 09:10:52 UTY0817 MultiLoad submitting the following request:

     CHECK WORKLOAD END;

**** 09:10:52 UTY0844 Session count 16 returned by the DBS overrides

     user-requested session count.

**** 09:10:56 UTY0815 MLOAD session(s) connected: 16.

**** 09:10:56 UTY0817 MultiLoad submitting the following request:

     BEGIN MLOAD DB.Mload_Input WITH INTERVAL;

**** 09:10:56 UTY0817 MultiLoad submitting the following request:

     Select NULL from DB.logs2 where (LogType = 130) and (Seq = 1)

     and (MloadSeq = 20);

**** 09:10:56 UTY0832 This MultiLoad import task cannot proceed: an unexpected

     MultiLoad phase, data acquisition, was reported by the RDBMS.


     ========================================================================

     =                                                                      =

     =          Logoff/Disconnect                                           =

     =                                                                      =

     ========================================================================

**** 09:10:58 UTY6212 A successful disconnect was made from the RDBMS.

**** 09:10:58 UTY2410 Total processor time used = '1.84 Seconds'

     .       Start : 09:10:51 - FRI MAR 21, 2014

     .       End   : 09:10:58 - FRI MAR 21, 2014

     .       Highest return code encountered = '12'.

$

Tags (1)
1 REPLY
Enthusiast

Re: Error in MLOAD

It seems mload failed from no point of return. The log shows it is a rerun.

Better don't include create table statement in mload script.

To fix and run from 0th record onwards

you can try below steps  -

1) run from sql assistant -   "release mload DB.Mload_Input;"

2) run from sql assistant -  "release mload DB.Mload_Input in apply;"

3) Drop all the supporting tables (log, error1, error2 and work)

4) remove create table statment from scirpt. execute create table statment from either bteq or sql assistant (or can automate with shell scirpt to run as bteq if requried)

5) run the mload script

--Sri