> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Teradata

> Browsing databases and objects on Teradata Vantage, with TLS and transaction mode

Port `1025` carries a plain session. Any SSL mode moves the session to `443`, where it runs over the gateway's WebSocket endpoint, and that port cannot be changed. A native Swift driver handles both, with no client library to install.

![Teradata connection form](https://mintcdn.com/ngquct/FB2Hwln-q0zbvy6a/images/teradata-connection-form.png?fit=max\&auto=format\&n=FB2Hwln-q0zbvy6a\&q=85\&s=6003e0ab3cea428e171bebad6e0b52a7)

The Teradata connection form

## Quick setup

Click **New Connection…**, select **Teradata**, enter the host, username, and password, and click **Save & Connect**. Any Vantage system that accepts a TD2 logon works; no version is checked.

The Teradata driver is not in the app. Picking Teradata in the **Choose a Database** sheet offers the
download before the form opens, and opening a saved Teradata connection installs it without asking.
See [Plugins](https://docs.tablepro.app/features/plugins.md).

## Connection settings

| Field | Description |
| - | - |
| **Host** | Teradata database hostname |
| **Port** | Plain gateway port, default `1025` |
| **Database** | Default database after logon. Optional; empty uses your account's default |
| **Username / Password** | Teradata credentials |
| **Logon Mechanism** | **Advanced** pane. `TD2` or `TDNEGO`, uppercase. Default `TD2` |
| **Transaction Mode** | **Advanced** pane. `DEFAULT`, `ANSI`, or `TERA`, uppercase |
| **SSL Mode** | **SSL/TLS** pane. **Disabled** by default |

Leave **Transaction Mode** on `DEFAULT`, which takes whatever the system is configured for, unless a script needs `ANSI` or `TERA` case sensitivity and commit rules on the session. With `DEFAULT`, the mode the session got is read from `HELP SESSION` at logon. In an `ANSI` session a save commits with `COMMIT WORK` and sends no `BT` or `ET`, and a save never commits or rolls back changes you ran in the editor and have not committed yet. A system reachable only through a bastion works over an [SSH tunnel](https://docs.tablepro.app/connections/ssh-tunneling.md).

## Connection URL

```text theme={null}
teradata://user:password@host:1025/database
```

**Import from URL…** accepts the scheme; macOS does not route `teradata://` links. See [Connection URL Reference](https://docs.tablepro.app/connections/urls.md).

## Databases and objects

A database and a user are both namespaces in Teradata, and both appear as top-level databases in the sidebar with their tables and views inside. A tab bound to a second database keeps the same session: `DATABASE "name"` runs ahead of its statements instead of a reconnect. A switch to another database is refused while a transaction is open, because Teradata takes nothing but `COMMIT` or `ET` after `DATABASE` inside one. **Truncate** runs `DELETE FROM name ALL`.

Identifiers are quoted with double quotes. Teradata has no `LIMIT`, so a table's first page comes back with `TOP` and later pages with `QUALIFY ROW_NUMBER()`.

## Stopping a query

**Stop** keeps the session. A statement still running is aborted, and Teradata rolls back the transaction it ran in. With **Transaction Mode** set to `ANSI`, that is every change since the last `COMMIT`, and the tab says so. In `TERA` mode it is the statement alone, or every change since `BT` when one is open. On `DEFAULT` and `TERA` the tab shows no notice, even on a system that runs ANSI by default. A result already coming back is cut where it is, and nothing is rolled back.

## Transactions

In an `ANSI` session every statement joins one transaction, which only `COMMIT` or `ROLLBACK` ends, and a DDL statement has to be the last in it. While it holds changes, the transaction bar above the tabs offers **Commit** and **Roll Back**.

* A structure save, **Create Table**, a comment, a rename, a sidebar drop and the new table of an import commit each statement as it runs. On the session that runs your queries they are refused while a transaction is open there: commit or roll it back first.
* **Run All** stops after a DDL statement while a transaction is open, unless the next statement is `COMMIT`, `ROLLBACK`, `ABORT` or `ET`. What ran stays in the transaction. Click **Commit** in the transaction bar, then run the rest.
* A `DATABASE` statement in **Run All** is committed as it runs when nothing else is pending, so the rest of the script runs there. While a transaction is open, the run stops before it: commit or roll back, then run the script again from that statement. A new run starts in the tab's database.
* Startup commands are committed once they have run.
* In `TERA` mode a statement outside `BT` commits on its own. Inside `BT`, **Run All** stops after DDL the same way, because any statement but `ET` there rolls back the whole block: commit, then begin the rest with `BT`. A script that holds `BT` runs as written, with no transaction of the app's own around it.

## SSL/TLS

| Mode | What happens |
| - | - |
| **Disabled** | Plain session on the gateway port |
| **Preferred** | TLS on `443`, falling back to a plain session on `1025` when the HTTPS port is unreachable |
| **Required (skip verify)** | TLS, certificate not checked |
| **Verify CA** | Certificate chain checked against the file in **CA Certificate**, hostname not checked. Refused without a CA certificate |
| **Verify Identity** | Chain and hostname checked, against **CA Certificate** when set and the system trust store otherwise |

A **CA Certificate** path that does not hold a readable certificate refuses the connection in both verify modes.

Test TLS on **Required (skip verify)** rather than **Preferred**, or a failed handshake looks like a successful connect.

## Limitations

* Foreign keys are never listed. The Structure tab's Foreign Keys section stays empty for Teradata; read the constraints from its DDL tab instead.
* Macros and stored procedures are not in the sidebar. Query them from the editor.
* LDAP, Kerberos, and JWT logon fail before the connect is attempted. Use `TD2` or `TDNEGO`.
* The TLS port is fixed at `443`.
* A `NUMBER`, `BLOB`, `CLOB`, `JSON`, `XML` or `PERIOD` column cannot be read yet. `CAST` it to `DECIMAL` or `VARCHAR` in the query.
* A structure save with several changes commits them one at a time, so a change that fails leaves the ones before it in place. Check the Structure tab and save the rest again.
* With **Transaction Mode** on `DEFAULT` and a session whose mode `HELP SESSION` and `DBC.SessionInfoV` could not report, nothing is committed for you after DDL and **Run All** does not stop. Set the mode to `ANSI` or `TERA` to match the system.

## Troubleshooting

### unsupported: logon mechanism …; only TD2 and TDNEGO are supported

**Logon Mechanism** holds something the driver does not implement. Set it to `TD2` or `TDNEGO`. A value the driver does not recognize, a mechanism typed in lowercase included, is read as `TD2` instead.

### Cannot reach the server

The connect gives up when the connection's **Connect Timeout** expires; an empty field on the
**Advanced** pane uses 30 seconds. Confirm the host, and that port `1025` is open from your network, or
`443` if an SSL mode is set.

### Logon fails

Check the username and password, and that the account is not locked.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.