Linux中的MSSQL ODBC连接

时间:2013-04-08 10:14:08

标签: sql-server linux odbc

我在linux wine中安装了vb项目。我想创建与mssql数据库的odbc连接。如何连接到MSSQl SERVER。任何人都可以帮助我.. plz

2 个答案:

答案 0 :(得分:1)

Microsoft有一个ODBC Linux driver,它提供从Linux到Microsoft SQL Server的本机连接。

答案 1 :(得分:0)

我使用官方文档 Install the Microsoft ODBC driver for SQL Server (Linux)

例如我在 Ununtu 上的 Python 项目之一(root 用户):

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
apt-get install dialog apt-utils -y
ACCEPT_EULA=Y apt-get install -y mssql-tools msodbcsql17
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
source ~/.bashrc && apt-get install unixodbc-dev