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.
-
1How 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.Dale K– Dale K2022年10月27日 20:30:19 +00:00Commented 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.Parfait– Parfait2022年10月27日 21:11:00 +00:00Commented Oct 27, 2022 at 21:11
-
@Parfait I think now the question better describes my problem.neves– neves2022年10月28日 14:02:05 +00:00Commented 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/…David Browne - Microsoft– David Browne - Microsoft2022年10月28日 14:51:07 +00:00Commented Oct 28, 2022 at 14:51
1 Answer 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.