Jul-11-2024, 11:11 AM
Hello everyone,
I just moved to a new company and the IT installed anaconda python for me as well local SQL server (SQL Express).
I usually use the sqlalchemy to connect to sql server and run queries and read/write tables from SQL Server.
My local server name is: LL-Anthon\SQLExpress
my database name: DB_Client_Portfolio
Here is my connection code to SQL using sqlalchemy:
any ideas please ?
Thank you in advance
I just moved to a new company and the IT installed anaconda python for me as well local SQL server (SQL Express).
I usually use the sqlalchemy to connect to sql server and run queries and read/write tables from SQL Server.
My local server name is: LL-Anthon\SQLExpress
my database name: DB_Client_Portfolio
Here is my connection code to SQL using sqlalchemy:
import pandas as pd import sqlalchemy as sqla engine = sqla.create_engine(r'mssql+pyodbc://LL-Anthon\SQLExpress/DB_Client_Portfolio?trusted_connection=yes&driver=ODBC+Driver+17+for+SQL+Server') df = pd.read_sql('Client', engine)Here is the Error I get:
Error:OperationalError: (pyodbc.OperationalError) ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. (-1) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0); [08001] [Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (-1)')
(Background on this error at: https://sqlalche.me/e/20/e3q8)
I made sure i have admin access on the computer but still the same problem.any ideas please ?
Thank you in advance