One thing to check is if SQL Server is configured to listen to remote connections. Check the SQL Server errorlog. It should list the IP addresses it is listening to.
Provider: TCP Provider, Error: 40 – Could Not Open A Connection to SQL Server
Hi,
I can connect and process works in my code in localhost.
Sql server at another server.
When i pushed the code and test it on the test server, for example for an api in swagger page returns error which i mentioned at title.
I have created a rule on firewall but nothing changed.
Also my test server runs on openshift.
What is the problem?
(– Reasons. SQL Server does not have the authority to permit remote connection. This is because of a failure in connecting with the server case we are using. This error 40 in SQL server may also pop up due to badly configured firewall settings)
i can ping both servers. There are no any problem. But connection between test server and sql server which runs on openshift is a problem
SQL Server Integration Services
SQL Server | Other
2 answers
Sort by: Most helpful
-
Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
2022-12-24T22:00:42.54+00:00 -
Seeya Xi-MSFT 16,586 Reputation points
2022-12-26T04:21:52.517+00:00 Hi @Hello World ,
In case something is missing, you can check it against this article.
Resolve Error 40: Could Not Open a Connection to SQL ServerBest regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.