Extended properties to track version control revision number

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Extended properties to track version control revision number

Postby akashkumar » Thu Aug 29, 2013 7:05 pm

We have automated builds that get triggered from Jenkins on every database change check-in.

Jenkins calls SQL Compare command line which generates the deployment change script and then deploys all the changes to a SQL build instance. In the automated builds, we do not see the extended properties for version control revision number being set.

When we use SQL Compare UI and generate the script manually, it generates the script to add/update version control revision number which looks something like:

DECLARE @RG_SC_VERSION BIGINT

SET @RG_SC_VERSION = 1670

IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL))

EXEC sp_dropextendedproperty N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL

EXEC sp_addextendedproperty N'SQLSourceControl Database Revision', @RG_SC_VERSION, NULL, NULL, NULL, NULL, NULL, NULL

GO

Is there a command line parameter that needs to be passed in to SQL Compare command line to generate the code to update version control revision number extended property? I looked at the documentation for SQL Compare command line and did not find anything there. Am I missing something?

Any help would be appreciated. Thanks!
akashkumar
 
Posts: 1
Joined: Thu Aug 29, 2013 6:56 pm

Postby todtrexler » Fri Nov 22, 2013 1:08 am

I am in this same situation. Does anybody have an answer to this question? Is there a way to force SQL Compare to include the source control revision number update in the script generated from the command line?
todtrexler
 
Posts: 3
Joined: Fri Nov 22, 2013 1:05 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests