You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Sylvain Leroux (JIRA)" <ji...@apache.org> on 2010/02/16 14:23:27 UTC

[jira] Updated: (DERBY-4550) Using ij to copy data from one DB to an other

     [ https://issues.apache.org/jira/browse/DERBY-4550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Leroux updated DERBY-4550:
----------------------------------

    Attachment: DERBY-4550.sql
                DERBY-4550.diff

Here is a first attempt to solve this issue.

Basically, I add an optional "ON" clause to the PREPARE statement, allowing to prepare the statement on an alternate connection, instead of the current one. I don't know if this is the most elegant way of doing, but it appears to work.

The file DERBY-4550.sql contains a sample script demonstrating that.

----
As Rick Hillegas suggested it on the mailing list, I will take a look at PreparedStatement.addBatch() and Statement.executeBatch() for an alternative option.

----
I focused mostly on prepared statements as it was my first idea. But cursors might benefit of the same improvement.

> 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
>
>
> 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.