Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I work with two editions of a shipping product; call them "A" and "B". Both use similar a database schema, but edition "B" has a strict super-set of the schema (and features) used for edition "A".

We'll sometimes get field reports from "B" customers that turn out to be issues totally isolated to "A", particularly for upgrade/downgrade scenarios. We're building tools to help analyze and reproduce these issues in-house, using customer-provided data such as a full database dump.

I'd like a straight-forward way to take a dump from edition "B", and pare away all the tables, columns, and fields that make it different than the "A" edition. What would be left is a "realistic" data set that we can use to troubleshoot in a clean instance of "A", which would help us separate data issues from functional issues.

I have copies of the scripts that create both editions of the schema. The changes made by edition "B" are extensive and, where they modify tables rather than add them, aren't really amenable to removing by hand. In any case, we'd eventually like to use the tool with any version of the product.

Any suggestions on the best way to get from point "B" to point "A"?

I suppose a tool that diffs two arbitrary databases and generates a script, would be enough to start with. I'd point it to "B" as the original, and "A" as the target, and then figure out the order in which to apply the removals. Know of any tools that do that?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.