Wrong Sync Order
ivarley
Posts: 3
Hello,
On attempting a database synchronization with SQL Compare 8, it is failing because the commands are in the wrong order based on dependencies. In particular, I've added a column to a table, and then also referenced that column in an altered procedure. If the ALTER TABLE statement came before the ALTER PROCEDURE statement, it'd be no problem; however, it's attempting to do the ALTER PROCEDURE statement first, and failing. Is there any way to avoid and / or control this, short of having to do two separate synchronization operations (one for the tables, and a second for the procedures)? It seems kind of dumb to me to have the procs interleaved with the tables, as it's almost always safer to do all the table changes first. The objects appear in the right order in the Wizard, but then the actual script that gets generated is in the wrong order.
Thanks!
Ian Varley
On attempting a database synchronization with SQL Compare 8, it is failing because the commands are in the wrong order based on dependencies. In particular, I've added a column to a table, and then also referenced that column in an altered procedure. If the ALTER TABLE statement came before the ALTER PROCEDURE statement, it'd be no problem; however, it's attempting to do the ALTER PROCEDURE statement first, and failing. Is there any way to avoid and / or control this, short of having to do two separate synchronization operations (one for the tables, and a second for the procedures)? It seems kind of dumb to me to have the procs interleaved with the tables, as it's almost always safer to do all the table changes first. The objects appear in the right order in the Wizard, but then the actual script that gets generated is in the wrong order.
Thanks!
Ian Varley
Comments
In my experience, scripting tables before stored procedures is not going to work 100% of the time, which is why SQL Compare constructs a dependency matrix to decide the scripting order of objects.
It would be extremely helpful if you could email us a backup of the databases or a SQL Compare snapshot of them so that we could reproduce the problem and debug it in-house. Our address is support@red-gate.com. Don't forget to include your serial number (if you have one) and the version of the software you're using.
thanks,
BJHop