[
https://issues.apache.org/jira/browse/DERBY-4550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837789#action_12837789
]
Sylvain Leroux commented on DERBY-4550:
---------------------------------------
By the way, since it was the original purpose of this issue, I successfully
copied data from MySQL to Derby using this patch. As reference here is an
example:
ij> CONNECT 'jdbc:mysql://localhost/test?user=fred';
ij> CONNECT 'jdbc:derby:destination;create=true';
ij(CONNECTION1)> CREATE TABLE t(a int, b int);
0 rows inserted/updated/deleted
ij(CONNECTION1)> PREPARE s...@connection0 as 'SELECT a,b FROM t';
ij(CONNECTION1)> AUTOCOMMIT OFF;
ij(CONNECTION1)> EXECUTE 'INSERT INTO t(a,b) VALUES(?,?)' USING
s...@connection0;
1 row inserted/updated/deleted
1 row inserted/updated/deleted
1 row inserted/updated/deleted
ij(CONNECTION1)> COMMIT;
ij(CONNECTION1)> DISCONNECT CONNECTION0;
ij> SHOW CONNECTIONS;
CONNECTION1* - jdbc:derby:destination
* = current connection
ij> SELECT * FROM t;
A |B
-----------------------
1 |100
2 |200
3 |300
3 rows selected
> Using ij to copy data from one DB to an other
> ---------------------------------------------
>
> Key: DERBY-4550
> URL: https://issues.apache.org/jira/browse/DERBY-4550
> Project: Derby
> Issue Type: Improvement
> Components: Tools
> Reporter: Sylvain Leroux
> Assignee: Sylvain Leroux
> Priority: Minor
> Attachments: DERBY-4550.diff, DERBY-4550.sql, DERBY-4550_2.diff,
> DERBY-4550_2.sql, DERBY-4550_3.patch, DERBY-4550_3.sql, DERBY-4550_4.patch,
> DERBY-4550_4.sql, DERBY-4550_5.patch
>
>
> It is possible to have open connections to several databases while running
> ij, but it is not currently possible to copy data from one DB to an other one.
> Not only such a feature would allow to copy data between Derby databases.
> But, ij being mostly DB agnostic, if will ease import/export from any JDBC
> compliant data source.
> See
> http://old.nabble.com/Using-IJ-to-copy-data-from-one-DB-to-an-other-one-td27598138.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.