Transactions - 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


Ideally, the metaxml program would perform all actions in an XML file as one transaction. With one transaction per XML file, either the entire content of the XML file would be applied to the MDS repository or every action will be rolled back. Depending on the content and size of the XML file, using one transaction can cause the following problems:

  • MDS objects can potentially be locked for a long period of time preventing other applications from accessing the MDS repository.
  • Because the metaxml program is performing multiple MDS API calls, metaxml or other MDS applications can potentially deadlock waiting for an object locked by metaxml.
  • By default, the metaxml program uses MDS implicit transactions, which commits changes after each call to a MDS API. In the MDS DTD, the following element tags have a transaction attribute: METAUSERS, METAGROUPS, SECURITYPROFILES, MODELDESC, CLASSDESC, RELATIONSHIPDESC, PROPERTYDESC, DERIVEDCLASSDESC, RELATION and OBJECT. If the element tag has a transaction attribute value to “yes”, then metaxml will begin a MDS explicit transaction and end the transaction when the element ends. For example:

    	<NAME>Model 1</NAME>
    	<CLASS>Class 1
    		<NAME>Class 1</NAME>
    		<OBJECT transaction=”yes”>													fl Start a transaction (Tx1)
    				<OBJECT>											fl Under transaction (Tx1)
    						<OBJECT transaction=”yes”>									fl Start a transaction (Tx2).  However, 
    																nested transaction is not allowed.  	
    																Under transaction Tx1.
    		</OBJECT>													fl End transaction (Tx1)
    		<OBJECT>										fl by default, implicit transaction