如何在 Linux 中为 ODBC 创建 DSN?

发布于 2024-07-11 04:18:48 字数 146 浏览 7 评论 0原文

我正在研究一个 Linux 应用程序,据说该应用程序使用 DSN 连接到 SQL Server。 连接停止工作,我找不到正在使用的凭据(我只知道 DSN 的名称)。

我熟悉 Windows 中的 DSN,但在 Linux 中它们是如何创建以及存储在哪里?

I am digging around in a Linux application that supposedly uses DSNs to connet to SQL Server. The connection stopped working and I can't find the credentials that are being used (all I know is the DSN's name).

I am familiar with DSNs in Windows, but how are they created and where are they stored in Linux?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

作妖 2024-07-18 04:18:48

对于 unixODBC,DSN 在 /usr/local/etc/odbc.ini 中列出。 已安装的 ODBC 驱动程序将在 /usr/local/etc/odbcinst.ini 中列出。

尝试:

usr$ find . -iname 'odbc*.ini'

For unixODBC, DSNs are listed in /usr/local/etc/odbc.ini. Installed ODBC drivers will be listed in /usr/local/etc/odbcinst.ini.

Try:

usr$ find . -iname 'odbc*.ini'
葵雨 2024-07-18 04:18:48

只需查找 odbc.ini 文件即可。 默认情况下它应该位于 /etc 下,但我想它可能因一种 Linux 风格而异。

这是一个通用指南Linux/Unix。

希望这可以帮助。

Simply look for your odbc.ini file. By default it should be under /etc, but I guess it can differ from one Linux flavour to another.

This is a generalized guide for Linux/Unix.

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文