odbc.ini(5)
π NAME π
okay so the manual name is odbc.ini(5) π and it's all about the data source config files: /etc/odbc.ini and $HOME/.odbc.ini β¨ They're the unixODBC data source name (DSN) config files, and honestly they're iconic π
πΈ DESCRIPTION πΈ
/etc/odbc.ini is the system-wide config file for ODBC Data Source Names (DSNs) π Everyone on the machine gets it.
$HOME/.odbc.ini is the user-specific version π¦ It's just yours, bestie.
ngl the paths to both of these can be changed by unixODBC build options π If you want to check where your system is actually looking, run odbcinst -j and it'll tell you the default config file paths β¨
π NOTES π
π§Έ Templates
Lots of ODBC drivers come with .ini file templates π The move is to use odbcinst to install them, so you're not hand-typing everything like it's 1999 π
π§ FILE FORMAT
okay so odbc.ini follows the pseudo-standard ini file syntax π You get one or more [section headings], and each one is followed by zero or more key = value attributes. Super simple, very cute.
π [ODBC Data Sources] section
This section is mandatory π«Ά It lists every data source name (DSN) as a key, and the values are just comments. Each entry has to be matched by an ini file [section] that actually describes the data source, or it's giving incomplete π
π¦ Data Source Name [section]
Each data source is identified by a [section header], and that header is the DSN name your applications use π Each DSN section can have values for these keys:
Driver(REQUIRED) β this is the name of the ODBC driver to use for the DSN, and it has to exactly match the[section name]of the driver definition inodbcinst.ini. You can see those withodbcinst -q -dβ¨ No close enough, periodt.Descriptionβ a human-readable description of the data source π·Databaseβ the database name or identifier ποΈ What it means depends on the driver. It could be a file path, a Unix socket path, or an identifier relative to a server name, etc.Servernameβ the server name π Again, driver-specific, but usually it's a DNS name, an IP network address, or a driver-specific discovery identifier.
For the full list of supported parameters, check out the HTML-formatted "Administrator Manual" that ships with unixODBC π You should also look at your ODBC driver's docs and any data-source templates your driver came with. Main character research energy π
π§ EXAMPLES π§
An example odbc.ini config file is shown in the "Administrator Manual" that ships with unixODBC π Go peek at it, it's so helpful.
π SEE ALSO π
unixODBC(7), odbcinst(1), isql(1), iusql(1), odbcinst.ini(5) π
Also check out "The unixODBC Administrator Manual (HTML)" π
π AUTHORS π
The authors of unixODBC are Peter Harvey <pharvey@codebydesign.com> and Nick Gorham <nick@lurcher.org> π«Ά Legends, truly.
For a full list of contributors, refer to the AUTHORS file β¨
π COPYRIGHT π
unixODBC is licensed under the GNU Lesser General Public License π¦ For the details, see the COPYING file.
π Okay that's the whole thing, bestie π This was odbc.ini(5) from unixODBC manual pages, version 2.3.12, dated Sun 10 Jan 2021 β¨ Now go make your DSNs slay π π₯
π¦ where this page comes from
- alpine 3.22: unixodbc-doc 2.3.12-r0 Β· LGPL-2.0-or-later
- alpine 3.23: unixodbc-doc 2.3.14-r0 Β· LGPL-2.0-or-later
- alpine 3.24: unixodbc-doc 2.3.14-r1 Β· LGPL-2.0-or-later
- arch rolling: unixodbc 2.3.14-1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- centos-stream 10: unixODBC 2.3.12-6.el10 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- centos-stream 9: unixODBC 2.3.12-2.el9 Β· GPLv2+ and LGPLv2+
- centos-stream 9: unixODBC 2.3.12-2.el9 Β· GPLv2+ and LGPLv2+
- debian trixie: unixodbc-common 2.3.12-2+deb13u1 Β· LGPL-2.1-or-later
- fedora 43: unixODBC 2.3.12-7.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 43: unixODBC 2.3.12-7.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 43: unixODBC 2.3.14-2.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 43: unixODBC 2.3.14-2.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: unixODBC 2.3.14-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: unixODBC 2.3.14-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- nixos 26.05: unixodbc 2.3.14
- nixpkgs unstable: unixodbc 2.3.14
- ubuntu noble: unixodbc-common 2.3.12-1build2 Β· LGPL-2.1-or-later
- ubuntu noble: unixodbc-common 2.3.12-1ubuntu0.24.04.1 Β· LGPL-2.1-or-later
- ubuntu questing: unixodbc-common 2.3.12-2ubuntu2 Β· LGPL-2.1-or-later
- ubuntu resolute: unixodbc-common 2.3.14-1 Β· LGPL-2.1-or-later
- ubuntu stonking: unixodbc-common 2.3.14-2 Β· LGPL-2.1-or-later
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms