Red Gate forums :: View topic - SqlCompare cmdline with xml arguments not genning syncscript
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

SqlCompare cmdline with xml arguments not genning syncscript

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



Joined: 31 Oct 2011
Posts: 5

PostPosted: Tue Nov 29, 2011 11:50 pm    Post subject: SqlCompare cmdline with xml arguments not genning syncscript Reply with quote

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
-----------------------------------------------------------------------------------------------------------------------
Back to top
View user's profile Send private message
andy.campbell.smith



Joined: 20 Oct 2011
Posts: 159
Location: Red Gate Software

PostPosted: Fri Dec 02, 2011 12:44 pm    Post subject: Reply with quote

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_Compare/SQL%20Compare_8.50.25.22.exe

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

Red Gate Technical Support Engineer
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