| Author |
Message |
TheBatA
Joined: 25 Sep 2007 Posts: 12 Location: Belgrade
|
Posted: Wed Oct 31, 2007 8:51 pm Post subject: Comparing tables includes view |
|
|
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 |
|
 |
Michelle Taylor
Joined: 30 Oct 2006 Posts: 519 Location: Red Gate Software
|
Posted: Thu Nov 01, 2007 11:42 am Post subject: |
|
|
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 |
|
 |
|
|
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