# Create an Oracle data source using Wallet and OCI

Procedure: Enable the Database Tools and SQL plugin

This functionality relies on the  Database Tools and SQL plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

> **Note:**
> Database Tools and SQL functionality support is limited in IntelliJ IDEA without the Ultimate subscription.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.

Procedure: Official documentation and software

* For full information about Oracle, refer to [the official documentation](https://docs.oracle.com/en/database/oracle/oracle-database/).

* To download Oracle database software, refer to [the official software downloads](https://www.oracle.com/in/database/technologies/oracle-database-software-downloads.html).

* For more versions of Oracle JDBC driver, refer to [the official JDBC driver downloads](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html).

* Download the following Oracle Instant Client (OCI) packages for your operating system from [the Oracle Instant Client Downloads page at oracle.com](https://www.oracle.com/database/technologies/instant-client/downloads.html):

1. Basic Package

2. SQL*Plus Package

3. JDBC Supplement Package

* Download `oraclepki.jar` from [Oracle Database 12.2.0.1 JDBC Driver &amp; UCP Downloads page at oracle.com](https://www.oracle.com/database/technologies/jdbc-ucp-122-downloads.html).

* Prepare a ZIP archive with wallet files.  For more information about downloading a wallet, refer to  [Download Client Credentials (Wallets) at docs.oracle.com](https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/connect-download-wallet.html).

IntelliJ IDEA uses JDBC drivers to connect to the Oracle server through the TNS protocol. The following driver modes are available:

* In Thin mode, the JDBC driver always connects to the TNS listener. In this mode, various versions of the JDBC driver can be used.

* In OCI mode, the JDBC driver uses native libraries. In this case, the JDBC driver's version must be the same as the version of these native libraries.

Oracle Wallet is a set of files that stores all the user credentials such as certificates, certificate requests, and private keys. You can create a wallet by using the Oracle tooling or ask your Oracle server administrator to generate the wallet. For more information about wallets, refer to [Creating and Managing Oracle Wallet](https://docs.oracle.com/middleware/1213/wls/JDBCA/oraclewallet.htm) .

## Requirements

* Running Oracle Cloud instance with access permissions for your user.

* Oracle Wallet.

## Creating the Oracle Cloud data source

As an example of directories, for this tutorial we will use the following ones:

* Downloaded packages are extracted at `~/Oracle/instantclient_19_8/`.

* `oraclepki.jar` is stored at `~/Oracle/instantclient_19_8/`.

* Wallet files are stored at `~/Oracle/instantclient_19_8/network/wallet` and include the configured `tnsnames.ora` and `sqlnet.ora` ones.

Procedure: Step 1. Prepare a driver for the OCI connection

1. Open data source properties by doing one of the following:

* On the Database tool window toolbar, click ![The Data Sources icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.manageDataSources.svg) Data Sources.

* Press `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) .

![Open the Data Source and Drivers dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/open_data_sources_and_drivers_dialog.png)

2. In the Data Sources and Drivers dialog, click the Drivers tab.

3. In the list of drivers, right-click the Oracle driver and select Duplicate.

4. Change the name of the duplicated Oracle driver (for example, `Oracle [Cloud, OCI]`).

5. In the Driver Files pane, click the Add icon (![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg)) and select Native Library Path….

6. In the file browser, navigate to the directory of the Instant Client files (in this tutorial, `~/Oracle/instantclient_19_8`) and click Open.

> **Note:**
> Versions of the driver and the instant client must be the same. For example, if you use the Oracle driver 19.8.0.0, the instant client must be of the same version. Otherwise, you will receive an error that the native library cannot be loaded.

7. You can use the IntelliJ IDEA provided driver or the ones provided with Instant Client.

IntelliJ IDEA provided driver:

Change the file version so that it is the same with the Instant Client version.

![Driver file versions list for the IDE provided driver](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_oracle_oci_wallet_ide_driver.png)

Instant Client provided driver files:

1.  In the Driver Files pane, click the Add icon (![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg)) and select Custom JARs….

2.  In the file browser, navigate to the directory with the Instant Client files (in this tutorial, `~/Oracle/instantclient_19_8`).

3. In the directory, select the following files: `ojdbc8.jar`, `orai18n.jar`, and `oraclepki.jar`.

4. Click Open.

![Driver files provided with the Instant CLient](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_oracle_oci_wallet_instant_client_driver_files.png)

Procedure: Step 2. Create the Oracle Cloud data source

To connect to a database, create a data source that will store your connection details.

1. Select the data source you want to create. You can do this using one of the following ways:

* In the main menu, go to `File | New | Data Source` and select Oracle.

* In the Database tool window , click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar. Navigate to Data Source and select Oracle.

![Create a new data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create_new_data_source.png)

2. From the Connection type list, select TNS.

3. From the Driver list, select OCI.

4. Click the Driver link and select the driver entry that you created on [Step 1](#step_1_preparing_drivers_for_the_oci_connection) (in our case, Oracle [Cloud, OCI]).

5. In the TNSADMIN field, click the browse button and navigate to the directory with the Instant Client files (in our case, `~/Oracle/instantclient_19_8/network/admin`).

6. In the TNS name field, use the automatic completion (`Ctrl+Space` (Windows), `⌃ Space` (macOS), `⌃ Space` (IntelliJ IDEA Classic (macOS)), `⌃ Space` (macOS System Shortcuts), `Ctrl+Space` (XWin), `Ctrl+Space` (GNOME), `Ctrl+Space` (KDE), `Alt+/` (Emacs), `Ctrl+Space` (Sublime Text), `⌃ Space` (Sublime Text (macOS)), `Ctrl+Space` (NetBeans), `Ctrl+Space` (Visual Studio), `⌃ Space` (Visual Studio (macOS)), `Ctrl+Space` (Eclipse), `⌃ Space` (Eclipse (macOS))) to select which service name to use (see a value of an alias in the `tnsnames.ora` wallet file).

7. Specify credentials for the Oracle user.

8. Ensure that the database connection can be established using the provided details. To do this, click the Test Connection  link at the bottom of the connection details section.

![Test Connection link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_test_connection_link.png)

If you encounter any connection issues, refer to the [Cannot connect to a database](connectivity-problems.html) page.

9. (Optional) By default, only the default    schema is   introspected and available to work with. If you also want to work with other     schemas  , in the Schemas tab, select them for the introspection.

![Schemas tab of the Data Sources and Drivers dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_schemas_tab.png)

10. Click OK to create the data source.

11. Find your new data source in the    Database   tool window   .

* For more information about the Database tool window , see the corresponding [reference topic](database-tool-window.html). > **Tip:** > To see more schemas under your new data source node, click the N of M button and select the ones you need. IntelliJ IDEA will introspect and show them. > > > > ![Select databases and schemas to introspect and display in the Database tool window](https://resources.jetbrains.com.cn/help/img/idea/2026.2/connection_flow_show_databases_and_schemas.png)

* For more information about working with database objects in IntelliJ IDEA, refer to [Database objects](database-objects.html).

* To write and run queries, open the default [query console](query-consoles.html) by clicking the data source and pressing `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (NetBeans), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F12` (Eclipse), `F3` (Eclipse (macOS)).

* To view data of a database object, open [Data editor and viewer](data-editor-and-viewer.html) by double-clicking the object.

![Create the Oracle Cloud data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_create_the_oracle_cloud_wallet_connection.png)

## See also

### Reference

[Data sources and their elements](database-tool-window.html#icons-for-data-sources-and-their-elements) [Data Sources and Drivers dialog](data-sources-and-drivers-dialog.html)

### Tool Windows

[Database tool window](database-tool-window.html)

