Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:24:03+00:00 2026-06-17T10:24:03+00:00

I am trying to use pymssql to connect to a SQL Server 2012 database

  • 0

I am trying to use pymssql to connect to a SQL Server 2012 database running on Windows Server 2008.

db = pymssql.connect(host='xxx',user='xxx',password='xxx',database='xxx')

However, I am getting the following error:

OperationalError: (20017, ‘DB-Lib error message 20017, severity 9:\nUnexpected EOF from the server\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed\n’)

The full error is:

Traceback (most recent call last):
  File "XXX.py", line 2, in <module>
    conn = pymssql.connect(host = 'XXX.com', user = 'xxx', password = 'xxx', database = 'xxx')
  File "pymssql.pyx", line 556, in pymssql.connect (pymssql.c:7990)
    raise OperationalError(e[0])
OperationalError: (20017, '\xa0\xff\xaf\x02\x90_\x8d\x02L\xd6\xa7\x02\xda\xad;DB-Lib error message 20017, severity 9:\nUnexpected EOF from the server\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed\n')

Could someone help me figure out what’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:24:05+00:00Added an answer on June 17, 2026 at 10:24 am

    I would guess that it might be a total connection fail. I know it says ‘EOF’ but sometimes error messages like that are misleading.

    I’d see if you can ping the host firstly from where you are running the script.

    Secondly I’d see if you can get a tcp connection on the port you’re using.

    I’ve heard of EOF errors on http connections, when you connect with https to an http port. I’m not sure if that applies here.

    This came up on google. It might help:

    http://sourceforge.net/projects/pymssql/forums/forum/124111/topic/1672338

    If all of the above is working, I’d double check the username and password are correct; perhaps even create a new user.

    Finally, I’d check to see if the client library and the server library versions are compatible.

    I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
trying to use the beforeSave hook with some server side validation and throwing a
I'm trying use Places API from Google frmo a node.js server This is the
I am trying to get information from an SQL database using python I was
I am trying use the new server side plug-in feature for TFS 2010. (I
Trying to use WMI to obtain a list of installed programs for Windows XP.
I was trying to install pymssql .For this I use pip and installed it
i'm trying use facebook API to upload photo in my fan page. I downloaded
I am trying use gem tire to search in my application. I have tables
I was trying use a set of filter functions to run the appropriate routine,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.