A previously working stored procedure isn't working anymore.
Server_A is running SQLServer 2019 Std 64-bit. Python Machine Learning extension is installed as well as "ODBC Driver 17 for SQL Server ODBC v220.127.116.11".
I run this code in one of its stored procedure:
@language = N'Python'
, @script = N'
con = pyodbc.connect(server="server_B", driver="ODBC Driver 17 for SQL Server", user="reports", password="***")
OutputDataSet = pandas.DataFrame()';
and get this error:
Traceback (most recent call last):
File "<string>", line 5, in <module>
File "D:\ProgramData\MSSQLSERVER\Temp-PY\Appcontainer1\E517C0B7-A0B6-477B-9318-4A1BEF11D721\sqlindb_0.py", line 35, in transform con = pyodbc.connect(server="server_B", driver="ODBC Driver 17 for SQL Server", user="reports", password="***")
pyodbc.OperationalError: ('08001', ' [Microsoft][ODBC Driver 17 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server . (65) (SQLDriverConnect);
 [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0);  [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. (65)')
Server_B is running SQL Server 2019 Dev 64-bits
I expected the code to be able to open the ODBC connection since:
- running the same Python code from the prompt connects without issue (same user, password as in the SP). This also means that the server_B is accepting connections.
- I'm able to run the same code from a SQL client application as well without any error (located on server_A) --> no firewall exceptions are reported & port 1433 is open.
How to investigate further ?
PS: I did reboot both servers to réinit processes.