- 2 minutes to read
- Print
- DarkLight
- PDF
How to start a Database Proxy Oracle session with DBeaver on Linux
- 2 minutes to read
- Print
- DarkLight
- PDF
This article will guide you through a step-by-step process on how to use the DBeaver manager in a Database Proxy session on Linux.
Database Proxy has a default limit of 2.000 simultaneous connections. This can be changed, but there will be a significant provisioning increase in memory, taking into account that each connection slot uses around 64kb of memory. To make this increase, contact the support team.
This process consists of configurations on the database connection and the application. Follow the steps according to the Oracle database configuration document.
Requirements
- Download the latest version of Instant Client - Instant Client
- Download the latest version of Oracle SQLcl - Oracle sqlcl
- Download the latest version of DBeaver - Dbeaver
Create tnsnames.ora and sqlnet.ora files
- Instant Client and SQLcl files must be unpacked into a common directory. For example, the Instant Client files will be in /home/user1/instantclient_21_11/ and the SQLcl files will be in /home/user1/sqlcl/.
- After that, the user should create a directory called oracle_files.
- Create the tnsnames.ora and sqlnet.ora files inside the directory oracle_files.
- Add the following content inside the tnsnames.ora:
Make sure to replace the following fields with the correct information.
- HOST: add the senhasegura hostname or IP address.
- USERNAME: user's username to log in to senhasegura.
- CREDENTIAL: credential used to access the Oracle DB.
- DEVICE: Oracle DB hostname or IP address.
- PORT: port used for SSL connection to the Oracle DB.
"oraproxytcps":
oraproxytcps=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCPS)
(HOST=SENHASEGURA_IP)
(PORT=2484))
)
(CONNECT_DATA=
(SENHASEGURA=
(USERNAME=USERNAME_SENHASEGURA)
(CREDENTIAL=ORACLE_SENHASEGURA_CREDENTIAL)
(DEVICE=DEVICE_HOSTNAME)
(PORT=ORACLEDB_PORT)
(TOTP=0000))
(SERVER=DEDICATED)
(SERVICE_NAME=INFO)
)
Add the following content inside the sqlnet.ora:
In METHOD_DATA
make sure to replace it with the user wallet location.
WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = USER_WALLET_LOCATION))) SQLNET.AUTHENTICATION_SERVICES = (TCPS) SSL_CLIENT_AUTHENTICATION = TRUE
After acquiring the Instant Client files, SQLcl, and creating the tnsnames.ora and sqlnet.ora files, the user must declare two environment variables on their device. The variables are:
LD_LIBRARY_PATH
= path of the Instant Client directoryTNS_ADMIN
= path of the tnsnames.ora and sqlnet.ora files
Configure the DBeaver app
After declaring the environment variables, the user can open DBeaver. For the connection to be of the custom type, follow the next steps:
- Open the DBeaver app.
- On the main screen, in the left top corner, click on the icon represented by the plug and the plus sign.
- On the pop-up window that opens, Connect to a database, select Oracle.
- Click Next.
- At the Main > Custom tab fill in the filed with the information:
- JDB URL Template:
jdb:oracle:oci:/@oraproxytcps
- JDB URL Template:
- Click on Driver Settings, to replace the default library for the ones acquired at Instant Client and for the oraclepki.jar file, found in the SQLcl directory.
- At Libraries tab, add the files.
- Click OK.
Once this is done, the user can connect to the Oracle database through the senhasegura Database Proxy.
Next:
How to start a Database Proxy Oracle session with DBeaver on Windows
Oracle database configuration
Do you still have questions? Reach out to the senhasegura Community.