The CData JDBC Driver for Oracle implements JDBC standards that enable third-party tools to interoperate, from wizards in IDEs to business intelligence tools. This article shows how to connect to Oracle data with wizards in DBeaver and browse data in the DBeaver GUI.
Create a JDBC Data Source for Oracle Data
DBeaver is a free and open source database tool and can be used with the SAP HANA JDBC driver. The following steps demonstrate how to configure it to connect to SAP HANA Cloud or SAP HANA, express edition using the JDBC driver. Download and install the community edition of DBeaver. Create a new SAP HANA database connection. Supports JDK15, JDK14, JDK13, JDK12, JDK11, JDK10, JDK9, JDK8 and compliant to JDBC 4.3 and JDBC 4.2 by JDBC driver (ojdbc11.jar (21c only), ojdbc10.jar (19c only) and ojdbc8.jar) and Universal Connection Pool (ucp.jar). JDBC Reactive Extensions - A set of methods that extend the JDBC standard to offer asynchronous database access. DBeaver is one of the best free SQL IDE’s I’ve seen. It has a great UI, it’s fast, and the Projects feature is a helpful way of organising your files and related information. If you’re considering using DBeaver for your SQL work, you can’t go wrong with this choice.
Follow the steps below to load the driver JAR in DBeaver.
- Open the DBeaver application and, in the Databases menu, select the Driver Manager option. Click New to open the Create New Driver form.
- In the Driver Name box, enter a user-friendly name for the driver.
- To add the .jar, click Add File.
- In the create new driver dialog that appears, select the cdata.jdbc.oracleoci.jar file, located in the lib subfolder of the installation directory.
- Click the Find Class button and select the OracleOCIDriver class from the results. This will automatically fill the Class Name field at the top of the form. The class name for the driver is cdata.jdbc.oracleoci.OracleOCIDriver.
- Add jdbc:oracleoci: in the URL Template field.
Create a Connection to Oracle Data
Follow the steps below to add credentials and other required connection properties.
Dbeaver Hive Jdbc
- In the Databases menu, click New Connection.
- In the Create new connection wizard that results, select the driver.
- On the next page of the wizard, click the driver properties tab.
Enter values for authentication credentials and other properties required to connect to Oracle.
To connect to Oracle, you'll first need to update your PATH variable and ensure it contains a folder location that includes the native DLLs. The native DLLs can be found in the lib folder inside the installation directory. Once you've done this, set the following to connect:
- Port: The port used to connect to the server hosting the Oracle database.
- User: The user Id provided for authentication with the Oracle database.
- Password: The password provided for authentication with the Oracle database.
- Service Name: The service name of the Oracle database.
Built-in Connection String Designer
For assistance in constructing the JDBC URL, use the connection string designer built into the Oracle JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.oracleoci.jar
Fill in the connection properties and copy the connection string to the clipboard.
Below is a typical connection string:
jdbc:oracleoci:User=myuser;Password=mypassword;Server=localhost;Port=1521;
Query Oracle Data
You can now query information from the tables exposed by the connection: Right-click a Table and then click Edit Table. The data is available on the Data tab.
DBeaver Overview
DBeaver is a free, open source multiplatform database management tool and SQL client for developers and database administrators. DBeaver can be used to access any database or cloud application that has an ODBC or JDBC driver, such as Oracle, SQL Server, MySQl, Salesforce, or MailChimp. Devart DBeaver provides you with the most important features you'd need when working with a database in a GUI tool, such as:
- SQL queries execution
- Metadata browsing and editing
- SQL scripts management
- Data export/import
- Data backup
- DDL generation
- ER diagrams rendering
- Test data generation
- BLOB/CLOB support
- Database objects browsing
- Scrollable resultsets
The tool comes in two editions — Community and Enterprise. Enterprise Edition supports NoSQL databases, such as MongoDB or Cassandra, persistent query manager database, SSH tunneling, vector graphics (SVG) and a few other enterprise-level features. Note though that you can access a MongoDB database from DBeaver Community Edition using the respective Devart ODBC driver. For the purposes of this guide, we'll use the Community Edition of DBeaver to retrieve data from Oracle via the Open Database Connectivity driver.
Creating an ODBC Data Source to Use Oracle Data in DBeaver
- Click the Start menu and select Control Panel.
- Select Administrative Tools, then click ODBC Data Sources.
- Click on the System DSN tab if you want to set up a DSN name for all users of the system or select User DSN to configure DSN only for your account.
- Click the Add button and double-click Devart ODBC Driver for Oracle in the list.
- Give a name to your data source and set up the connection parameters.
- Click the Test Connection button to verify that you have properly configured the DSN.
Dbeaver Jdbc Url
When using ODBC driver for Oracle with DBeaver, SQL_WVARCHAR data types may be displayed incorrectly in DBeaver. To prevent this, you need to set the string data types to Ansi either in the Advanced Settings tab of the driver configuration dialog or directly in the connection string (String Types=Ansi) — all string types will be returned as SQL_CHAR, SQL_VARCHAR and SQL_LONGVARCHAR.
Connecting to Oracle Data from DBeaver via ODBC Driver for Oracle
Follow the steps below to establish a connection to Oracle in DBeaver.
- In the Database menu, select New Database Connection.
- In the Connect to database wizard, select ODBC and click Next.
- Enter the previously configured DSN in the Database/Schema field.
- Click Test Connection. If everything goes well, you'll see the Success message.
Viewing Oracle Database Objects and Querying Data
You can expand out the database structure in DBeaver's Database Navigator to visualize all the tables in Oracle database. To view and edit the data in a table, you need to right-click on the target table name and select View data.The content of the table will be displayed in the main workspace.
Dbeaver Jdbc Download
If you want to write a custom SQL query that will include only the necessary columns from the table, you can select New SQL Editor in the SQL Editor main menu. Create your query and run it by clicking Execute SQL Statement to view the results in the same window.
Dbeaver Jdbc Driver Error
© 2015-2021 Devart. All Rights Reserved. | Request Support | ODBC Forum | Provide Feedback |