Comparing tables includes view

TheBatATheBatA Posts: 18
edited November 1, 2007 6:42AM in SQL Toolkit Previous Versions
Hello,

I'm using toolkit to compare structure of 2 tables in 2 databases.
I've included only 1 table in comparison and created package using packager, but when I run this package on another database, I get SQL error:
Cannot find the object "ArticleSearch" because it does not exist or you do not have permissions.
and
exec sp_refreshview N'[dbo].[ArticleSearch]'

This ArticleSearch exists as a View in database, but I haven't included it in comparison.

Why this happens?

Comments

  • If the table is referred to in the view, and the view might need to be refreshed after the changes in the table, then SQL Compare will script a call to sp_refreshview to ensure that the changes in the table are properly reflected in the view.

    You can disable this behaviour by using your own Options instead of Options.Default, and not including Options.IncludeDependancies in these options.
    Software Developer
    Redgate Software
Sign In or Register to comment.