SQL Compare 10.7 Cmd Line Not Including Migration Scripts

CraigEddyCraigEddy Posts: 36 Bronze 3
edited August 22, 2014 12:43PM in SQL Compare Previous Versions
On machines where we still have version 10.4 installed, our migration scripts are being included in the generated deployment scripts. However, on machines that have been updated to version 10.7, these migrations scripts are not being used.

The same command line is being invoked in both cases, and both cases are using the same source and target databases (a SQL Server database and a TFS source).

On the 10.7 machines, we see the "gathering migration scripts" output as the compare executes, but the scripts to do not show up in the deployment script.

Our migration scripts are "v1 migration scripts".

The command line is part of a Powershell script:
sql_compare /Database1:FACTSInfo /Version1:Head /Database2:FACTSInfo /Server1:$sqlServer /Server2:$sqlServer /filter:$filterfile /options:IgnoreWhiteSpace,IgnoreFillFactor,AddDatabaseUseStatement /sync /scriptfile:deploy.sql /force


Thanks,
Craig Eddy

Comments

  • Hi Craig,

    Thanks for your post.

    Can you try using the UI of SQL Compare to see if that works?

    I'll also do some testing on this tomorrow and get back to you.

    Regards,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
  • I just did some testing and it appears there is definitely a difference in behavior between 10.4 and 10.7 command line. It appears to be working fine in the UI, though.

    I'll do some internal investigation and get back to you as soon as possible.

    In the meantime, if you need to downgrade, you can find version 10.4 here: ftp://support.red-gate.com/patches/SQLC ... 4.8.87.zip (you need to uninstall 10.7 first).

    Sorry about the inconvenience.
    Evan Moss
    Product Support
    (866) 627-8107
  • CraigEddyCraigEddy Posts: 36 Bronze 3
    Thanks, Evan!

    I was also able to confirm that it works in the UI, just hadn't had the opportunity to update the thread yet.

    All the best,
    Craig
  • Hi Craig,

    I've logged this as a bug (reference SC-7142) and will let you know what I hear about it. It's looking like this will likely be fixed in 11.0 at this point.

    Thanks,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
  • CraigEddyCraigEddy Posts: 36 Bronze 3
    Thanks, Evan. If you're looking for beta testers for 11.0 (and hopefully it will be in our support contract!), just let me know.

    Craig
  • Evan Moss wrote:
    Hi Craig,

    I've logged this as a bug (reference SC-7142) and will let you know what I hear about it. It's looking like this will likely be fixed in 11.0 at this point.

    This bug is likely to bite me too. Can you confirm whether it's fixed in current v11 betas or whether I should try an earlier v10.x version? If I use an earlier v10 version, will it have any issues with databases coming from the current latest version of SQL Source Control?
  • Hello,

    Thanks for your post.

    It's fixed in the newest v11 beta, and it also works fine with 10.4. You should be fine with SQL Source Control integration on 10.4 except if you're using SQL 2014 databases.

    Hope that helps.

    Regards,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
  • Thanks for the quick response!

    I'm afraid I'm a little confused by the versioning of your various products. I'm using the command line version of SQL Compare from a brand new download of the SQL Automation Pack and it claims its version number is v11.0.0.184. Does that mean I'm using a v11 beta version or is the versioning of the automation pack somehow out of sync with the standalone version?

    Or, to ask a simpler version of the question - does this version from the Automation Pack have the bug discussed in this post, or not?

    Thanks again!
  • Hello,

    To be honest, I'm surprised they put that version in the automation pack (it's still in beta), but 11.0.0.184 does contain the bug fix, so it should work fine.

    Thanks,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
  • I don't know if this is related to this issue or not. I have a saved project that when I deploy through the GUI, migration scripts are included in the deployment. However, if I use the command prompt for that same project, migration scripts are ignored. I look in the log, and see the following error:
    Synchronization Warning High::An error occurred connecting to source control; migration scripts could not be retrieved.

    The log for using the GUI does not provide this error, so I think the problem is connecting to our source control, which is TFS. I have login information saved on the project. I have also tried providing the scripts and migration scripts folders via xml, and no success. I am using SQL Compare 10.7.0.18.

    Here is the XML file I use.
    <?xml version="1.0"?>
    <commandline>
    	<Force />
    	<project>d:\Temp\MSTest.scp</project>
    	<log>Verbose</log>
    	<report>d:\Temp\redgate.html</report>
    	<reportType>Simple</reportType>
    	<out>d:\Temp\redgateResults.txt</out>
    	<scriptFile>d:\Temp\redgate.sql</scriptFile
    	<options>DecryptPost2KEncryptedObjects,IgnoreFillFactor,IgnoreWhiteSpace,IgnoreWhiteSpace,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName</options>
    </commandline>
    
  • Evan Moss wrote:
    Hello,

    To be honest, I'm surprised they put that version in the automation pack (it's still in beta), but 11.0.0.184 does contain the bug fix, so it should work fine.

    Thanks,
    Evan

    This appears to not be the case: I've just had the first case of trying to deploy using a script generated by that version that was supposed to include a migration script, and it seems not to have done so.

    Can you offer any suggestions or an ETA for when a new version with the fix will be available?
  • Hello,

    Sorry about my delayed response.

    Can you send in the details of your issue to support@red-gate.com so we can take a closer look? As far as I know, the bug with retrieving migration scripts in 10.7 is fixed, so perhaps you're seeing a slightly different issue?

    Thanks,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
Sign In or Register to comment.