<arg value="/exclude:User" />
<arg value="/exclude:Role" />
<arg value="/exclude:Schema" />
<arg value="/exclude:Synonym" />
</exec>
<echo message="error return code = ${returncode}" />
<fail if="${returncode !='63' and returncode !='0'}">Sync failed </fail>
</when>
<otherwise>
<echo message="comparing schema no sync" />
<exec program="${sqlcompare.path}\sqlcompare.exe" failonerror="false" resultproperty="returncode" verbose="true" >
<arg value="/scripts1:${sql.scriptsourcepath}" />
<arg value="/database2:${sql.database}" />
<arg value="/server2:${sql.server}" />
<arg value="/username2:${sql.user}" />
<arg value="/password2:${sql.password}" />
<!--
<arg value="/sync" />
-->
<arg value="/ScriptFile:${sql.syncfilename}" />
<arg value="/report:${sql.reportfilename}" />
<arg value="/ReportType:Simple" />
<arg value="/options:ForceColumnOrder,IgnoreUsers,IgnorePermissions,IgnoreWhiteSpace,IgnoreUserProperties,IgnoreCollations" />
<arg value="/exclude:User" />
<arg value="/exclude:Role" />
<arg value="/exclude:Schema" />
<arg value="/exclude:Synonym" />
</exec>
<echo message="error return code = ${returncode}" />
<fail if="${returncode !='63' and returncode !='0'}">Compare failed </fail>
</otherwise>
</choose>
<if test="${file::exists(sql.syncfilename)}" >
<property name="HasSQLScriptRun" value="true" />
</if>
</target>
<target name="runpresql" >
<!-- run pre-deploys -->
<foreach item="File" property="sqlscriptname" >
<in>
<items basedir="${sql.scriptsourcepath}">
<include name="**\Pre**.sql" />
<exclude name="**\Post-**" />
<exclude name="**\archived\**" />





