I’ve used DBUnit’s import/export Ant tasks for this purpose. See http://dbunit.sf.net/. The export task exports the data to xml, the import fills the db from the xml. Works fine, but beware it has some bugs!