SqlCompare cmdline with xml arguments not genning syncscript

Forum for users of SQL Compare schema synchronization utility

Moderators: JonathanWatts, Chris Auckland, David Atkinson

SqlCompare cmdline with xml arguments not genning syncscript

Postby jgonzalez » Tue Nov 29, 2011 11:50 pm

I have a powershell script that uses an xml template to build an xml arguments file. I want to use this xml arguments file to compare a script directory to a database and generate a script to sync the databases at a later date.

Do I have to enable the sync option in order to have it output the script?

I have ruled out Powershell being the problem I believe. After I generated the xml arguments file, I ran this manually from the powershell prompt:

sqlcompare /ArgFile:\"C:\\Automation\\EnvironmentSetup\\Stage\\WorkingFolder\\stage1v\\sprocs.xml\"

I was expecting it to output a file named output.sql containing the sync script. I have included both my arguments file, as well as the verbose output from running the sqlcompare command. I abbreviated the sql source, but I assure you it found some differences.

What do I need to do in order to generate the output script?


Xml Arguments File:
<commandline>
<scripts1>C:\\Automation\\EnvironmentSetup\\Stage\\WorkingFolder\\stage1v\\LandingZone\\Objects</scripts1>
<database2>LandingZone</database2>
<server2>stage1v</server2>
<scriptfile>output.sql</scriptfile>
<exclude>Assembly</exclude>
<exclude>AsymmetricKey</exclude>
<exclude>Certificate</exclude>
<exclude>Contract</exclude>
<exclude>DDLTrigger</exclude>
<exclude>EventNotification</exclude>
<exclude>FullTextCatalog</exclude>
<exclude>FullTextStopList</exclude>
<exclude>MessageType</exclude>
<exclude>PartitionFunction</exclude>
<exclude>PartitionScheme</exclude>
<exclude>Queue</exclude>
<exclude>Role</exclude>
<exclude>Route</exclude>
<exclude>Rule</exclude>
<exclude>Service</exclude>
<exclude>ServiceBinding</exclude>
<exclude>SymmetricKey</exclude>
<exclude>User</exclude>
<exclude>UserDefinedType</exclude>
<exclude>XMLSchemaCollection</exclude>
<exclude>Table</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[sp_MSdel_</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[sp_MSins_</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[sp_MSupd_</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[fn_cdc_get_</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[_</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[zz</exclude>
<exclude>StoredProcedure:\\[dbo\\].\\[t_</exclude>
<options>IgnoreUsersPermissionsAndRoleMemberships,IgnorePermissions,IgnoreUsers,IgnoreWhitespace,IgnoreStatistics,IgnoreWithNocheck,IgnoreReplicationTriggers,IgnoreDatabaseAndServerName,IncludeDependencies,IgnoreUserProperties,IgnoreWithElementOrder,DecryptPost2kEncryptedObjects</options>
<verbose />
</commandline>


Verbose Output
=-=-=-=-=-=-=-=-=----=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=----=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=----=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=----=-=-=-=-=-=-=-=-=-
SQL Compare Command Line V8.50.12.20
======================================================================================================================
Copyright c Red Gate Software Ltd 1999-2010

Serial Number: 002-005-114074-68F8

SQL Compare running with option: IgnoreUsersPermissionsAndRoleMemberships (OK).
SQL Compare running with option: IgnorePermissions (OK).
SQL Compare running with option: IgnoreUsersPermissionsAndRoleMemberships (OK).
SQL Compare running with option: IgnoreWhiteSpace (OK).
SQL Compare running with option: IgnoreStatistics (OK).
SQL Compare running with option: IgnoreWithNocheck (OK).
SQL Compare running with option: IgnoreReplicationTriggers (OK).
SQL Compare running with option: IgnoreDatabaseAndServerName (OK).
SQL Compare running with option: IncludeDependencies (OK).
SQL Compare running with option: IgnoreUserProperties (OK).
SQL Compare running with option: IgnoreWithElementOrder (OK).
SQL Compare running with option: DecryptPost2kEncryptedObjects (OK).
Comparing database Scripts.Objects with database stage1v.LandingZone...
Registering data sources
Creating mappings
Comparing
Applying Command Line Items

Summary Information
=======================================================================================================================
DB1 = C:\\Automation\\EnvironmentSetup\\Stage\\WorkingFolder\\stage1v\\LandingZone\\Objects
DB2 = stage1v.LandingZone

Object type Name DB1 DB2
-----------------------------------------------------------------------------------------------------------------------
Function [dbo].[SelectDistanceBetweenZipAndStaticLocation] <> <>
StoredProcedure [dbo].[Aggregation_SelectWide] <> <>
StoredProcedure [dbo].[News_SelectByCustomerId] <> <>
StoredProcedure [fusion].[ComponentConfigurationAll_Load] >>
StoredProcedure [fusion].[ComponentConfiguration_Load] >>
-----------------------------------------------------------------------------------------------------------------------

Details - comparing C:\\Automation\\EnvironmentSetup\\Stage\\WorkingFolder\\stage1v\\LandingZone\\Objects with
stage1v.LandingZone
=======================================================================================================================
Function [dbo].[SelectDistanceBetweenZipAndStaticLocation]
--Abbreviated for brevity
== GO
-----------------------------------------------------------------------------------------------------------------------
StoredProcedure [dbo].[Aggregation_SelectWide]
== SET ANSI_NULLS OFF
--Abbreviated for brevity
== GO
-----------------------------------------------------------------------------------------------------------------------
StoredProcedure [dbo].[News_SelectByCustomerId]
--Abbreviated for brevity
== GO
-----------------------------------------------------------------------------------------------------------------------
StoredProcedure [fusion].[ComponentConfigurationAll_Load]
--Abbreviated for brevity
>> GO
-----------------------------------------------------------------------------------------------------------------------
StoredProcedure [fusion].[ComponentConfiguration_Load]
--Abbreviated for brevity
>> GO
-----------------------------------------------------------------------------------------------------------------------
jgonzalez
 
Posts: 5
Joined: Mon Oct 31, 2011 6:02 pm

Postby andy.campbell.smith » Fri Dec 02, 2011 12:44 pm

I don't think you need the sync option to run this, that's mysterious. Can you try patching it with the install found here:

ftp://support.red-gate.com/patches/SQL_ ... .25.22.exe

and let me know if you still see the problem?
Andy Campbell Smith

Red Gate Technical Support Engineer
andy.campbell.smith
 
Posts: 173
Joined: Thu Oct 20, 2011 11:19 am
Location: Red Gate Software


Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests