RELEASE MLOAD in Teradata


Syntax:
RELEASE MLOAD databasename.tablename

If our job fails at our application phase, we have to release the lock on the mloaded table.
RELEASE MLOAD databasename.tablename IN APPLY

RELEASE MLOAD --
This statement obtains the Exclusive lock over target tables and frees the target table from any kind of locks.

Note:
Always remember once you release mload you have to drop all worktables, logtables and error tables and start from the beginning.

Error Codes
Error code 2571Error Code 2652
Mload can't be released. This error occurs when table does not exist or user does not have release mload access or table is not in application phase (using IN APPLY) or Mload is still active on target table.When user try to access the table that is being mloaded. In this scenario use locking with access modifier. (Operation not allowed - Table is being mloaded)