How to make Sql Compare find differences in view definitions
CCdbs
Posts: 5 Bronze 1
in SQL Compare
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.
I know it is metadata and i have to refresh it, but i would like it to show in Sql compare.
Tagged:
Answers
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.
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
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"
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
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
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
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Thanks, i will remeber to use "include dependencies" when ever it is possible.