[英]How to connect to remote MS SQL Server from python using py(py)odbc
I have a remote ms sql server at office location and I wanted to connect from an ubuntu desktop to it.我在办公室位置有一个远程 ms sql 服务器,我想从 ubuntu 桌面连接到它。 I installed DBeaver http://dbeaver.jkiss.org/ and it was working like a charm without any other dependency.
我安装了 DBeaver http://dbeaver.jkiss.org/ ,它运行起来就像一个魅力,没有任何其他依赖。
After this I started to setup a connection from python with no success until I found a straightforward tutorial at https://tryolabs.com/blog/2012/06/25/connecting-sql-server-database-python-under-ubuntu/ .在此之后,我开始从 python 设置连接但没有成功,直到我在https://tryolabs.com/blog/2012/06/25/connecting-sql-server-database-python-under-ubuntu/找到了一个简单的教程. But this solution involved installing some packages to ubuntu itself and configuring some related config files in the system.
但是这个解决方案涉及将一些包安装到ubuntu本身并在系统中配置一些相关的配置文件。
The question is if there is some python package to use without os dependencies?问题是是否有一些 python 包可以在没有 os 依赖的情况下使用?
I don't think you would be able to achieve what you want without installing some packages.我认为如果不安装一些软件包,您将无法实现您想要的。 Reason being you are connecting to the MSSQL which follows a different set of rules as it is from Microsoft.
原因是您要连接到遵循与 Microsoft 不同的规则集的 MSSQL。
If you were connecting to any DB (MySQL,MongoDB etc) you still need to install a package or module to make it work.如果您连接到任何数据库(MySQL、MongoDB 等),您仍然需要安装一个包或模块才能使其工作。
Try to install the package as described in the tutorial from the like you shared and if you run into any problem paste the problem here.尝试按照您分享的教程中的说明安装软件包,如果遇到任何问题,请将问题粘贴到此处。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.