Mac platform

Connect using SQL developer tool

  1. Download the SQL Developer.

  2. Download SSL certificate from Service Overview page.

  3. Import crt/pem to JKS file.

    keytool -import -alias testalias -file TessellCA.crt -keypass keypass -keystore test.jks -storepass test@123

  4. Update JKS path in SQL Developer JVM command-line

    File path ~/.sqldeveloper/22.2.1/product.conf

    AddVMOption -Djavax.net.ssl.trustStore=/Users/<user>/Desktop/test.jks AddVMOption -Djavax.net.ssl.trustStoreType=JKS AddVMOption -Djavax.net.ssl.trustStorePassword=test@123

  5. Restart the SQL Developer.

  6. Add a new connection and select options like below.

  7. Add Custom JDBC url.

    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(PORT=1521)(HOST=oraclesi19c<service name>-ppmno.qabyoaupg001.tsl-barc.cloud))(CONNECT_DATA=(SERVICE_NAME=orcl))(SECURITY=(ssl_server_cert_dn="CN=oraclesi19c<service name>-ppmno.qabyoaupg001.tsl-barc.cloud")))

  8. Verify the connection mode.

    SELECT sys_context('USERENV', 'NETWORK_PROTOCOL') as network_protocol, sys_context('USERENV', 'AUTHENTICATION_METHOD') as authentication_method FROM dual;

Connect using python code

x86 platform

The steps are same as Linux setup.

Apple M* Chip

Tools/Lib

Latest Oracle instant libraries are not available for Apple M* platform so we have to use Rosetta to use x86_64 libraries.

Run the terminal with Rosetta support

Setup oracle wallet

Steps are same as Linux.

Now you can connect to DB using either sqlplus or python. sqlplus steps are same as Linux but make sure you run x86 sqlplus client from Rosetta enabled terminal.

Connect using Python (Rosetta enabled terminal)

import oracledb
import cryptography
import os

cs = '''<user>/<password>@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCPS)(HOST = oraclessl<service name>dnd-efwyu.qarel.tsl-barc.cloud)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = <service name>))(SECURITY = (SSL_SERVER_CERT_DN = "CN=oraclessl<service name>dnd-efwyu.qarel.tsl-barc.cloud")))'''

oracledb.init_oracle_client(lib_dir="/Users/<user>/orainscli/instantclient_19_8/")

connection = oracledb.connect(user="<user>", password="<password>", dsn=cs)

cursor = connection.cursor()

cur = cursor.execute("SELECT sys_context('USERENV', 'NETWORK_PROTOCOL') as network_protocol, sys_context('USERENV', 'AUTHENTICATION_METHOD') as authentication_method FROM dual")

print(cur.fetchall())

connection.close()

Last updated

Was this helpful?