> For the complete documentation index, see [llms.txt](https://docs.tessell.com/tessell/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tessell.com/tessell/database-engines/tessell-for-oracle/database-connections-using-ssl-tls/mac-platform.md).

# Mac platform

This guide covers two methods for connecting to a Tessell Oracle database service over SSL/TLS on macOS: SQL Developer (JDBC/JKS) and Python.

***

## How do I connect using SQL Developer?

1. Download [SQL Developer](https://www.oracle.com/database/sqldeveloper/).
2. Download the SSL/TLS certificate from **My Services → Overview → CA Certificate**.
3. Import the certificate into a JKS keystore:

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

4. Open `~/.sqldeveloper/22.2.1/product.conf` and add the JKS path to the SQL Developer JVM options:

```
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 SQL Developer.
6. Add a new connection and configure it for TCPS:

<div align="center"><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2Fgit-blob-b34a54186122860304826ea1f9ac04e41603a810%2Fimage%20(3).png?alt=media" alt="" width="800"></div>

<p align="center"><em>Figure 1 — SQL Developer new connection dialog with TCPS settings</em></p>

7. Set the **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 by running:

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

<div align="center"><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2Fgit-blob-bb860e235bb7225a935c33c2132ecb2b34b12648%2Fimage%20(5).png?alt=media" alt="" width="800"></div>

<p align="center"><em>Figure 2 — Verification query confirming TCPS protocol</em></p>

***

## How do I connect using Python?

### Mac x86

The setup is identical to the [Linux platform guide](/tessell/database-engines/tessell-for-oracle/database-connections-using-ssl-tls/linux-platform.md).

### Apple M\* Chip

The latest Oracle Instant Client libraries are not available for Apple M\* (ARM). You must run under Rosetta to use x86\_64 libraries.

#### Step 1 — Install tools (Rosetta terminal)

1. Download Mac x86 Oracle Instant Client from [Oracle Instant Client Downloads (macOS Intel x86)](https://www.oracle.com/cis/database/technologies/instant-client/macos-intel-x86-downloads.html) and unzip it.
2. Download and unzip [SQLcl](https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/).

#### Step 2 — Set up Oracle wallet

Follow the same wallet setup steps as the [Linux platform guide](/tessell/database-engines/tessell-for-oracle/database-connections-using-ssl-tls/linux-platform.md).

> SQL\*Plus steps are also the same as Linux — ensure you run the x86 `sqlplus` client from a Rosetta-enabled terminal.

#### Step 3 — Connect using Python (Rosetta terminal)

```python
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()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tessell.com/tessell/database-engines/tessell-for-oracle/database-connections-using-ssl-tls/mac-platform.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
