Comparing tables includes view

Forum for users of SQL Toolkit 3,4,and 5

Comparing tables includes view

Postby TheBatA » Wed Oct 31, 2007 7:51 pm


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:
Code: Select all
Cannot find the object "ArticleSearch" because it does not exist or you do not have permissions.

Code: Select all
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?
Posts: 12
Joined: Tue Sep 25, 2007 7:37 am
Location: Belgrade

Postby Michelle Taylor » Thu Nov 01, 2007 10:42 am

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.
Michelle Taylor
Posts: 537
Joined: Mon Oct 30, 2006 11:45 am
Location: Red Gate Software

Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests