How to connect to SQL Server 2008 from Windows server 2019
I am trying to connect and retrieve data from a old 2008 SQL Server and using python which is running on 2019 Window Server.
I am getting the following error.
2024-11-05 14:48:40,557 f648f084bd4e4fc [INFO] Connection String
DRIVER={SQl SERVER};
SERVER=EDCPCWPSTRDH01\SQL83;
DATABASE=Dataw_835;
UID=XXXXXX;
PWD=XXXXXX;
Encrypt=Yes;
Trust_Connection=yes;
2024-11-05 14:48:56,475 f648f084bd4e4fc [INFO] An Exception has happened
2024-11-05 14:48:56,484 f648f084bd4e4fc [INFO] Traceback (most recent call last):
File "D:\datawatch_purge\cibc_purge_files.py", line 794, in main
connect_to_database()
File "D:\datawatch_purge\cibc_purge_files.py", line 347, in connect_to_database
conn = odbc.connect(connection_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\pypyodbc.py", line 2454, in init
self.connect(connectString, autocommit, ansi, timeout, unicode_results, readonly)
File "C:\Program Files\Python311\Lib\site-packages\pypyodbc.py", line 2507, in connect
check_success(self, ret)
File "C:\Program Files\Python311\Lib\site-packages\pypyodbc.py", line 1009, in check_success
ctrl_err(SQL_HANDLE_DBC, ODBC_obj.dbc_h, ret, ODBC_obj.ansi)
File "C:\Program Files\Python311\Lib\site-packages\pypyodbc.py", line 987, in ctrl_err
raise DatabaseError(state,err_text)
pypyodbc.DatabaseError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error')
Please let me know
- The SQL Server Driver
- TLS version
- Any other setting in the connection string
so that I can connect and retrieve data from the SQL Server Database.