We currently use a house written PS script to compare developers' local SQL databases with live databases to generate deployment scripts. We use Redgate SQL Compare through powershell, typically calling it as such (where $SQLComparepath is the file path of the executable for SQLcompare):
$AllArgs = @("/server1:$DevServer", "/Database1:$DevDB", "/Scripts2:$folder", "/Include:$type", "/Include:$type:\[$schema]\.\[$name]", '/Synchronize')
&$SQLComparePath $AllArgs
We find that while this works, it takes a long time to generate scripts for large numbers of objects since we are calling the exe serially for each object. I've searched through the documentation and don't see any way of passing more than one set of arguments at a time. Does anyone know of a more efficient way of calling SQL Compare, through powershell or otherwise?
Thanks!