Extended Properties in database not set anymore?

swinghouseswinghouse Posts: 120 Bronze 2
edited December 17, 2013 5:38AM in Deployment Manager
We've come to rely on the following extended property that Deployment Manager (DM) set for us:
DeploymentManager Deployed Package Version

This property plus "DeploymentManager Deployed Package Id" are documented features of Deployment Manager, per the section on Extended properties at http://documentation.red-gate.com/displ ... +databases

However, in recent DM releases neither of these extended properties seem to be updated.

Perhaps you have dropped the support for these extended properties? What could we use instead to identify the database version in our custom pre and post deployment scripts ?

/Mattias

Comments

  • Sorry for the late reply Mattias! You are correct about extended properties not being updated.

    Sorry about breaking you! Our documentation, is indeed wrong and one of my teammates, should be updating it soon. We now use a table valued function, DeploymentManagerLastDeployedVersion to get the last deployed package id and version. The function returns one row containing the PackageName and PackageVersion of the last package deployed.

    To get the PackageName you would execute this query:
    USE [databaseName]
    SELECT PackageName FROM RedGate.DeploymentManagerLastDeployment()
    

    To get the PackageVersion you would execute this:
    USE [databaseName]
    SELECT PackageVersion FROM RedGate.DeploymentManagerLastDeployment()
    
    Chirayu Shishodiya
    Software Engineer - Deployment Manager
    Red Gate
  • swinghouseswinghouse Posts: 120 Bronze 2
    Hi Chirayu,
    SELECT PackageVersion FROM RedGate.DeploymentManagerLastDeployment()
    

    ...works perfectly!

    And I notice that you've updated the documentation at http://documentation.red-gate.com/displ ... +databases

    Many thanks!

    /Mattias
  • swinghouseswinghouse Posts: 120 Bronze 2
    One correction to the above code example:

    The schema name is RedGateLocal, not RedGate, i.e.:
    SELECT PackageVersion FROM RedGateLocal.DeploymentManagerLastDeployment()
    

    /Mattias
Sign In or Register to comment.