| Author |
Message |
Brujah
Joined: 02 Apr 2008 Posts: 12
|
Posted: Wed Feb 01, 2012 2:52 pm Post subject: sp_refreshview in output file |
|
|
Hi
When using Sql Compare 10 thru command line, I got in my output:
EXEC sp_refreshview N'[Schema].[Name]'
for every view in my database
Is there a way to disable this?
I'm using it to compare 2 SQL Source Control scripts folders
C:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe /scr1:"C:\dB52WorkDir\Jenkins217209\Trunk\sql\Redgate" /scr2:"C:\dB52WorkDir\Jenkins217209\Tag\sql\Redgate" /Options:Default,CaseSensitiveObjectDefinition,DoNotOutputCommentHeader /ScriptFile:"C:\dB52WorkDir\Jenkins217209\Change.sql" /Include:Identical /Force |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6348 Location: Red Gate Software
|
Posted: Fri Feb 03, 2012 6:40 pm Post subject: |
|
|
If I remember correctly, a side-effect of using /Include:Identical is that all views are refreshed. Omitting this will script a refresh view only for views that are different. _________________ 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 |
|
 |
Brujah
Joined: 02 Apr 2008 Posts: 12
|
Posted: Wed Feb 08, 2012 5:19 pm Post subject: |
|
|
Hi brain
I've included this switch to suppress the exit code if the two data sources are identical.
"If /Include:Identical is not set, and the data sources are identical, SQL Compare returns the error code 63."
is there a way to to suppress this error code, but get rid off the sp_refreshview ?
Thanks |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6348 Location: Red Gate Software
|
Posted: Wed Feb 08, 2012 6:02 pm Post subject: |
|
|
That could be a problem. In the past, I have suggested wrapping the command into a batch file and then at the end, check for %ERRORLEVEL%==63 and then EXIT /B with error code 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: 6348 Location: Red Gate Software
|
Posted: Wed Feb 08, 2012 6:10 pm Post subject: |
|
|
| Code: |
SQLCompare.exe /db1:...
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: 6348 Location: Red Gate Software
|
Posted: Wed Mar 28, 2012 3:26 pm Post subject: |
|
|
SQL Compare 10.1 now has an /assertidentical switch that will prevent the exec tasks from failing on identical databases. _________________ 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 Apr 23, 2012 6:35 pm Post subject: Re: |
|
|
| Brian Donahue wrote: |
| SQL Compare 10.1 now has an /assertidentical switch that will prevent the exec tasks from failing on identical databases. |
Apparently this patch "suggest" I need to buy version 10.1? or is version 10 free for those of us having version 9? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6348 Location: Red Gate Software
|
Posted: Tue Apr 24, 2012 9:14 am Post subject: |
|
|
Hi Hugo,
If you have a support agreement that was current at the time of the upgrade, you would get major upgrades for free. Usually a major-version is a paid upgrade.
Just to clarify, this is not a patch or a bugfix - it is a change in design because something that had been acceptable behavior previously is now unwanted simply because of the selling of Continuous Integration that we are currently engaged in.
If you want to keep the current version, there is still the option of wrapping the compare task into a batch file as I'd mentioned previously. _________________ 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: 6348 Location: Red Gate Software
|
Posted: Tue Apr 24, 2012 1:40 pm Post subject: |
|
|
Sorry -- sp_refreshiew being added, probably a bug.
Error code 63 unless you use /Include:Identical, a design issue. _________________ 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 |
|
 |
|