patternsqlCritical
I can't connect to my servers SQL database via an IP Address
Viewed 0 times
canconnectaddressserverssqldatabasevia
Problem
I have setup 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
However when we come to connecting through any software or script using an IP Address it won't allow the connection.
I have tried:
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.
I look forward to hearing from you.
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.
I look forward to hearing from you.
Solution
Your SQL Server is installed as named instance, so first of all try connecting to your server using the following server name:
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 instance name you have to reconfigure your server to use static TCP port. To do it please perform the following:
Try to connect to your server using just its IP address.
IP Address\SQLEXPRESS. 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 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/IPprotocol;
- select the
Yesvalue in theEnabledfield;
- switch to the
IP Addressestab;
- find the
IPAllsection;
- clear the
TCP Dynamic Portsfield in that section;
- specify the
1433value in theTCP Portfield:
- restart your server
Try to connect to your server using just its IP address.
Context
StackExchange Database Administrators Q#62165, answer score: 114
Revisions (0)
No revisions yet.