We have a new community! Please visit support.timextender.com
Follow

SQL script to explore version history at object level, to compare two projects or versions

This technique and SQL script were posted by Raf Lemmens in TimeXtender community forum for "Product Feedback and Ideas". The original script was based on TimeXtender 20.5.8.64. This article includes an updated script for TimeXtender 20.10.16.64 (by deleting a few fields in the SELECT statement).

This SQL script explores the version history at object level - showing all deletes, adds and restores of TimeXtender objects as well as who made the change, when did it occur and the version notes.  It covers the most used objects in the staging, data warehouse and semantic layer steps.  This helps review changes in TimeXtender objects since a given date, or review differences between two saved versions of a project.

Load the script in SQL Server Management Studio (SSMS), point to a TimeXtender Repository SQL database and edit the following parameters before running the queries.

/* change params if needed. */

DECLARE @project VARCHAR(100) = 'EDPB 2.0' -- TimeXtender project you want to check

DECLARE @UseVersionNumbers BIT = 0 -- Choose whether you check versions from a given version number or from a given date. Set to true if you want to start from a version.

DECLARE @ValidFrom BIGINT = 1 -- If @userVersionNumber = 1 this param will be used. All versions starting from this version will be taken into account.

DECLARE @UpdateFrom datetime = '20210401' -- If @userVersionNumber = 0 this param will be used. All versions created on or after this date will be taken into account.

An example output is shown below:

mceclip1.png

Original Post Reference:

Listing changes in TX Objects since a given date or version number.
Based on TX 20.5.8.64.
At the end of each record you can find the query to list the history of the object up until the change. 

Original SQL Script URL

Updated Script for TimeXtender 20.10.16.64

Was this article helpful?
1 out of 1 found this helpful

1 Comments

  • 0
    Avatar
    Raf Lemmens

    Just wanted to add an idea: if you start/copy code from the procedure "openproject" in the TX projectrepository you have all the sql statements to load all TX objects into temp tables for a given project and version range. (range for these queries work from version 1 up until a given version number)

Please sign in to leave a comment.