Extended properties to track version control revision number

akashkumarakashkumar Posts: 2
edited November 21, 2013 7:08PM in SQL Compare Previous Versions
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!

Comments

  • 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?
Sign In or Register to comment.