On Fri, Dec 17, 2004 at 01:39:29PM -0500, Tong wrote: > I'm looking for such a tool (Database Comparer). Any suggestions?
I wrote something in perl that does this, it's called "dbischema". It can get the database schema from an existing database, save it in an xml file, and update a database to match the xml file. It works on mysql, msql and postgresql, and it's possible to write more modules to make it work with other DBMSs. It's quite powerful, and has been used to support a large company for quite a while. This program is theoretically owned by a company I used to work for, but they're open-source friendly and I don't think they'd mind if you use it. I can check if you like, they would probably let me open-source it. I even have a Debian package :) Here's the help text, which probably won't be very helpful! $ dbischema --help Usage: dbischema [options] [command] [arguments/redirection] options: --help print help -d, --dbms DBMS Use the specified DBMS - required by many commands -u, --user user User name for the DBMS -p, --pass pass Password for the DBMS -h, --host database server host -P, --port database server port (not implemented yet!) -D, --dir dir Use the specified directory as a work directory -v, --verbose Make lots of noise -q, --quiet No commentary -l, --list list all known DBMS, and local databases -F, --force use force if necessary, without asking (for drop) -C, --no-checksum don't use file checksum to accelerate update if no changes -k, --keep-dir don't remove the working directory after success -b, --database db specify a different database name to that in the schema commands: dump database [table(s)] > sql parse < sql > real abstract < real > abstract realize < abstract > real merge part_1 ... part_n > merged diff old new > diff create < real > create alter old new diff > alter execute actions [real] drop database report < diff > report update abstract | directory verify abstract | directory let me know if you'd like to have a copy of it. Sam -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]