Python Operations SQL Server 2000

Source: Internet
Author: User
Tags microsoft odbc driver for sql server odbc

Found on the Internet Pyodbc This module, my operating system is Ubuntu 16.04, Python 2.7 has been installed PIP

Follow the official documentation steps to install successfully.

But cross-platform is required.

Using PYODBC to connect to SQL Server in Windows is straightforward.

Pyodbc.connect (' Driver={sql Server}; Server=192.168.1.15;database=master; Uid=sa; Pwd=password ')

But I am in Ubuntu and need to install the following components:

Microsoft ODBC Driver for SQL Server on Linux

The 13 version of the component supports Ubuntu, before the 11 version supports CentOS and Redhat, and decisively installs version 13.

According to https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/ Installing-the-microsoft-odbc-driver-for-sql-server Step installs the component,

Then follow the Https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-RHEL-or-Centos steps to finish the call.

I thought it was time to call it off, but when I pyodbc.connect (' Driver={odbc DRIVER for SQL Server}; Server=192.168.1.15;database=master; Uid=sa;  Pwd=password ') unexpectedly shows no support for sqlserver2000!!! What fuck!!

Then another module was used: pymssql

This time finally succeeded.

Reference

https://www.tomczhen.com/2017/05/25/python-cross-platform-connect-to-sqlserver/

Https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server

Https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-RHEL-or-Centos

  

Python Operations SQL Server 2000

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.