Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

I can't connect to SQL server database via an IP Address

Asked by Nitin Solanki Aug 23, 2021 6.1K views 2 answers
Share

About this question

I have set up a server that runs Windows Server 2008 and has SQL Server 2008 Express installed.

I can connect to the machine's SQL Server Express database via the MACHINENAME/SQLEXPRESS.

However, when we come to connecting through any software or script using an IP Address it won't allow the connection.

  • I have tried:
  • Turning off the Firewall.
  • Allowing Remote Connections for the SQL Database.
  • Enabling TCP/IP within the SQL Configuration.

When we attempt to connect via the software 'SQL Server Management Studio', we get the following message:

Error Message:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.) (Microsoft SQL Server, Error: 10053)

Can you please let me know when your free so we can take a look because I seem to be getting know where, I’ve amended the details as per some information UK Fast sent me but they have said "It’s not within the support remit", so they can’t help any further.

Don’t know why getting error can't connect to SQL server? Please suggest me possible solution.

Your answer

2 Answers

Ranjana Admin JanBask Expert Latest answer

Answered on May 9, 2024

If you're unable to connect to a SQL Server database using an IP address, there are a few potential reasons and troubleshooting steps you can try:


Check Server Configuration: Ensure that the SQL Server instance is configured to accept remote connections. This setting is typically found in the SQL Server Configuration Manager under SQL Server Network Configuration -> Protocols for -> TCP/IP. Make sure TCP/IP is enabled.

Firewall Settings: Verify that the firewall on the SQL Server machine (as well as any network firewalls) allows incoming connections on the SQL Server port (default is usually 1433 for SQL Server). You may need to add an inbound rule to allow traffic on this port.

SQL Server Browser Service: If you're connecting using a named instance of SQL Server, ensure that the SQL Server Browser service is running on the server. This service helps clients locate named instances on the network.

Dynamic Ports vs. Static Ports: If the SQL Server instance is configured to use dynamic ports, the port number may change each time the SQL Server service restarts. Consider configuring the SQL Server instance to use a static port instead.

IP Address and Port Number: Double-check that you're specifying the correct IP address and port number when connecting to the SQL Server instance. Ensure there are no typos or mistakes in the connection string.

Network Connectivity: Ensure that there are no network issues preventing communication between your client machine and the SQL Server machine. You can test network connectivity using tools like ping or telnet.

SQL Server Configuration: Check the SQL Server configuration to ensure it is listening on the correct IP address and port. You can use SQL Server Configuration Manager to verify this.

Authentication: Ensure that you're using the correct authentication method (Windows Authentication or SQL Server Authentication) and that the credentials you're providing are valid.

Temporary Disable Antivirus or Security Software: Sometimes, antivirus or security software can block outgoing connections. Temporarily disable such software and try connecting again.

Consult Server Logs: Check the SQL Server error logs for any error messages or clues as to why the connection is failing. These logs can often provide helpful information for troubleshooting.

By systematically checking each of these potential issues, you should be able to identify and resolve the problem preventing you from connecting to the SQL Server database via its IP address.

Was this helpful?

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.