Red Gate forums :: View topic - Extended Properties in database not set anymore?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Extended Properties in database not set anymore?

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
swinghouse



Joined: 12 Sep 2011
Posts: 95

PostPosted: Mon Nov 18, 2013 6:05 pm    Post subject: Extended Properties in database not set anymore? Reply with quote

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

Code:
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/display/DM2/Packaging+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
Back to top
View user's profile Send private message
chirayu



Joined: 17 Sep 2012
Posts: 51

PostPosted: Thu Nov 21, 2013 3:41 pm    Post subject: Reply with quote

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:
USE [databaseName]
SELECT PackageName FROM RedGate.DeploymentManagerLastDeployment()


To get the PackageVersion you would execute this:
Code:

USE [databaseName]
SELECT PackageVersion FROM RedGate.DeploymentManagerLastDeployment()

_________________
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
swinghouse



Joined: 12 Sep 2011
Posts: 95

PostPosted: Thu Nov 28, 2013 3:28 pm    Post subject: Reply with quote

Hi Chirayu,

Code:
SELECT PackageVersion FROM RedGate.DeploymentManagerLastDeployment()


...works perfectly!

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

Many thanks!

/Mattias
Back to top
View user's profile Send private message
swinghouse



Joined: 12 Sep 2011
Posts: 95

PostPosted: Tue Dec 17, 2013 11:38 am    Post subject: Reply with quote

One correction to the above code example:

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

Code:

SELECT PackageVersion FROM RedGateLocal.DeploymentManagerLastDeployment()


/Mattias
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group