| Author |
Message |
mmJPM
Joined: 06 Dec 2011 Posts: 4
|
Posted: Tue Dec 13, 2011 11:01 pm Post subject: sp_refreshview with Command Line Compare |
|
|
| 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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Wed Dec 14, 2011 11:34 am Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
hugo
Joined: 26 Mar 2012 Posts: 2
|
Posted: Mon Mar 26, 2012 8:18 pm Post subject: Re: |
|
|
| 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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Tue Mar 27, 2012 9:00 am Post subject: |
|
|
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
|
_________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Wed Mar 28, 2012 9:09 am Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|