Skip to content
Beltr documentation home
beltr.ai

Sources and data

Connect an ODBC source

Add a database you reach through an ODBC driver on this computer, through a data source name or a driver, and test it before you save.

ODBC reaches a database through a driver installed on this computer. Install the driver, and set up a DSNDSN A data source name. A named ODBC connection set up on the computer, which holds the driver and the server to use. if your IT department uses them, before you add the source. On macOS and Linux, ODBC also needs the unixODBC driver manager; Beltr does not include one.

When you choose ODBC, Beltr lists what it finds under Detected on this computer:

  • DSNs, each with its driver and User DSN or System DSN. A DSN that is already a source in this workspace is marked Already added.
  • Drivers without a DSN. You can choose one only when Beltr knows that driver’s connection settings; then the form shows one field per setting, from a fixed list. For any other driver, set up a DSN and choose the DSN.

Beltr lists 64-bit drivers only. An entry Beltr cannot use is shown but cannot be chosen, with the reason beside it.

SQLite databases cannot be read through ODBC: Beltr refuses a driver or a database that reports SQLite. A PostgreSQL database is refused through ODBC as well; use the PostgreSQL kind for it.

  1. In Sources, choose Add source, then ODBC.
  2. Under Detected on this computer, choose the DSN or the driver, then Continue. The form shows your choice under Connection.
  3. Enter a Name. Under Sign-in, choose User and password and enter the User and Password, or No sign-in (the DSN holds it) when the DSN has its own authentication.
  4. Under SQL dialect, choose SQL Server (T-SQL) for a SQL Server database, which also asks for the Schema (dbo unless you change it) and the Table layout: One row per tag and time or AVEVA Historian. For any other database, keep Generic SQL.
  5. For a driver without a DSN, fill in its fields.
  6. Choose Test connection. When the test has passed, choose Continue, check the connection and choose Save.

You should see

You should see the overview of the new source, where Beltr shows what is in it. Under Connections, the source’s line names the DSN or driver and says 64-bit.

With SQL Server (T-SQL), the driver must report a Microsoft SQL Server; otherwise the test fails and nothing more is sent. Generic SQL accepts any database except PostgreSQL and SQLite.

What the connection test says about read-only

Section titled “What the connection test says about read-only”

Through ODBC, Read-only session is usually Not confirmed, with the sentence “Read-only access was requested. This driver does not confirm it; Beltr’s statement check is what keeps the connection read-only.” A driver may also refuse read-only access; the report then says so.

SQL Server has no read-only session unless the database itself is read-only. With SQL Server (T-SQL), Beltr asks the server in every operation whether the database is read-only, and Read-only session is Confirmed only when it is.

For a connection through a DSN, the report adds the warning “This is not a tested driver.”

Use an account that can only read. See How Beltr stays read-only.

The driver runs in a separate helper process, not in Beltr itself. A driver that crashes takes down only the helper; Beltr starts it again the next time a source needs it.

An ODBC driver can send statements of its own, for example when it connects. Those statements are not Beltr’s: Beltr’s check does not see them and they are not in the audit log.