All Questions
Tagged with sql-server python
3,688
questions
0
votes
0
answers
51
views
SSL routines::legacy sigalg disallowed or unsupported] (-1) (SQLDriverConnect)')
I´m trying to run a FastAPI connected to SQL Server on a Docker container, but I´m getting this error when I execute the query.
Error executing: (pyodbc.OperationalError) ('08001', '[08001] [Microsoft]...
0
votes
1
answer
46
views
Connect SSMS to Azure SQL Database [duplicate]
I am trying to connect my Azure SQL database to Microsoft SQL Server Management Studio. Getting the error: Connection host has failed to respond
Cannot connect to {my server}.database.windows.net.
A ...
0
votes
0
answers
45
views
Importing xlsx data from Pandas to SQL Server, receiving string data, right truncation and text column data incomplete
I have an xlsx file that I'm trying to run through Python to edit and then upload to our database.
For vendor A, their data comes in through a CSV and I've been able to edit and upload that no issue.
...
1
vote
1
answer
31
views
SQLAlchemy not retrieving data from schema.sometable
I am having trouble having the query produce results. I know there is 1 value in the table, but I cannot get the data to show in Python.
I am also not getting any errors in the run.
I have the ...
0
votes
0
answers
45
views
Connect Django to Docker MS SQL
I have requirements:
Python 3.11.9 ( Windows https://github.com/pyenv/pyenv )
latest version of Django (5.0.7.)
MS SQL 2019
To create a simple REST app with Django AUTH logic.
As I have local ...
0
votes
1
answer
69
views
ODBC Driver 18 for SQL Server: SSL Provider
I'm trying to connect to a remote SQL Server database which is in a Windows Server machine from a Linux arm based server, I'm using Python as programing language and SQLAlchemy and this is the code I'...
0
votes
0
answers
37
views
ODBC Connection Error in Python Virtual Environment: `Login failed for user 'userx'` (SQL Server)
I'm facing an issue while trying to connect to my SQL Server database using pyodbc and SQLAlchemy in a Python virtual environment on my M1 Mac. The connection works perfectly in my global Python ...
0
votes
0
answers
32
views
"Could not find server in sys.servers", not sure why I am getting this error? [duplicate]
Here is my code. I am trying to run my stored procedure that updates my tables:
import pyodbc
import logging
import json
import pandas as pd
import sqlalchemy as sa
import warnings
import time
def ...
0
votes
0
answers
35
views
Unable to get Plotly Data of type Figure using Langchain SQL Agent
I'm getting summary answer in response but want Plotly Data.
I tried using langchain sql agent to get response. But I'm getting summarized answer instead of Plotly Data.
from langchain.sql_database ...
0
votes
0
answers
63
views
Pyodbc auto running CREATE PROCEDURE
I am connecting to a SQL Server using pyodbc - nothing fancy.
I have been flagged by a DBA that I have long running queries on the DB, however, I know the query I am running takes between 1-3 seconds ...
0
votes
1
answer
75
views
Convert MSSQL image / varbinary column data to file
I have data from an (unknown) MSSQL server, in a column of type Image (I think this is an old variant of varbinary).
I want to make a script (preferably in Python or Typescript, but open for anything) ...
-1
votes
0
answers
30
views
Connecting to SQL Server with Jupyter [duplicate]
My code:
import pyodbc
server = 'DESKTOP-Q8MCSF6/MSSQLSERVER01'
database = 'mimic'
username = 'DESKTOP-Q8MCSF6/User'
#password = 'your_password'
print('DRIVER={ODBC Driver 17 for SQL Server};'+
...
0
votes
1
answer
33
views
pyodbc cursor.fetchall() is returning "strange" values
I have a class with multiple functions to handle database operations, one of them is used to run queries (select, update, delete, insert....), but I'm having problems getting the result of my "...
1
vote
0
answers
36
views
Optimizing Batch Inserts for Improved Efficiency in Flask SQLAlchemy
I am trying to insert 60 to 70 rows at once in a SQL Server table. Currently, I have a function to do it but it is taking almost 15 seconds to complete the task. It would not be a problem if it was ...
-2
votes
0
answers
47
views
SQL Connection in my FastApi code is intermittent
I have created a Fast API application for my job. This is hosted on a windows server. It's wrapped as a windows service using pyWin32 and runs a FastAPI app using Uvicorn. You can see this below, most ...