Cannot connect to SQL Server 2005

gbzhhu
gbzhhu used Ask the Experts™
on
We have recently setup a SQL Server 2005 server and put a few databases there.  I am having trouble connecting to this server/databases.  Erroe is

"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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
Error Number: 233
Severity: 20
State: 0"

I tried connecting to it via VS 2003, VS 2005, SQL 2000 Enterprise manager and SQL 2005 management studio.  none of them work.  Can anyone help please
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AneeshDatabase Consultant
Top Expert 2009
Commented:
u need to configure SQL Server to allow remote connections first

for this open "Surface are configurator" ->Configuration for survices and connections ->
Under ur server name select "Remote connections " ->  local and remote connections

Author

Commented:
where is this
"Surface are configurator"
AneeshDatabase Consultant
Top Expert 2009

Commented:
Start->programs -> sql server 2005
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Senior SAP CRM Consultant
Commented:
firstly - enable Remote Connections. Default on install is off.
Programs > Microsoft SQL Server 2005 > Configuration Tools > SQL Server 2005 Surface Area Configuration > Surface Area Configuration for Services and Connections

click on Remote Connections under your instance name
Choose Local and Remote Connections and your preferred connection method

NB you CANNOT use Enterprise Manager at all with MS SQL 2005

Author

Commented:
OK.  I tried this but it seems that Local and Remote Connections was already selected
Sham HaqueSenior SAP CRM Consultant

Commented:
at what about TCP/IP and named pipes?
also check that port 1433 is opened on the server's firewall (SQL listening port)

Author

Commented:
Using TCP/IP only is selected.

I'll check port 1433 is opened
Sham HaqueSenior SAP CRM Consultant

Commented:
change it to TCP/IP and Named Pipes - your connection is using named pipes (or trying to, as the error msg suggests....)

Author

Commented:
Changed to TCP/IP and Named pipes now error changed to

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476

------------------------------
Server Name: DBSERVER6
Error Number: -2
Severity: 11
State: 0

Still to check the port
Sham HaqueSenior SAP CRM Consultant

Commented:
note - severity has dropped from 20 to 11, so it can't be that serious....hehehe
Sham HaqueSenior SAP CRM Consultant

Commented:
there's a troubleshooting matrix for that error:

Troubleshooting: Timeout expired  
http://msdn2.microsoft.com/en-us/library/ms190181.aspx

Author

Commented:
Via SQL Server Network client utility I added the server and it seems to work :-)

Thanks guys
Sham HaqueSenior SAP CRM Consultant

Commented:
no probs - happy to help you work it through....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial