0

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

Mars
  • 9
  • 1

1 Answers1

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]

simon coleman
  • 286
  • 1
  • 6