Activity overview
Latest activity by matt_hosking
Potential data loss for table rebuild with transactions off
SQL Compare decided to rebuild a table in our deployment script as it couldn't perform alters and since we don't have transactions enabled for the deployment script, we ended up with something like...
I read that part (which is how I deduced the options from default I was missing), but as I mentioned, these missing options shouldn't have caused the omission of sp_refreshview or constraints handling. Is there any reason why the default option would be required in order to get this to work? Could it be specific to comparing source control to scripts and / or with migration scripts enabled? / comments
I read that part (which is how I deduced the options from default I was missing), but as I mentioned, these missing options shouldn't have caused the omission of sp_refreshview or constraints handl...
Migration scripts not included after branching
After branching our development trunk (in Subversion), the migration scripts seem to be no longer included. I first reasoned that this was due to the fact that the '.migrationScript' files refer to...
Some more information - I believe that just as the UI for SSC doesn't show versions prior to the branch for migration scripts, that they similarly aren't considered when looking for migration scripts to apply. It seems that as far as SQL Compare (v10.1) is concerned, these revisions don't exist in the branch. Could this be the case? / comments
Some more information - I believe that just as the UI for SSC doesn't show versions prior to the branch for migration scripts, that they similarly aren't considered when looking for migration scrip...
Solved it - it appears that without the 'Default' option included, the 'sp_refreshview' calls are never included (at least for me on 10.1). So my new set of options is:
Default,ie,iq,nt,iu,ip,nc
and everything is working. This should have been equivalent to:
if,ifg,iw,ie,iq,nt,iu,iup,ip,nc,incd
shouldn't it? This set was only missing 'DecryptPost2KEncryptedObjects', 'IgnoreWithElementOrder' and 'IgnoreDatabaseAndServerName' but none of those should have affected the dependencies I would think. Is there something undocumented in the 'Default' option? / comments
Solved it - it appears that without the 'Default' option included, the 'sp_refreshview' calls are never included (at least for me on 10.1). So my new set of options is:
Default,ie,iq,nt,iu,ip,nc
an...
Hi Brian,
Thanks for the reply, but as I mentioned, I've already tried the 'incd' option, which appears to do the reverse - updates only objects that the current object is dependent on (e.g. function depends on a view), rather than the other way - update the objects that depend on the current object (e.g. views that depend on a table), which I want.
Could this have something to do with migration scripts? Have you tested using the exact command line parameter set? I've found that they do seem to interact somewhat in expected ways when used differently from the norm. / comments
Hi Brian,
Thanks for the reply, but as I mentioned, I've already tried the 'incd' option, which appears to do the reverse - updates only objects that the current object is dependent on (e.g. functi...
Big Problems After Branching
Just noticed that the '.migrationScript' files have the source control location for the scripts they are used for (under the 'ScriptFolderLocation' elements) - turns out this is what was breaking m...
Source Controlled Source Control Location?!
Moved to SQL Source Control 3 forum (not sure why this isn't the default forum for SQL Source Control 3).
Here it is:
"C:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /sourcecontrol1 /revision1:Latest /scriptsfolderxml:"%teamcity.build.checkoutDir%\Build\compare.xml" /migrationfolderxml:"%teamcity.build.checkoutDir%\Build\migration.xml"
/scripts2:"%teamcity.build.checkoutDir%\sourcedb" /options:if,ifg,iw,ie,iq,nt,iu,iup,ip,nc /scriptfile:"%teamcity.build.checkoutDir%\Build\Scripts\%Version%b.sql"
Where %Version% = 4.0.0 (at the moment), check out dir is agent-side default check out dir and the sourcedb folder is the source-controlled (SQL Source Control) schema folder for the version to compare against (couldn't see how to supply 'scriptsfolderxml' for the second source control).
Compare.xml
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<!--
SQL Compare 10
SQL Compare
Version:10.1.0.102-->
<ISOCCompareLocation version="1" type="SvnLocation">
<RepositoryUrl>http://[removed]/trunk/database/Schema/</RepositoryUrl>
</ISOCCompareLocation>
Migration.xml
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<!--
SQL Compare 10
SQL Compare
Version:10.1.0.102-->
<ISOCCompareLocation version="1" type="SvnLocation">
<RepositoryUrl>http://[removed]/trunk/database/Migration Scripts/</RepositoryUrl>
</ISOCCompareLocation> / comments
Here it is:
"C:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /sourcecontrol1 /revision1:Latest /scriptsfolderxml:"%teamcity.build.checkoutDir%\Build\compare.xml" /migrationfolderxml:...
Comparison of source control & database not refreshing views
I've just recently switched from script vs database comparison to source control vs database comparison (in order to support migration scripts) and noticed that views are no longer being refreshed ...