Question

I am trying to get info from an embedded db called NexusDB using java.

Alternative 1:

I've read in NexusDB website that there is an ODBC driver so I might use it with unixODBC. Then I need to do a JDBC-ODBC Bridge as stated here.

Alternative 2:

Get some sort of application to migrate NexusDB db to another db. Would like to know one.

I would like to know if anyone ever this this, what's the best solution?

Thanks for reading.

Was it helpful?

Solution

Alternative 1:

Not possible.

unixODBC needs linux drivers and there aren't for nexusDB.

Alternative 2:

Didn't find any.

Solution so far

Writting a small webservice with delphi or get odbc and use that in a small proxy. In other words, instead of connecting to the nexusdb server you connect to a dedicated application or webservice pass on the information and that app does connect to nexusd and writes the data.

OTHER TIPS

I've had some success running nexusDB under wine.

I was able to set up a WINEPREFIX, follow the instructions here to get at wine's odbc management panel (by default it pipes into unixODBC, and as Macarse noted, that's a dead end), set up a DSN there and test that it could access the data.

The next thing I tried was installing win32 PHP and writing a quick and dirty test using odbc_connect. After wasting a good chunk of time accidently using the linux php binary and wondering why it couldn't use the (inbuilt on win32 ONLY) function odbc_connect, I did get it working.

HINT: To save yourself feeling like banging your head against a brick wall, remember that any attempts to run php scripts in this environment MUST look like this

WINEPREFIX=/home/you/yourprefix wine php c:\phptest.php

NOT

WINEPREFIX=/home/you/yourprefix php c:\phptest.php

The second version will use the linux php binary. Feeling pretty stupid after running the second version a good dozen times AND googling the error some before realising what was wrong - I think I need to get up later if I want to be able to still make things work at 4am :(

(the c:\ path in the above examples can be passed as /home/you/yourprefix/drive_c/whatever if you prefer - relative paths are also fine)

And yes, I know this is a necro post, but it's a pretty niche situation, there isn't a lot of information out there making nexusdb and odbc play nice on linux, and if this information was available to me a few months back when I was googling around and came across this thread it could have saved me a good chunk of time. Hope someone else finds it helpful.

If you connect to Nexus via .NET maybe you can use IKVM to run your Java app and connect through the .NET api?

Otherwise I think your own "solution so far" sounds ok.

Best Anders

Since it is embedded (and you probably have full access to the machine), what about copying database files to a Windows system, setting up NexusDB and its ODBC driver, then using an ODBC-JDBC bridge on that machine? Once the bridge is running, you can set up a new JDBC-compatible DBMS of your choice, connect, and use a little code to SELECT from NexusDB and insert to your new database.

If you're looking to migrate to another embedded DBMS, I'm using H2 Database for Java, and I've got to say it's really sweet. Both embedded and client/server modes, cross-platform, and really fast for anything under 1M rows. Supports pretty much any feature you'd have in an embedded DBMS and then some.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top