SQL dumps for version control

From: Álvaro G. Vicario <alvaroNOSPAMTHANKS_at_demogracia.com>
Date: Fri, 08 Aug 2008 10:24:55 +0200
Message-ID: <g7gvqv$8i2$1@huron.algomas.org>

I’d need to generate SQL dumps to store in a version control system. I’m not asking for advanced features like upgrade/downgrade scripts or the like. My requirements are something like this:

  • I need to store the structure of specific tables (not all); providing the table name should automatically backup all related objects: constraints, indexes, triggers, sequences…
  • I need to store the data of specific tables (not all, and not necessarily the previous ones).
  • Dumps should be similar when the database has not changed so diff tools are meaningful.

Ideally, I’d have a script (*.bat, *.php or whatever) with two configuration files where I specify the table names for either case (e.g. structure.txt and data.txt), but it’s okay if the process has to be done manually.

I’m coding a PHP web site in a Windows 2003 Server box that accesses a remote Oracle 10g server. I’ve installed TOAD Free and Oracle SQL Developer but I’m open to other tools you may suggest. The version control system is Subversion.

I've tried SQL Developer's "Database Export" and the dumps look quite good (although it's hard to say because it puts everything in a single huge file) but I have to specify all the parameters every time (it doesn't even remember the last used directory) what looks too error prone.

Do you have any suggestion? Thank you in advance.


Received on Fri Aug 08 2008 - 03:24:55 CDT

Original text of this message