I can't connect to SQL server database via an IP Address
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.
This is 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. The name of the computer hosting the SQL Server.
Your SQL Server is installed as named instance, so first of all try connecting to your server using the following server name: IP AddressSQLEXPRESS.
When you install SQL Server as named instance it uses dynamic TCP/IP ports by default, so it is not possible to connect to it whitout specifying instance name (just IP address).
If you need to connect to your server without using an instance name you have to reconfigure your server to use static TCP port.
To do it please perform the following:
- open SQL Server Configuration Manager;
- switch to the SQL Server Network Configuration | Protocols for SQLEXPRESS;
- double-click the TCP/IP protocol;
- select the Yes value in the Enabled field;
- switch to the IP Addresses tab;
- find the IPAll section;
- clear the TCP Dynamic Ports field in that section;
- specify the 1433 value in the TCP Port field:
- restart your server
Try to connect to your server using just its IP address.
Hope this will resolve your issue.