Compare Database revisions without SQL Sourcecontrol

PsyonityPsyonity Posts: 4
edited August 11, 2014 9:49AM in SQL Compare Previous Versions
Hello,

I am working on automatic making of sql scripts with TFS Build workflow for our installation packages. I can get the comparisation of 2 different databases working, but more preferably I want to compare one database that is under SQL Source control from a specific revision to the HEAD revision. I currently got the following command line:
SQLCompare.exe /sourcecontrol1 /db2:Application_2030 /sf:"D:\Upgrade - 02 - Model.sql" /s2:databaseServer\Development /f /r1:5000 /r2:HEAD

I use the SQL Automation Pack to get the SQLCompare CLI.

But when I try to run it, it returns:
Using source controlled databases requires SQL Source Control to be installed.

That's correct, because I don't have SQL Source Control installed on the Build Agent.

I have complete access to the TFS Server where the database is source-controlled from the executing agent and also got full access to the database server from my build agent.

So my question is, is it possible to create a SQL Script with the SQLCompare tool between two revisions without Sql Source Control installed? Can it also get the revisions from TFS?

For me it sounds strange to install SSMS and SQL Source Control on my build agent while I never open the Program itself on the machine nor do check-ins or database changes.

Greetings,
Psyonity

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    SQL Compare uses shared components from SQL Source Control, so it needs to be installed. I do not believe that you need it to be licensed on the build server though, just installed.

    You could also use the components that come with your version control system to get the files from source control into a scripts folder, but that solution doesn't appear to work if you use the "migrations" feature, because SQL Compare does not let you specify a scripts folder on disk together with the migrations folder files on disk.

    There are two solutions, but I think the best one is to install SQL Source Control. I tried SQL Compare with a repository data source and it works with SQL Source Control having an expired trial.
Sign In or Register to comment.