15.10 - AbortCollect - Teradata Database

Teradata Database Application Programming Reference

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1090-151K

Aborts one or more pending or in-progress collection statements within a running instance of RunCollect.

REPLACE PROCEDURE TDSTATS.AbortCollect
  (IN CmdListID             BIGINT,
   IN CmdListName           VARCHAR(128) CHARACTER SET UNICODE,
   IN DatabaseName          VARCHAR(128) CHARACTER SET UNICODE,
   IN TableName             VARCHAR(128) CHARACTER SET UNICODE,
   IN RequestID             BIGINT,
   IN AbortInProgress       CHAR(1) CHARACTER SET LATIN,
   OUT NumPendingAborted    INTEGER,
   OUT NumInProgressAborted INTEGER)
           .
           .
           .
;
 

Parameter

Description

CmdListID

Commands list ID executed by an in-progress RunCollect.

For more information about this input parameter, see “Usage Notes.”

CmdListName

Commands list name executed by an in-progress RunCollect.

For more information about this input parameter, see “Usage Notes.”

DatabaseName

Name of the database. DatabaseName identifies the database whose collections within the commands list you specify should be aborted.

TableName

Name of the table. TableName identifies the table whose collections within the commands list you specify should be aborted.

RequestID

Individual collection ID. RequestId identifies the individual collection ID within the commands list you specify that should be aborted.

AbortInProgress

Possible values:

  • Y. If you specify Y, AbortCollect aborts the qualifying collections even if they are already in progress.
  • N. If you specify N, AbortCollect allows in-progress collections to finish. This is the default value.
  • Identifying a Command List

    Note: You can specify both CmdListID and CmdListName as long as they identify the same commands list.

     

    To identify ...

    You must ...

    the commands list being executed

    specify a value that is not null for either CmdListID or CmdListName.

    a commands list by CmdListName

    assign it during a prior call to PrepCollect.

    Aborting Collection Statements

    Notice:

    You must specify a DatabaseName, TableName or RequestID input parameter or all collections in the specified command list will be aborted. Those collection statements that do not qualify based on the input parameters you specified are unaffected and will be executed by RunCollect. For more information, see “RunCollect” on page 550.

     

    To abort ...

    You must specify a value for ...

    all collection statements for a particular database

    DatabaseName.

    all collection statements for a particular table

    both DatabaseName and TableName.

    a single collection

    RequestID.

    Note: When specifying a RequestID, it is not necessary to specify DatabaseName or TableName since it is unique across all databases.

     

    Parameter

    Description

    NumPendingAborted

    Number of pending collection statements that were aborted.

    NumInProgressAborted

    Number of in-progress collection statements that were aborted.

    The following example shows how to abort all collections within commands list 1 that operate on the Personnel database.

    CALL TDSTATS.AbortCollect (1,'MyCmdsList', 'PERSONNEL', NULL, NULL, 'Y', NumPendingAborted,NumInProgressAborted); 
     
    *** Total elapsed time was 1 second.
     
       NumPendingAborted   NumInProgressAborted    
      ------------------   --------------------
                       2                      1