odbc.ini Connection String Keywords (unixODBC)

  • 7021177
  • 03-Aug-2017
  • 06-Mar-2019


Privileged Account Manager


How to configure unixODBC's odbc.ini configuration file for integration with Password Checkout
Supported Connection String Keywords and Data Source Names (DSNs), connection properties, attributes
odbc.ini configuration tips
Microsoft SQL Server Password Checkout


For details regarding supported connection string keywords and data source names (DSNs), please refer to the respective driver's documented sources. Each driver may support different keywords. Support for particular keywords may differ depending on the driver version being used. Here are some template examples:

Microsoft ODBC Driver for SQL Server

Microsoft documentation - Connection String Keywords and Data Source Names (DSNs).

Driver = ODBC Driver 13 for SQL Server
Description = MSSQL test
Server = [protocol:]server[,port] 
# Note: 
# Port is not a valid keyword in the odbc.ini file 
# for the Microsoft ODBC driver on Linux or macOS


MySQL documentation - Configuring a Connector/ODBC DSN on Unix.

Driver      = MySQL
Description = MySQL test database
SERVER      = mysql.mydomain.com
PORT        = 3306


Driver      = PostgreSQL
Description = Test to Postgres
Servername  = postgresql.mydomain.com
Port        = 5432


MariaDB documentation - Connection Parameters.

Driver      = MariaDB
SERVER      = mariadb.mydomain.com
PORT        = 3306


Sybase documentation - Configuring ODBC.

Driver      = Sybase
Description = Sybase ODBC Driver
Servername  = sybase.mydomain.com
Port        = 5000

Additional Information

unixODBC is "an open specification for providing application developers with a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver." The goal of ODBC is to make it possible to access any data from any application, regardless of which database management system (DBMS) is handling the data. ODBC achieves this by inserting a middle layer called a database driver between an application and the DBMS. This layer translates the application's data queries into commands that the DBMS understands.

A Data Source Name (DSN) is a data structure that contains information about a specific database. The odbc.ini file contains a list or series of these DSNs that an Open Database Connectivity (ODBC) driver needs in order to connect to it. This definition file will include the driver and other driver-related attributes associated for each connection.

The Driver attribute in this odbc.ini file should match the name of the driver defined in the odbcinst.ini file as indicated by the [section] entry header.
Note: For more information on the odbcinst.ini configuration file, please refer to TID 7023661 - odbcinst.ini Driver Configuration (unixODBC).