Pergunta

I have 3 SQL Sever databases using RedGate SQL Source Control with SVN. When I create a custom migration script it is picked up by 1 of the 3 databases, but not by the other. Here is the command line that I'm using:

"C:\Program Files (x86)\Red Gate\SQL Compare 10\sqlcompare" /server1:dev03 /db1:Dev_CORE /version1:head /server2:testsql01 /db2:Test_Core /username2:foo /password2:bar /ScriptFile:"C:\MigrationScriptCore.sql" /Force /verbose

Foi útil?

Solução

Redgate uses the SQL Server extended properties to figure out what SVN version the DB is at, as well as where to find the scripts it needs to run to update the DB. The REALLY STUPID thing, is that these extended properties are CASE SENSITIVE. So the SVN path in my dev DB was:

SQLSourceControl Migration Scripts Location

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ISOCCompareLocation version="1" type="SvnLocation">
  <RepositoryUrl>http://svn.company.com/svn/**DIR1**/trunk/Database/Core/MigrationScripts/</RepositoryUrl>
</ISOCCompareLocation>

And in my Test DB it was:

SQLSourceControl Migration Scripts Location

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ISOCCompareLocation version="1" type="SvnLocation">
  <RepositoryUrl>http://svn.company.com/svn/**dir1**/trunk/Database/Core/MigrationScripts/</RepositoryUrl>
</ISOCCompareLocation>

The guys at redgate wen't able to fix my problem right away but after a lot of trial and error I was able to find it own my own. Hopefully this will save a few people a lot of time!

Cheers.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top