AddDatabaseUseStatement not giving desired result

jschwarzjschwarz Posts: 15 Bronze 2
edited October 12, 2015 3:07PM in SQL Compare 11
I have added the option AddDatabaseUseStatement to a command line comparison that creates a sql script by comparing database objects from two Source Control Revisions to each other.
The resulting script DOES NOT contain a USE statement with the database name as expected, whereas other options like ObjectExistenceChecks are producing the expected results.
Is this the result that Red Gate expects for this kind of comparison?
Tagged:

Comments

  • jschwarzjschwarz Posts: 15 Bronze 2
    I've also tried adding the "Database1" parameter to the command to specify the database name, but it seems to be an incompatible combination of swithces...
    - Error: The /sourcecontrol1 switch cannot be used in conjunction with the /database1 switch. Please use SQLCompare.exe /? or SQLCompare.exe /verbose /? for more information.
  • Hi Jschwarz,

    It looks like there's some fairly strange behaviour happening here. When comparing two scripts folder (or revisions) we would expect the 'Add database USE statement' option to not have any affect if you were deploying the changes to the second scripts folder. However I would expect the deployment script that is generated to migrate you between these two database states to include this statement. I have a logged a new bug (SC-8004) for us to investigate this further. We'll let you know when this has been resolved.

    Regards,
    David
    Software Engineer
    Redgate Software
  • I'm pleased to tell you that this bug (SC-8004) is fixed in the latest Frequent Updates version of SQL Compare, 11.3.1.56. You'll need to turn on frequent updates to get the update.
    Development Lead
    Redgate Software
  • jschwarzjschwarz Posts: 15 Bronze 2
    This is still not working properly, i tried to upload details as a reply to this thread, but my updates are being treated as SPAM!
  • jschwarz wrote: »
    This is still not working properly, i tried to upload details as a reply to this thread, but my updates are being treated as SPAM!

    Hi @jschwarz ,

    Sorry about that! I think the forums got confused with how much information you were submitting. I've released your flagged posts and marked your account as verified to prevent that from happening again.

    Feel free to DM me if you run into more issues.
  • jschwarzjschwarz Posts: 15 Bronze 2
    Wow Pete, that thread is two years old! uh, thanks i guess...
    Have started another thread recently, two years later, still the same problem, at least i'm not spam anymore?!? hard to find a "forum" useful that put me in the spam bucket for two years
  • Oops! I didn't see that - sorry for the confusion!

    We recently changed the forum software and you must have been caught up in the filter from the last one. You starting a new thread got you added to the spam queue in the new software but I've marked you as verified so it shouldn't happen again.
Sign In or Register to comment.