External Database Connectivity Issue

unable to connect sql server present in local PC from Service center. while testing connection throws below error

Connection String test failed: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


Hi,

Is your OutSystems infrastructure OnPremise or a cloud solution?

If it is cloud you need a VPN connection to your companies network.

If you are OnPremise then still OutSystems needs to be able to the server running SQL server.

Regards,

Daniel

Hello Yugandhar, 

Are your 'local pc' a server or your own computer? If it is the late, you can't connect unless it is discoverable from the internet (IP must be known), and 'open', with the ports not blocked by firewall. 

Dynamic IP will pose a problem also. 

So I recommend you to avoid this if it is what you are trying to do. 

It's my own computer with a specific port exposed to connect sql server through firewall to accept incoming connections

Hi,

Well, something is not correct with your configuration (computer) or connection string (Service Center).

In the case of the configuration, maybe this can be of help? https://docs.microsoft.com/en-us/sql/relational-databases/lesson-2-connecting-from-another-computer?view=sql-server-ver15

Regarding the connection string, are you using the external IP of your local machine? 

Again, I don't recommend this. Not even for personal purposes.

Cheers.


Fully agree on the part where you should avoid this, guess there is a good reason for it. One of the most common issues is forgetting to enable TCP/IP when installing SQL server. 


Solution

Hi, I'm gonna take a ride on this post and make my question: on the company I'm working on, a database maintenance procedure will be done and I'm being asked on the procedure of changing the connection string. Is there any link on the steps of how to do this? I found one here but this seems to be for platform 9, we work on 10. Also, we have the On-Premises platform. Thank you, Tânia

Solution