Connecting to Oracle NoSQL Database from Visual Studio Code
Oracle NoSQL Database Visual Studio (VS) Code extension provides two methods to connect to Oracle NoSQL Database. You can either provide a config file with the connection information or fill in the connection information in the specific fields.
- In Visual Studio Code, click the Oracle NoSQL DB view
in the Activity Bar.
- Open the Oracle NoSQL DB Show Connection Settings page
from the Command Palette or the Oracle NoSQL DB view in the
Activity Bar.
- Open from Command Palette
- Open the Command Palette by pressing:
- (Windows and Linux) Control + Shift + P
- (macOS) Command + Shift + P
- From the Command Palette, select OracleNoSQL: Show Connections
Settings.
Tip:
Enter oraclenosql in the Command Palette to display all of the Oracle NoSQL DB commands you can use.
- Open the Command Palette by pressing:
- Open from Oracle NoSQL DB View
- Expand the Table Explorer pane in the left navigation if it's collapsed.
- Click Add Connection to open the Oracle NoSQL DB Show Connection Settings page.
- Open from Command Palette
- In the Show Connection Settings page, click Onprem to connect to Oracle NoSQL Database.
- Enter the connection information.
Table 5-7 Oracle NoSQL Database Connection Parameters
Field Description Endpoint: Service URL of the Oracle NoSQL Database Proxy. - http://<proxy_host>:<proxy_http_port>
- https://<proxy_host>:<proxy_https_port>
- http or https indicates the store security. For a secure KVStore, the proxy URL begins with https.
- proxy_host is the host name of the machine to host the Oracle NoSQL Database Proxy service. For more information, see Configuring the Proxy.
Security: Select SSL for secure KVStores. In case you are creating the connection to a non-secure KVStore, select None. The default value is None.
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 SSL for the Security parameter. Certificate File: Browse to the location of the SSL certificate file (for example, certificate.pem
). See Using the Proxy in a secure data store. - Click Connect.
- Click Reset to clear the saved connection details from the workspace.
- Create the config file, for example, config.json or a file with the JSON
object. The config file format for connecting to Oracle NoSQL Database is as shown
below.
Table 5-8 Configuration Templates
Secure KVStore Non-secure KVStore Configuration template to connect using OCI configuration file
Configuration template to connect using authentication credentials{ "serviceType": "KVSTORE", "endpoint": "<service-URL-of-Oracle-NoSQL-Database-Proxy>", "auth": { "kvstore": { "configFile": "<path-to-OCI-config-file>" } } }
{ "serviceType": "KVSTORE", "endpoint": "<service-URL-of-Oracle-NoSQL-Database-Proxy>", "auth": { "kvstore": { "user": "<username>", "password": "<password>" } } }
{ "serviceType": "KVSTORE", "endpoint": "<service-URL-of-Oracle-NoSQL-Database-Proxy>" }
- Open the Command Palette by pressing:
- (Windows and Linux) Control + Shift + P
- (macOS) Command + Shift + P
- From the Command Palette, select Oracle NoSQL: Connect via Config
File.
Tip:
Enter oraclenosql in the Command Palette to display all of the Oracle NoSQL DB commands you can use. - Browse to the location where the
*.config
file is stored and click Select.
Note:
When you want to connect to a on-premise secure cluster using Visual Studio Code Extension, you need to do one of the following if you have self-signed certificates:- Add the self-signed certificate to the trusted root store in your Windows configuration (using Microsoft Management Console)).
- Open Visual Studio Code. Go to File > Preferences > Settings > Application > Proxy. In the Proxy Support menu select off.