none
Not able to connect to a remote database RRS feed

  • Question



  • Hi,


            I'm trying to connect to a SQLServer  instance on a remote server, SQL Server 2005 client.

            I'm trying to host a website and they have given me connection information to connect to their database.

            They gave me port number and database URL.

             But when i'm trying to connect i am getting the following error :


    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: SQL Network Interfaces, error: 25 - Connection string is not valid) (.Net SqlClient Data Provider)


           The connection settings on SQLServer Express are set to accept remote connections, using TCP and Named Pipes


           Kindly help me how to resolve this.



    Thanks for your help...

     

     


    Monday, December 31, 2007 4:18 AM

Answers

  • Let's assume you have not lost your marbles and you aren't exposing a live SQL Server instance on the Internet.

    As you have figured out, most SQL Server instances are installed to be hidden on the LOCAL area network (LAN) by disabling the ports and protocols needed to accept commands from remote LAN clients. In addition, you'll also need to open the firewall to accept access to/through the port(s) being used. If you're accessing the server instance by name then the SQL Browser service also needs to be running. However, I don't think you're getting that far. Let's see the ConnectionString.

     

    See my whitepaper on getting connected. http://betav.com/blog/billva/2006/06/getting_and_staying_connected_1.html

     

    hth

     

    Monday, December 31, 2007 10:02 PM
    Moderator

All replies

  • Hello,

     

    In your error message, i have seen  Error : 25 Connection string is not valid

    Could you post your Connection string ?

     

    Maybe check whether there is not a problem with DataSource = "tcp:instancename,1433" , if i remember the syntax ?

     

    Have a nice day

    Monday, December 31, 2007 9:04 AM
  • Let's assume you have not lost your marbles and you aren't exposing a live SQL Server instance on the Internet.

    As you have figured out, most SQL Server instances are installed to be hidden on the LOCAL area network (LAN) by disabling the ports and protocols needed to accept commands from remote LAN clients. In addition, you'll also need to open the firewall to accept access to/through the port(s) being used. If you're accessing the server instance by name then the SQL Browser service also needs to be running. However, I don't think you're getting that far. Let's see the ConnectionString.

     

    See my whitepaper on getting connected. http://betav.com/blog/billva/2006/06/getting_and_staying_connected_1.html

     

    hth

     

    Monday, December 31, 2007 10:02 PM
    Moderator