Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Derby: Create SQL Dump with data

Tags:

java

derby

is there any easy way to create a complete SQL Dump from an apache Derby DB? Using the dblook tool, I managed to dump the database schema to a sql file, however there seems to be no way to get the data included.

like image 796
Matthias Avatar asked Jun 19 '10 18:06

Matthias


1 Answers

Derby has procedures for bulk import/export. Here's an example of using the ij tool to export the APP.MESSAGES table:

>ij
ij version 10.3
ij> connect 'jdbc:derby:dbName';
ij> CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE('APP', 'MESSAGES',
                                  'myfile.del', null, null, 'UTF-8');
0 rows inserted/updated/deleted

See the Derby Tools and Utilities Guide for your version.

This is not in the format you're asking for. Beyond that, you may need to resort to external tools.

like image 110
McDowell Avatar answered Sep 28 '22 02:09

McDowell