Red Gate forums :: View topic - Comparing tables includes view
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

Comparing tables includes view

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
TheBatA



Joined: 25 Sep 2007
Posts: 12
Location: Belgrade

PostPosted: Wed Oct 31, 2007 8:51 pm    Post subject: Comparing tables includes view Reply with quote

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:
Code:

Cannot find the object "ArticleSearch" because it does not exist or you do not have permissions.

and
Code:

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?
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 528
Location: Red Gate Software

PostPosted: Thu Nov 01, 2007 11:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group