How to use Oracle SQLdeveloper with HSQL / Hypersonic DB's JDBC driver - oracle

I'd like to use Oracle's SQLdeveloper to visualize my HSQLDB tables.
An instruction on how to use it with MySQL can be found on https://web.archive.org/web/1/http://blogs.techrepublic%2ecom%2ecom/programming-and-development/?p=564 ... and I know that Oracle points to a location where to download all JDBC drivers.
With MySQL this worked, however, including the JAR file from HSQLDB (here: hsqldb-1.8.0.10.jar) did not make a new tab show up (as is the case with MySQL).
Is there a way to "convince" SQLdeveloper working with HSQLDB and JDBC?
FYI, I am using Squirrel too but it's not as comfortable to work with compared to SQLdeveloper.

I was looking for the same thing, then found this:
http://forums.oracle.com/forums/thread.jspa?messageID=4241526&#4241526
So basically Oracle doesn't support it, and you can't add a new TAB on your own, even if you have the JDBC driver.
You can try other tool like ExecuteQuery (executequery dot org)

Related

How do I connect to Derby from VB6?

I am trying to setup a temporary unit test database that has DB2 style syntax. I know Derby fills this role quite nicely on our Java applications.
I have done much searching, and I have seen that you can use the JDBC DB2 driver to connect to Derby - which is cool, except it doesn't seem as true for the ODBC DB2 (or OLEDB) driver allowing a connection to Derby.
I also saw that Cloudscape had a version but following the download instructions, there is a redirect page that states:
There is no replacement for the old Cloudscape ODBC driver in IBM's world. Does anyone know of another source where I can get it? Or another way of connecting to Derby from VB6 (or of creating an ADODB.Connection in VB.net to Derby).
I suppose I would settle for an old version of Derby that the you can connect with (an old) DB2 ODBC driver.

How to create/drop a database on DB2 through JDBC?

I have some test code using JDBC to connect to MySQL, PostgreSQL, Oracle, and SQL Server, with only some minor differences between databases. I would like to run this test code as well on DB2. To start with a blank slate, and also test our database creation DDL, the tests start by creating a database (e.g. CREATE DATABASE), and end by deleting that database (e.g. DROP DATABASE).
I read a comment from 2012 saying that, at least on DB2 for Linux, one can't run CREATE DATABASE and DROP DATABASE through JDBC, but only from the command line, which would be a bummer for running my integration tests on DB2. Is there really no way of creating, and then dropping a database through JDBC?
JDBC is for only SQL. Create database or Drop database is not SQL, and for this reason that statement cannot be executed from JDBC. You can execute DB2 commands via Runtime class, or using JNI to use the DB2 API
db2 create database command http://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001941.html
sqlecrea API http://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.apdv.api.doc/doc/r0001446.html

how to use derby db data with Lazarus

I have a java program using a derby db in Eclipse. I want to use this derby db data with a new program I am about to create with the Lazarus ide. Can I connect direct to the derby db, if so how. Or do I need to export the derby db in some way to use with the Lazarus ide, if so how would I do this?
if you decide with export variant, then .csv (comma separated value) is probably the best inter database.
I have some experience with tdbf.
But from what I've read sqlite will be the best option.
I'm sorry for posting this as answer i have only 42 points reputation and can't post it as comment (need 50 for it)
Does derby support ODBC? Lazarus has a ODBC connection that can be used to connect databases that are not directly supported.
I searched quickly, but mostly saw references to older commercial Derby ODBC drivers. And it will probably depend on OS.

cannot query SQL Server system tables over db link created using DG4MSQL

I am trying to create db link from Oracle 11g to SQL Server 2005 using DG4MSQL gateway.
After creating db link I am not able to query SQL Server system views (sys.services or sys.objects) using JDBC driver, but I am able to query all user tables using JDBC driver.
If I use sqlplus, I am able to query all tables including system tables. Since my project is Java project, I am bound to use JDBC driver.
One more observation I made is that, if I use DG4ODBC instead of DG4MSQL gateway, then I am able to query all SQL Server tables including system tables using JDBC driver.
Please let me know if there are any ways I can query SQL Server system tables using DG4MSQL and JDBC driver?
this one is a little bit tricky to explain
An Oracle Gateway performs 3 types of operations:
SQL translations (when you query regular tables, views etc)
Data Dictionary translations (when you query system views)
Data Type transformations (for example Microsoft's date to Oracle's date)
In case of JDBC, the JDBC-ODBC bridge makes the JDBC driver perfectly compatible with the drivers included in DG4ODBC. Therefore, JDBC plus DG4ODBC allows you to perform all the transformations above.
The problem is that DG4MSQL uses a proprietary driver and only SQL translations can be bridged to JDBC.
As a solution to your issue, you could try to create local views on your Oracle schema, based on the remote SQL server system views. Depending on your requirements, you can even create them as materialized views.
CREATE OR REPLACE VIEW sys_services
AS SELECT *
FROM sys.services#dblink;
and then query sys_services instead of directly querying sys.services#dblink

HSQLDB Manager?

I have tried SQLite in Java, but the speed is slow due to the JDBC driver. Then I tried HSQLDB and thought the speed is good, but I cannot find a good management tool for HSQLDB such as phpMyAdmin for MySQL or SQLite Manager for SQLite.
I'd like to use the manager tool to prepare the test data for unit tests, or use the manager tool to navigate the data after doing some small experiments.
Is there any good tool?
Here are a couple other suggestions you might checkout:
Squirrel SQL http://squirrel-sql.sourceforge.net/
Execute Query http://executequery.org/
Razor SQL (paid) http://www.razorsql.com/
Razor has the best feature set, but is paid. The others are good at different things and worth checking into.
This would only have meaning if you are running in HSQLDB server mode. If you are running in memory or file mode, then you either can't access the DB from another process or doing so would lock it.
In Server mode you could use any universal client. JDBC driver is the hsqldb.jar itself.
Actually HSQL brings its own management tool (which is not super). See http://hsqldb.org/doc/guide/apf.html
I've used Squirrel SQL. It's a universal client for any JDBC database.
See: http://squirrel-sql.sourceforge.net/

Resources