Hi @qp ,
> Login failed for user 'DELLPRECISION\sa'. (18456)"
Please make sure the login 'DELLPRECISION\sa' is existed and the login is enabled for this SQL server instance. Check this from SSMS > under the Object Explorer menu > Security > Logins. Please also make sure the login is spelled correct and the password is correct.
If you adding the user ID and PWD, suggest you removing the ‘Trusted_Connection’ parameter in connection string.
Please refer to the blog How to Connect Python to SQL Server using pyodbc and the thread Connecting to Microsoft SQL server using Python to get more detail information.
If the response is helpful, please click "Accept Answer" and upvote it, thank you.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.