Connecting to Oracle NoSQL Database from IntelliJ
Learn how to connect your NoSQL project to Oracle NoSQL Database the data store using the IntelliJ plugin.
- The data store is deployed and running.
- The Oracle NoSQL Database Proxy is started. See Configuring the Proxy. Starting the release 19.5, Proxy is bundled along with the Oracle NoSQL Database download package.
- Open your NoSQL project in IntelliJ.
- Click the task icon
in the Schema Explorer window to open the
Settings dialog for the plugin. - Expand Tools > Oracle NoSQL in the Settings Explorer, and click Connections. You can view all the existing connections for the on-premises profile type under the Connections dropdown.
- Select Onprem from the drop-down menu for the Profile type.
- Click Add Connection. Enter values for the following
connection parameters and select ADD. A prompt appears
asking for approval to connect to the selected profile and target. Select
Yes to proceed. Then select OK.
Note:
If you deny approval, the connection is canceled before any network request is made. The approval prompt may also display warnings when the target is a localhost, private-network, or link-local address.Table 1-1 Connection Parameters
Parameter Description Connection Name A unique name, that is given to a specific connection specification is mandatory from the plugin version 1.5.1. Updating the Connection Name field is recommended after upgrading the plugin from version 1.4.0 or lower. Note:
You can add multiple connections and the stored connection specifications are persistent.Proxy URL http://<proxy_host>:<proxy_http_port>orhttps://<proxy_host>:<proxy_http_port>where:httporhttpsindicates the store security. For a secure data store, the proxy URL begins withhttps.proxy_hostis the host name of the machine to host the proxy service. This should match the host you configured earlier.
Note:
- The proxy URL can use either http or https scheme.
- The proxy URL must include a host name.
- The proxy URL must not contain embedded credentials.
- Enter the proxy credentials in the Username and Password fields and not in the proxy URL.
Namespace Provide the name of your namespace. This is optional. If no value is provided then the default namespace sysdefaultis used.Note:
You can add one or more namespaces to your store, create tables within them, and grant permission for users to access namespaces and tables.Security Select SSL for secure data store. In case, you are creating connection to a non-secure KVStore, select None. The default value is SSL. Note:
In case of secure data store, the proxy URL must begin withhttps.Username User name to connect to the secure store. This value is required only if you select SSL for the Security parameter. Password Password to connect to the secure store. This value is required only if you select SSLfor the Security parameter.Note:
- Sensitive values are stored securely in IntelliJ Password Safe. For more information, see Password settings.
- The project configuration stores references to credentials only. Sensitive values are not stored in project files.
- To update passwords or passphrases, navigate to Settings -> Tools -> Oracle NoSQL -> Connections.
TrustStore Browse to the location where the certificate trust file is placed. See Using the Proxy in a secure data store. Note:
- The Trust Store settings apply only to Oracle NoSQL Database connections created by the IntelliJ plugin.
- These settings do not affect the JVM-wide trust configuration used by IntelliJ IDEA.
Passphrase Give a value for the passphrase. A passphrase refers to a secret used to protect an encryption key. This is optional. Note:
- Starting with version 1.5.4, the IntelliJ plugin automatically downloads the latest Oracle NoSQL Java SDK and sets the SDK path when creating a connection.
- If you are updating the plugin from version 1.4.0 or lower, all the stored connections migrate to the new version. In this case, the Connection Name will be the same as Proxy URL. Follow the below step to change the Connection Name.
- The IntelliJ Plugin saves the connection details under the specified connection
name, connects your project to the Oracle NoSQL Database data store, and
displays the database schema in the Schema Explorer
window.
The connection will be displayed in the NoSQL tool window in the following format:
Connection Name:Proxy URL:Namespace(if specified). - To modify the connection details, navigate to the Tools > Oracle
NoSQL > Connections window, select the connection name from the
Connections drop-down. Click Modify
Connection. You can change any of the connection parameters
(mentioned above) and click OK to save the settings. To remove a connection name from the plugin, choose the connection name and click Delete Connection. Once you confirm the action to delete, the connection name is removed from the plugin.
- To reconnect to a data store, use either of the following methods:
-
Option 1: Select a connection manually
Click the Web icon in the Schema Explorer, select the required connection from the list, and click OK. The IntelliJ plugin reconnects your project to the selected Oracle NoSQL Database data store and displays its schema in the Schema Explorer.
-
Option 2: Refresh the last active connection
Click Refresh in the Schema Explorer, or right-click the connection and select Refresh Schema. This reconnects to the last active connection.
Note:
The IntelliJ plugin no longer automatically reconnects to the last active connection when a project or the Schema Explorer opens. To establish a connection, use one of the methods described above. -
- Click the Database icon in the Schema Explorer. A calculator tool is opened in a new window. This advanced tool provides values for cache size, storage size and the number of shards based on the provided inputs. These numbers are useful when doing capacity planning. See the Capacity Planning section in the Administrator's Guide for additional information.
- In the Je Cache Size Calculator panel, enter the values in bytes for Primary Key Size, Row Size, and Index (this is optional), along with the number of rows. Click Add Table to add values for another table.
- Click CALCULATE to view the output values. To start a new calculation, click New Calculation.
After you successfully connect your project to your Oracle NoSQL Databasedata store, you can manage the tables and data in your schema.