0

How to export tables from Derby to SQL Server? Is that possible?

2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Dec 21, 2023 at 9:45
  • Sorry for missing details...I have a derby db that has a few tables and I want to import this database (all the tables) to sql server..is this possible?
    – Mars
    Commented Dec 21, 2023 at 10:20

1 Answer 1

0

AIUI, you will require a JDBC compliant application as that will be the only way into the Derby db.

You probably want IJ: https://db.apache.org/derby/docs/10.17/tools/index.html

Otherwise locate or write a JDBC app that can read your tables and write them to files that you can then use to import into SQLServer.

Getting the content into SQLServer is slightly more straightforward - CSV via bcp.exe or get excel or another tool to read your files & write it to SQLServer

If you are writing your own java code you should be able to pipeline the data across to sqlserver as you read it in, but you will want plenty of logging and pause/stop/resume capability unless you are prepared to clear & rerun your entire db transfer on every single error (data type overflow/mismatch eg, on dates, times, floating point etc)

IJ supports scripting (send it a command file) and redirecting it's output to a file.

If you clean that up [think sed/cut/awk for format cleanup of the output] to give you a CSV shaped file for bcp import]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.