views:

498

answers:

2

Hey.

I am remotely accessing SQL Server Express 2008.

  • I have turned on service "SQL Server Browser"
  • I have turned on service "SQL Server (SQLExpress)"
  • I have enabled TCP/IP and set dynamic ports to blank and tcp port to 1433 in properties
  • I can connect localy(using ip) so my credentials are correct.
  • I have a exceptions record in my windows firewall setting port 1433 as open.
  • I have performed a system reboot making all services are still turned on.

After i try and connect via a remote computer I get this error.

Cannot connect to XXX.XXX.XXX.XX

===================================

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

------------------------------
Error Number: 3
Severity: 20
State: 0

your ideas and solutions will be greatly appreciated.

KJ

Edit Hi and thanks for the quick responses. At present there is no connection string. I am trying to connect using: SQL Server Management Studio 2008

Edit 2 Hey Nick. I am connecting using SERVERNAME\SQLEXPRESS I turned off windows firewall off and still there was no joy.

I tried adding the port like you suggested:

===================================
Cannot connect to XXX.XXX.XXX.XX, 1433.
===================================
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: TCP     `Provider, error: 0 - No connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)`
+1  A: 

please show us the connection string in you are using to connect to the server with.

If your connecting using the instance name. eg. SERVERNAME\SQLEXPRESS then you will need to open up your firewall for the SQL Browser service i.e. UDP port 1434.

Alternatively, try using the port in your connection string and forget the instance name. Eg. in SSMS you can connect using SERVERNAME,1433 where 1433 is the port you've specified sql server listens to.

Nick Kavadias
Nick Kavadias
Yeah. There was an external hardware firewall which i did not know about. argh. Thanks very much for your help. I did have to connect using a named instance.
Kieran
A: 

You say you have configured TCP/IP but your connection error message says this:

provider: Named Pipes Provider

Update

It appears you have one protocol enabled on Sql Express and are trying to connect with another via Sql management Studio. You need to connect with the TCP provider or enable Named Pipes on your Sql Server Express Configuration.

To connect with TCP, in Sql Management Studio click the Options button on the login page. This will take you to a Connection Properties page where you can select the provider. The Network protocol is probably set to default or Named Pipes at the moment and it needs to be changed to TCP.

Alternatively, in Sql Server Configuration Manager, enable Named Pipes in Protocols for Sql Express.

Chris Latta