How can we help you today? How can we help you today?

How to make Sql Compare find differences in view definitions

I can see that a column is INT in one view and char in another, but when i compare them, the difference doesn't show. Is there an option i can use or is Sql Compare not able to see the diffrence?
I know it is metadata and i have to refresh it, but i would like it to show in Sql compare.
CCdbs
0

Comments

5 comments

  • DanC
    Hi @CCdbs

    In order to view the data type differences, you would need to compare the original tables. 

    This is because a view is basically a select statement from a table and the columns are defined in the table, not in the view.

    DanC
    0
  • CCdbs
    Hi Dan
    Thank you for your answer, but my tables are alike. The problem occurs when you change the datatype of a column and refreshes the view in one db, when you compare the db to another db only the changes on the table is found! So I would like en option in Sql Compare saying "Compare view metadata"
    CCdbs
    0
  • DanC
    Hi @CCdbs

    In that case this would be a feature request and so I would advise posting the idea on the UserVoice here: https://redgate.uservoice.com/forums/141379-sql-compare
    DanC
    0
  • Eddie D
    Hi @CCdbs

    The view will not appear has different as the DDL for the view is unchanged.  Run the deployment process, remember to check the option to include dependencies and the deployment script will include the EXEC sp_refreshview to update the view.

    Many Thanks
    Eddie
    Eddie D
    0
  • CCdbs
    Hi @Eddie D
    Thanks, i will remeber to use "include dependencies" when ever it is possible.
    CCdbs
    0

Add comment

Please sign in to leave a comment.