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

SetModelVersioningFlag

Purpose

SetModelVersioningFlag allows an application to dynamically enable or disable data versioning for a metamodel.

Description

If bVersioningAllowed is false, versioning will be disabled for the metamodel.

If bVersioningAllowed is true and the repository allows versioning, then versioning will be enabled for the metamodel, else versioning will be left disabled for the metamodel.

bDeleteVersions indicates if existing historical versions for objects in the AIM's classes should be deleted or retained.

The metamodel is specified with the same values as needed for ReadObject.

When versioning is enabled:

  • All existing classes in the metamodel are modified to support versioning.
  • Any new classes added to the metamodel will also support versioning.
  • No changes are made to the existing objects in any of the model's classes, however whenever any object in the classes is modified, a new version of the object will be automatically created, as if the class had always supported data versioning
  • When versioning is disabled:

  • All existing classes in the metamodel are modified to not support versioning.
  • Any new classes added to the metamodel will be created without support of versioning
  • If bDeleteVersions is true, all objects in the metamodel's classes will be modified so that all non-published versions are deleted and the remaining versions will be renumbered to version one. This can be a very lengthy operation.
  • If bDeleteVersions is false, all existing versions of data objects in the metamodel's classes will be retained.
  • Requirements

    The caller must have write permission for the metamodel and for all classes in the metamodel.

    The object name or the object ID (internal or globally unique) must be set

    Syntax

    HRESULT SetModelVersioningFlag(
    	const bool bVersioningAllowed,
    	const bool bDeleteVersions = false);
     

    Argument

    In/Out

    Description

    bVersioningAllowed

    in

    Value of versioning support for the metamodel.

    bDeleteVersions

    in

    Indicates if existing data objects in the metamodel's classes should have their non-published versions deleted. True = delete all non-published versions; false = retain all non-published versions.