15.00 - Teradata TPump Monitor Macros - Parallel Data Pump

Teradata Parallel Data Pump Reference

prodname
Parallel Data Pump
vrm_release
15.00
category
Programming Reference
featnum
B035-3021-034K

Teradata TPump Monitor Macros

Teradata TPump Monitor provides a set of macros that can be used to update the Monitor Interface table and to monitor and control individual Teradata TPump import jobs. The following Teradata TPump Monitor macros are provided:

Macro TPumpMacro. TPumpUpdateSelect

This macro is provided for database administrators to use to manipulate and monitor individual Teradata TPump jobs:

CREATE MACRO SysAdmin.TPumpUpdateSelect
(
    LogDB          VARCHAR(32),
    LogTable       VARCHAR(32),
    UserName       VARCHAR(32),
    Import         INTEGER,
    RequestChange  CHAR(1),
    StmtsUnLimited CHAR(1),
    StmtsDesired   INTEGER,
    PeriodsDesired INTEGER
) 
AS
(
    LOCK ROW WRITE    /* OR LOCKING Sysadmin.TPumpStatus for WRITE */
    SELECT 
        RecordsOut     ,
        RecordsSkipped ,
        RecordsRejcted ,
        RecordsRead    ,
        RecordsErrored 
    FROM 
        SysAdmin.TPumpStatusTbl
    WHERE
        UserName = :UserName  AND
        LogDB    = :LogDB     AND 
        Import   = :Import    AND 
        LogTable = :LogTable      
 
    ; UPDATE SysAdmin.TPumpStatusTbl
    SET
        RequestChange  = :RequestChange,
        StmtsUnLimited = :StmtsUnLimited,
        StmtsDesired   = :StmtsDesired,    
        PeriodsDesired = :PeriodsDesired 
    WHERE
        UserName = :UserName  AND
        LogDB    = :LogDB     AND 
        LogTable = :LogTable  AND  
        Import   = :Import       ;
);mport   = :Import       ;
);

Macro TPumpMacro. UserUpdateSelect

The macro UserUpdateSelect is provided to monitor/update Teradata TPump jobs.

CREATE MACRO TPumpMacro.UserUpdateSelect
(
    LogDB          VARCHAR(32),
    LogTable       VARCHAR(32),
    Import         INTEGER,
    RequestChange  CHAR(1),
    StmtsUnLimited CHAR(1),
    StmtsDesired   INTEGER,
    PeriodsDesired INTEGER
) 
AS
(
    LOCK ROW  WRITE /* OR LOCKING Sysadmin.TPumpStatus FOR WRITE */ SELECT 
        RecordsOut     ,
        RecordsSkipped ,
        RecordsRejcted ,
        RecordsRead    ,
        RecordsErrored 
    FROM 
        SysAdmin.TPumpStatusTbl
    WHERE
        UserName = USER       AND
        LogDB    = :LogDB     AND 
        Import   = :Import    AND 
        LogTable = :LogTable      
 
    ; UPDATE SysAdmin.TPumpStatusTbl
    SET
        RequestChange  = :RequestChange,
        StmtsUnLimited = :StmtsUnLimited,
        StmtsDesired   = :StmtsDesired,
        PeriodsDesired = :PeriodsDesired   
    WHERE
        UserName = USER       AND
        LogDB    = :LogDB     AND 
        LogTable = :LogTable  AND  
        Import   = :Import       ;
);