cmd, A <=> B, B to be B plus new+diff from A
austrianfoodispuke
Posts: 100
How can I create the syntax for this at a command line level:
Database A (exists as folders/scripts)
Database B (live db)
N.B. "A" is only a small subset of "B"
Compare A with B and sync them
Make B have anything new in A, plus any changes from A.
But do not drop things in B which are missing from A.
I've read the help, but unfortunately it is not clear to me.
Database A (exists as folders/scripts)
Database B (live db)
N.B. "A" is only a small subset of "B"
Compare A with B and sync them
Make B have anything new in A, plus any changes from A.
But do not drop things in B which are missing from A.
I've read the help, but unfortunately it is not clear to me.
Comments
There is an existing feature request in our system for this (SC-3478) so there is a chance that it gets addressed in a future release.
Could you possibly give some background as to the nature of the objects you don't wish to drop on your target database? This information helps us design appropriate solutions.
Thanks,
David Atkinson
Red Gate Software
Product Manager
Redgate Software
This is our set up:
- 3rd party db, regular updates received
- in house extensions (no 'combined' extensions e.g. we add a col to their table)
What we are trying to achieve
- Get prod backup
- Put into dev, apply our extensions
However, when running with the 'sync' flag, instead of having prod+extension, it drops all the prod stuff and I'm just left with the extensions.
However, the scope of the upcoming SQL Compare project is already fixed, so it will have to wait until the next one.
Thannks for your comments. If I have in any way misunderstood your request, please let me know.
David Atkinson
Red Gate Software
Product Manager
Redgate Software
The parts we add are not depended on by the standalone part.
e.g. we might have views, procs, functions that use all this
Perhaps think of it like a wrapper.
There are releases from the 3rd party company (who someone else looks after) which are frequently applied to the db - we don't see this until it is in production.
I want to take the latest version of the db (including any 3rd party updates) and add the latest verison of all of our 'extensions' currently under development'
Everything appears to work, get the db, restore, get our code from source control, populate the tags.
But when I do a sync between the newly copied version of prod (now in dev) and the scripts we have (ordered in folders), I'm not getting a combination of "prod+scripts" instead I just get "scripts". It is dropping everything that is not in the "scripts" folders.
I don't understand why this should be as when using the GUI you can select from the 4 groups:
Identical in A and B
Only in A
Only in B
Different in A and B
So why is using "/sync" causing it to drop stuff?
As I said earlier, there is already a feature request for this (SC-3478) which may make it to the next version. However, due to prioritisation it is always possible that bugs and features miss a specific release so I can make no guarantee at this stage.
However, even if we did implement this feature, and if you have a scenario where you have added a column to your customised table, and the target also has a new (but different) column added to the same table, SQL Compare will overwrite the target with the source.
David Atkinson
Red Gate Software
Product Manager
Redgate Software