1

I need to query SQL Server from Python in a machine that I don't have admin rights. I can't install drivers in it. I'll query mainly from a Linux machine, but it would be nice if I it can also be used from Windows during development.

I want to make a simple query in MS SQL Server with a Python lib. A lib that doesn't need any driver installed in the Operating System. Is it possible? Everything that I found asks to install the Microsoft driver in the host OS.

asked Oct 27, 2022 at 19:27
4
  • 1
    How would that work? You would just be reinventing the wheel i.e. writing your own driver. Which would be a massive amount of work and I'm not even sure the API is documented. Commented Oct 27, 2022 at 20:30
  • Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. Commented Oct 27, 2022 at 21:11
  • @Parfait I think now the question better describes my problem. Commented Oct 28, 2022 at 14:02
  • 1
    @DaleK The protocol is at least documented, but implementing it is not trivial. learn.microsoft.com/en-us/openspecs/windows_protocols/ms-tds/… Commented Oct 28, 2022 at 14:51

1 Answer 1

1

A quick search turns up python-tds, also known as pytds, but it's not supported by Microsoft and I have no idea how widely adopted it is or if it's being actively maintained. Here's the GitHub repo.

Ed Avis
1,62224 silver badges40 bronze badges
answered Oct 27, 2022 at 19:52
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.