none
could not connect to server

    Question

  • .I saw the video C9 about using WCFRIA services.I followed all the steps and it was really a wonderful video,but

    after adding the mdf file in the app_data ,am seeing my data base in my server explorer but when i give connect i get a error message stating

     

    " 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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)"


    The video i saw was from  http://channel9.msdn.com/learn/courses/Silverlight4/SL4BusinessModule2/SL4LOB_02_01_RIAServices/
    • Moved by Bob BeaucheminMVP Wednesday, August 11, 2010 10:12 PM Moved to a (hopefully) more relevent forum (From:.NET Framework inside SQL Server)
    Wednesday, August 11, 2010 7:56 PM

Answers

  • Dear bensonpaul,

     

    " 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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)"

     

    This error has occurred while establishing a connection to SQL Server which does not allow Local and Remote Connections. When connecting to an instance of Microsoft SQL Server database, for authentication or accessing and retrieving and updating the data, the  following error message may appear. The problem happens no matter the connection is originated from remote computer or on SQL Server local computer itself, and can be caused by any program.

    please check the following points for your issue:

     

    1>     Run command: Ping <servername> -a , it should return consist times

    2>     Check if the database server service is running.

    3>     In remote server ,configure the SQL Server  to allow remote connections

    4>     Check the Firewall setting, SQL Browser services (for named instance) etc .Turn off the firewall if you have, or put exception for SQL Server and SQL Browser.

        If you are going to connect to a named instance, please make sure SQL Browser Service is running.  Aslo please check the Firewall setting to put UDP port 1434 into exception.

     

    5>     Use Telnet to test connection to the SQL Server TCP port: telnet < servername > <TCP_Port>

    6>     Authentication and logon issue

     

    Please read this blog, it’s very helpful for your question:

    Steps to troubleshoot SQL connectivity issues: http://blogs.msdn.com/b/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx

     

    Please find more information  from the following link:

    How to: Enable Remote Connections on SQL Server: http://msdn.microsoft.com/en-us/library/dd857537(VS.85).aspx

    How to: Connect to Server (Database Engine): http://msdn.microsoft.com/en/library/ms189721.aspx

     

    If there are more questions, please feel free to ask.

     

    Thanks,

    Grace

    Friday, August 13, 2010 6:03 AM

All replies

  • Sorry, I don't know anything about WCF RIA services. But I can tell you that the error you received is a very basic error, meaning that the client can't find the instance of SQL Server. And it could be anything; a network problem like name resolution, misspelling of the server name, wrong format of the instance name, protocols not being turned on, or firewalls blocking the ports. For some suggestions see these two items:
    Tutorial: Getting Started with the Database Engine http://msdn.microsoft.com/en-us/library/ms345318.aspx and Troubleshooting: Timeout Expired http://msdn.microsoft.com/en-us/library/ms190181.aspx

    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty
    Thursday, August 12, 2010 3:04 PM
    Answerer
  • You probably need to configure the server to allow remote connections.

    To do that use SSMS to get on the other server.  

    • Under the server  node right click Properties
    • Look for the Connections tab and click it
    • Check Allow Remote Connections

    PG
    Thursday, August 12, 2010 5:05 PM
  • You should look in to this blog article http://blogs.msdn.com/b/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx that explains all possible stuffs when you try to connect to SQL server.


    Thanks, Leks
    Thursday, August 12, 2010 11:17 PM
    Answerer
  • Dear bensonpaul,

     

    " 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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)"

     

    This error has occurred while establishing a connection to SQL Server which does not allow Local and Remote Connections. When connecting to an instance of Microsoft SQL Server database, for authentication or accessing and retrieving and updating the data, the  following error message may appear. The problem happens no matter the connection is originated from remote computer or on SQL Server local computer itself, and can be caused by any program.

    please check the following points for your issue:

     

    1>     Run command: Ping <servername> -a , it should return consist times

    2>     Check if the database server service is running.

    3>     In remote server ,configure the SQL Server  to allow remote connections

    4>     Check the Firewall setting, SQL Browser services (for named instance) etc .Turn off the firewall if you have, or put exception for SQL Server and SQL Browser.

        If you are going to connect to a named instance, please make sure SQL Browser Service is running.  Aslo please check the Firewall setting to put UDP port 1434 into exception.

     

    5>     Use Telnet to test connection to the SQL Server TCP port: telnet < servername > <TCP_Port>

    6>     Authentication and logon issue

     

    Please read this blog, it’s very helpful for your question:

    Steps to troubleshoot SQL connectivity issues: http://blogs.msdn.com/b/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx

     

    Please find more information  from the following link:

    How to: Enable Remote Connections on SQL Server: http://msdn.microsoft.com/en-us/library/dd857537(VS.85).aspx

    How to: Connect to Server (Database Engine): http://msdn.microsoft.com/en/library/ms189721.aspx

     

    If there are more questions, please feel free to ask.

     

    Thanks,

    Grace

    Friday, August 13, 2010 6:03 AM