Red Gate forums :: View topic - sp_refreshview with Command Line Compare
Return to www.red-gate.com RSS Feed Available

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

sp_refreshview with Command Line Compare

Search in SQL Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
mmJPM



Joined: 06 Dec 2011
Posts: 4

PostPosted: Tue Dec 13, 2011 11:01 pm    Post subject: sp_refreshview with Command Line Compare Reply with quote

When I run a compare from the command line, a call to sp_refreshview is generated for every view in my database, even when there are no dependencies on the objects that have differences. This even happens when there are no differences and I've used the /Include:Identical switch. If I run the same compre from the U.I., it does not script the sp_refreshview calls.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Wed Dec 14, 2011 11:34 am    Post subject: Reply with quote

Thanks, this is a known issue. Bug reference is CSD-157. According to the bug report, if you do not include identical objects, sp_refershview will not be run on the views that don't have differences.
Back to top
View user's profile Send private message
hugo



Joined: 26 Mar 2012
Posts: 2

PostPosted: Mon Mar 26, 2012 8:18 pm    Post subject: Re: Reply with quote

Brian Donahue wrote:
Thanks, this is a known issue. Bug reference is CSD-157. According to the bug report, if you do not include identical objects, sp_refershview will not be run on the views that don't have differences.


Hi, I am having the same issue. The problem with not including identical objects, i.e. not using /include:identical is that, if there are not differences, the exit code will be an error, and since I am using it with an automated build tool, my entire build is failing... do you have an update on this? I am using SQL Compare 9.0.

Thank you!
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Tue Mar 27, 2012 9:00 am    Post subject: Reply with quote

I can't say when, if ever, this behavior will change, as it's been explained to me, it's intentional.

In the meantime, I have suggested previously that you run a batch file in the build instead (cmd /c), and capture the errorlevel and throw back a 0 if SQLCOMPARE returns a 63.
Code:
SQLDataCompare.exe /project:...
IF %ERRORLEVEL% EQU 63 GOTO EQUAL
EXIT /B %ERRORLEVEL%
EQUAL:
EXIT /B 0
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Wed Mar 28, 2012 9:09 am    Post subject: Reply with quote

SQL Compare 10.1 has a new switch called /assertidentical, which should solve the issue without having to include identical objects. This is not documented at this time, but it is in the latest version.
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