Commit - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Teradata Meta Data Services
Release Number
English (United States)
Last Update
Product Category
Teradata Tools and Utilities



Depending upon the status of transactions, the CMetaRepository class Commit function decrements the transaction nesting level counter, closes an explicit transaction, commits the transaction to the database or rolls the transaction back and.


If an explicit transaction is currently open, the CMetaRepository class Commit function decrements the transaction nesting level counter. If the new counter value is zero, the function closes the explicit transaction.

If there were no errors anywhere in the transaction, the function commits the transaction to the database and returns a success code. Otherwise, the function rolls the entire explicit transaction back and returns an error code.

If the user calls the Commit function when there is no explicit transaction open, Commit returns an error code.

Note: The nested transactions within an explicit transaction are not separate transactions, but are part of a single flat transaction, so the Commit function does not commit any work to the database until the nesting counter reaches zero, indicating that the entire outer flat transaction is closed


HRESULT  Commit(SERIAL_t *txSerial=NULL);






Returned transaction number.

The transaction number is returned only in transactions which contain multiple DLL statements where the Commit of the transaction with the first DDL statement succeeded but a subsequent DDL statement failed.

The transaction number is used to retry the DDL, after the database problem is fixed.

See “Behavior of Transactions Containing DDL Statements” on page 92 for more information.