Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 94397ca

Browse files
add description of the project
1 parent 1f002ff commit 94397ca

File tree

1 file changed

+85
-1
lines changed

1 file changed

+85
-1
lines changed

README.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,87 @@
11
# JDBC Proxy for SQL Developer
22

3-
JDBC Proxy Driver
3+
## Introduction
4+
5+
This JDBC driver is mimicking a MySQL driver. As a result it can be configured as third party JDBC driver in [Oracle SQL Developer](https://www.oracle.com/database/technologies/appdev/sqldeveloper-landing.html) to access the following databases:
6+
7+
- [Snowflake](https://www.snowflake.com/)
8+
- [PostgreSQL](https://www.postgresql.org/)
9+
- [SQLite](https://www.sqlite.org/index.html)
10+
- [H2](https://www.h2database.com/html/main.html)
11+
- [MySQL](https://www.mysql.com/)
12+
13+
SQL Developer provides a reduced functionality for non Oracle Databases. This driver allows you to connect to these databases and use the features for MySQL within SQL Developer.
14+
15+
## What Does the JDBC Proxy Besides Delegating Calls?
16+
17+
The proxy driver rewrites some SQL statements to the SQL dialect of the target database. This ensures that the statements executed during navigation in the Connections window are understood by the target driver, and a meaningful result is returned.
18+
19+
The rewritten SQL is processed by the target JDBC driver, and the result is presented by SQL Developer which thinks it is talking to a MySQL database.
20+
21+
## Releases
22+
23+
Binary releases are published [here](https://github.com/Trivadis/sqldev-jdbc-proxy/releases).
24+
25+
## Installation
26+
27+
1. Download the driver (e.g. `jdbc-proxy-0.1.0.zip` from the [release page](https://github.com/Trivadis/sqldev-jdbc-proxy/releases))
28+
2. Unzip the downloaded file in a folder of your choice
29+
3. Register the `jdbc-proxy-0.1.0.jar` file in the "Third Party JDBC Drivers" section of the SQL Developer preferences as shown in the following screenshot
30+
31+
![SQL Developer Preferences](images/sqldev-preferences.png)
32+
33+
Please ensure that the proxy driver is the first driver in the list. Restart SQL Developer, if you had to change the order of the JDBC drivers.
34+
35+
## Using the Driver
36+
37+
The full syntax of a JDBC URL supported by the JDBC proxy driver looks as follows:
38+
39+
```
40+
jdbc:mysql:<target-jdbc-url>:[<port>]/[database]
41+
```
42+
43+
This looks like a MySQL JDBC URL, because the proxy driver is mimicking a MySQL JDBC driver. However, the part which contains the `hostname` in an original MySQL URL contains now a <target-jdbc-url>. This <target-jdbc-url> has to be entered in the "Hostname" field of the "New / Select Database Connection" dialog in SQL Developer.
44+
45+
![SQL Developer New Database Connection](images/sqldev-connect.png)
46+
47+
Only the values for "Username", "Password" and "Hostname" are used for build the JDBC URL. Therefore, you have to provide everything you need as URL parameters. Here are some examples for "Hostname" values:
48+
49+
| Target Database | JDBC URL (in Hostname) | Notes |
50+
| --------------- | ---------------------- | ----- |
51+
| [Snowflake](https://docs.snowflake.com/en/user-guide/jdbc-configure.html#connection-parameters) | jdbc:snowflake://\<account\>.snowflakecomputing.com:443/?db=toucan_db&warehouse=toucan_wh&schema=toucan_schema&role=training_role | Properties `db`, `warehouse`, `schema` and `role` are set in the URL. |
52+
| [PostgreSQL](https://jdbc.postgresql.org/documentation/head/connect.html) | jdbc:postgresql://localhost:5432/postgres | No additional properties configured. |
53+
| [SQLite](https://github.com/xerial/sqlite-jdbc) | jdbc:sqlite:/Users/phs/sqldev_sqlite.db | No additional properties supported. |
54+
| [H2](http://www.h2database.com/html/tutorial.html?highlight=JDBC_URL&search=jdbc#connecting_using_jdbc) | jdbc:h2:/Users/phs/h2testphs | No additional properties supported. |
55+
| [MySQL](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html) | jdbc:mysql://localhost:3306/public?zeroDateTimeBehavior=CONVERT_TO_NULL | Property `zeroDateTimeBehavior` is set in the URL. The default is EXCEPTION, which is overridden by SQL Developer. |
56+
57+
## Issues
58+
Please file your bug reports, enhancement requests, questions and other support requests within [Github's issue tracker](https://help.github.com/articles/about-issues/).
59+
60+
* [Questions](https://github.com/Trivadis/sqldev-jdbc-proxy/issues?q=is%3Aissue+label%3Aquestion)
61+
* [Open enhancements](https://github.com/Trivadis/sqldev-jdbc-proxy/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement)
62+
* [Open bugs](https://github.com/Trivadis/sqldev-jdbc-proxy/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
63+
* [Submit new issue](https://github.com/Trivadis/sqldev-jdbc-proxy/issues/new)
64+
65+
## How to Contribute
66+
67+
1. Describe your idea by [submitting an issue](https://github.com/Trivadis/sqldev-jdbc-proxy/issues/new)
68+
2. [Fork the utPLSQL-SQLDeveloper repository](https://github.com/Trivadis/sqldev-jdbc-proxy/fork)
69+
3. [Create a branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/), commit and publish your changes and enhancements
70+
4. [Create a pull request](https://help.github.com/articles/creating-a-pull-request/)
71+
72+
## How to Build
73+
74+
1. [Download](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) and install SQL Developer 20.2.0
75+
2. [Download](https://maven.apache.org/download.cgi) and install Apache Maven 3.6.3
76+
3. [Download](https://git-scm.com/downloads) and install a git command line client
77+
4. Clone this repository
78+
5. Open a terminal window in the project's root folder and run the maven build:
79+
80+
mvn -Dsqldev.basedir=/Applications/SQLDeveloper20.2.0.app/Contents/Resources/sqldeveloper -DskipTests=true clean package
81+
82+
Amend the parameter sqldev.basedir to match the path of your SQL Developer installation. This folder is used to reference Oracle jar files which are not available in public Maven repositories.
83+
6. The resulting file ```jdbc-proxy-x.x.x-SNAPSHOT.zip``` in the ```target``` directory contains the proxy and all target JDBC drivers.
84+
85+
## License
86+
87+
JDBC Proxy for SQL Developer is licensed under the Apache License, Version 2.0. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>.

0 commit comments

Comments
 (0)