Extended Properties in database not set anymore?

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

Extended Properties in database not set anymore?

Postby swinghouse » Mon Nov 18, 2013 6:05 pm

We've come to rely on the following extended property that Deployment Manager (DM) set for us:

Code: Select all
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
swinghouse
 
Posts: 99
Joined: Mon Sep 12, 2011 10:51 am

Postby chirayu » Thu Nov 21, 2013 3:41 pm

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:

Code: Select all
USE [databaseName]
SELECT PackageName FROM RedGate.DeploymentManagerLastDeployment()


To get the PackageVersion you would execute this:
Code: Select all
USE [databaseName]
SELECT PackageVersion FROM RedGate.DeploymentManagerLastDeployment()
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
chirayu
 
Posts: 65
Joined: Mon Sep 17, 2012 5:48 pm

Postby swinghouse » Thu Nov 28, 2013 3:28 pm

Hi Chirayu,

Code: Select all
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
swinghouse
 
Posts: 99
Joined: Mon Sep 12, 2011 10:51 am

Postby swinghouse » Tue Dec 17, 2013 11:38 am

One correction to the above code example:

The schema name is RedGateLocal, not RedGate, i.e.:

Code: Select all
SELECT PackageVersion FROM RedGateLocal.DeploymentManagerLastDeployment()


/Mattias
swinghouse
 
Posts: 99
Joined: Mon Sep 12, 2011 10:51 am


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests