Schema DBO object always different

bhopenwbhopenw Posts: 39
edited July 1, 2009 6:35AM in SQL Compare Previous Versions
Hello

When comparing a Live DB to a scripts folder the schema DBO object always shows up as different no matter how many times I try to sync the scripts folder, this is new for SQL Compare 8. Schema object don't even show up in Live DB to Script Folder compares in v7.1.

This happening for all of our DB to Script Folder comparisons, where the
DBO objects are different more or less where it has code in the live DB.

For now we are filtering out all schema objects

Please any and all help would be great

Thanks,

BJHop

Comments

  • Firstly, a slightly better workaround - you can specifically filter the DBO schema using the rules and filters panel - hover over the line with the checkbox for Schema and you'll see a little pencil icon appear which will let you specify a particular object name to filter out.

    Secondly, SQL Compare probably shouldn't be showing you an unsynchronizable difference in DBO without some kind of warning :). (We enabled the display of a range of system objects like dbo in v8 because some people wanted to synchronize the changes that they had made to them.) If you could a few questions to help me get to the bottom of this:

    Does the DBO schema have permissions etc set on it, auth changes, or anything else that would set it apart from the normal default dbo schema you get when creating a new database?

    Is there anything in the SQL Differences pane (the popup area at the bottom of the screen which comes up when you click on the difference in the main object list view) for the DBO object, on either side?

    Is there a DBO.sql file in your script folder, and if so what's in it? (If you can send the entire script folder, ideally along with a backup of the live database, to me at [email protected] that would be even more helpful, but I appreciate that's not always possible.)
    Software Developer
    Redgate Software
  • DBO in Live db
    -- Permissions
    
    GRANT VIEW DEFINITION ON SCHEMA:: [dbo] TO [corp\dubele]
    GRANT VIEW DEFINITION ON SCHEMA:: [dbo] TO [CORP\HNANDIP]
    GRANT VIEW DEFINITION ON SCHEMA:: [dbo] TO [CORP\ibingha]
    GO
    

    There is no DBO.sql file in the Schema folder

    the pane shows the above in the Live DB area and blank pane for the scripts folder

    The only warnings I get are the following:

    IF clause evaluated as true
    SQL Compare considers only the first block of code in IF statements. Schema changes made by ELSE conditions do not appear in the comparison results.

    all having to do with users


    Hope this helps
  • It does help a lot - thank you. That's now in our bug tracking system as SC-4507 and hopefully we'll get it sorted out shortly, although unfortunately it probably just missed the deadline for the next point release.

    Meanwhile you can work around it by creating a .sql file somewhere in the script folder with the GRANT VIEW DEFINITION lines in it - SQL Compare will pick them up once they're there, it just isn't writing them out properly.
    Software Developer
    Redgate Software
Sign In or Register to comment.