ReadVersionWithLock - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
Product Category
Teradata Tools and Utilities

ReadVersionWithLock

Purpose

ReadVersionWithLock reads in a specific version of an object from the repository into the instantiated CMetaObject. ReadVersionWithLock differs from ReadVersion in that it acquires all database locks necessary to both read and write the object. For a subsequent WriteVersion on this object, this will prevent a deadlock caused by lock upgrades. This function should always be used within an explicit transaction to retain the locks since locks are maintained until the transaction commits or rolls back.

Requirements

The internal object ID for the desired version must be set before calling ReadVersionWithLock.

Syntax

HRESULT ReadVersionWithLock();