I have an ongoing issue that I just can't solve. It concerns a Python script that loads data into a SQL server database.
import pyodbc
conn = pyodbc.connect(r'Driver={SQL Server};'
r'Server=tcp:MY-SRV-NAME\ABC,49133;'
r'Database=MyDatabase;'
r'Trusted_Connection=yes;')
cursor = conn.cursor()
cursor.execute('SELECT coalesce(max(NextDate),?) FROM [dbo].[TableName]',b)
When I run it from my local machine it works fine, however when I run the same script from a server I get the following error:
conn = pyodbc.connect(r'Driver={SQL Server};' pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error (18) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()). (1)')
This is using the same user account both locally & on the server. Can anyone help out?
Apologies if this appears like a duplicated issue, I've read through many similar sounding issues on StackOverFlow, but none of the solutions help. I know the code is fine as it runs ok locally, but I just can't get it running from the server.
Any advice would be very much appreciated.
Thanks