Comments (33)

  1. Tim says:

    I’m having an issue connecting (using the TCP/IP provider) from our Vista laptops to SQL server express (located on another computer running Windows SBS 2003).  The Vista laptops are joind to the same domain as the server.  There is no problem when connecting from a Windows XP computer, joined to the same domain.  I’ve disabled UAC and the firewall on the Vista computers.  When attempting to connect as <server><instance> the error is "error 26: Error locating server/instance specified".  When attempting to connect as <server><instance>,<port> ther error is: "error 0: No connection could be made because the target maching actively refused it".  Any ideas as to what to try next?

  2. My suggestion for you is to ping your Server machine from both the XP and Vista computers. Compare the results. Hopefully they match. Then try your connection from the Vista machine using this IP address (the one from the XP, if they are different): <IP address>,<port>. Make sure you specify the correct port from the SQL Server errorlog. You don’t need to specify the instance name if you explicitly specify the port.

    You also mention that you have UAC disabled, but I recommend you still try your application under elevated mode (run as administrator).

    Let me know what you observe; this will give me a better clue to what the problem may be.

    Thank you

    Stoyko Kostov

  3. Tim says:

    Hello Stoyko,

    Thanks for your suggestions.  After pinging the server from both computers I get the same ip address.  After attempting to connect to the server using <server ip>,<port> while running as an administrator I get "error 0: No connection could be made because the target machine actively refused it."

    Thanks for your assistance,

    Tim

  4. Could you please check that the very same connection (<server ip>,<port>) succeeds from the XP machine?

    Could you also please attach a portion of the SQL Server errorlog (from <installed dir>MSSQLLOG, most likely Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOG)? Feel free to mask any sensitive information you may have in the log; actually, I’m mostly concerned about the line that gives information about the port number, something like

    Server is listening on [‘any’ <ipv4> <Port Number>] or [<ipaddress> <ipv4> <Port Number>].

    Lastly, could you please give some information about the app you’re using to connect to SQL Express? Is it the same on XP and Vista? Does it have the same version?

    If nothing helps, you probably have some restrictions on your Vista machine that are not SQL Server related. The error message you see usually indicates that either the port number is incorrect or the target machine is not listening on it, so if exactly the same thing works from your XP box, neither of these would be possibility. Please also see the blog at http://blogs.msdn.com/sql_protocols/archive/2005/09/28/474698.aspx, it discusses the meaning and troubleshooting of this error message.

    Thank you

    Stoyko Kostov

  5. Michael Eber says:

    When I attempt to connect to SQL Server 2005 Express on Vista, and doing so with TCPIP and a .NET 3.0 application, I get an 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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

    I have Named Pipes Enabled.  I have the server instance set to allow remote connections.  I have the user name defined in Security.  I just keep getting refused on my Vista box.

    We have found that we get this error when the login is not allowed to sign on to Sql Server.  However the userID is allowed and successfully connects to servers running under Windows Server 2003.  The error logs don’t show anything to help trace the problem.

  6. Flon says:

    I have the same problem as Tim above running a vista client.

    I have been stuck on this for over a week.

    I have uninstalled and reinstalled multiple times and turned of the client firewall and virus software.  The server is fine I can connect from an XP box with the same login.

    I have SQL 2005 SP2 installed on my client machine.  The server is 2005 and has SP1.  Remote conns allowed port 1433 open etc

    I am going to have to spend next weekend installing XP if I cant solve this.

    "The list of databases for the specified SQL Server could not be retrieved:

    A connection was successfully established with the server, but then an error occurred during the pre-login handshake.

    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.)

    "

  7. You are not alone.  I have this same problem.

  8. Ramesh Marikhu says:

    I am having a problem with SQL Server when I try to connect from Visual Studio.

    I have done the following (along with multiple re-installs and in numerous combinations):

    While installing, uncheck the "Hide Advanced options"

    Specify mixed authentication and provide the password for sa

    Select the Add Administrator to sysadmin Role checkbox while installing.

    After installation,

    Enable TCP/IP and named pipelines through Surface Area COnfiguration or via My Computer> Manage > Services and Applications > SQL Server Configuration Manager > SQL Server 2005 Network Configuration > Protocols for SQLEXPRESS >>> Enable TCP here.

    Specify SQL Server executable C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnsqlservr.exe as an Exception Program in Firewall

    Enable SQL Browser Service (if not already specified during install)

    Specify SQL Server Browser C:Program FilesMicrosoft SQL Server90Sharedsqlbrowser.exe as an Exception Program in Firewall.

    I guess thats it. My SQL server works but i do not know why i keep getting this 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:SQL Network Interfaces, error:26 – Error Locating Server/Instance Specified).

    —————————————–

    On the other hand, I can log in into the server with both windows authentication and SQL Server Authentication via the SQL Server Management Studio. So why is it not possible from Visual studio? Any ideas – please help.

  9. Ramesh Marikhu says:

    In addition to above, (I just missed out mentioning, but did not miss out in configuration), I have also enabled the remote connections by selecting both TCP and managed pipelines from the SQL Surface Area Configuration. I had earlier thought this was the problem, but the error still comes up saying that MAY BE the failure is caused due to the fact that SQL Server does not allow remote connections!!!!. Please help.

  10. rb says:

    I have de the same problem, please somebody can help me please

  11. Amit says:

    I had the same problems connecting to SQL Developer Edition, but had also one sucess:

    I installed SQL Express Edition with a default name and could connect this instance from remote.

    A named instance of Express Edition caused again connection problems, so only default name (MSSQLSERVER) was sucessfull.

    I couldn’t find the differences between instance with a default name and named instance.

  12. Totigo says:

    yo tengo el mismo problema!

    Tengo Sql Server 2005 corriendo en Windows Server 2003.

    Los Clientes XP conectan sin problema a una base de datos de mi servidor, pero los clienetes vista no pueden.

    He rebisaado Firewall cliente y Servidor, he hecho multiples paso que he leido en foros y sin embargo no he encontrado la solucion. Si la encuentro lo estaré escribiendo en este post.

    Si alguien puede sugerirme algo! gracias! gerencia@apoloweb.com

  13. totigo says:

    Señores logre solucionar mi problema!!

    Todo se devia por permisos o provilegios en el Windows Server 2003. Para los que estna teniendo el mismo inconveniente rebise los permisos en el servidor.

  14. totigo says:

    !!!!! HECHO PROBLEMA SOLUCIONADO!!!!

    Señores logre solucionar mi problema!!

    Todo se debia por permisos o provilegios en el Windows Server 2003. Para los que estan teniendo el mismo inconveniente revise los permisos en el servidor.

  15. bguardia says:

    For English readers, a summary of totigo problem:

    He had a problem, his XP clients connected correctly but Vista clients weren’t. The solution was to correct server permissions.

  16. totigo - gerencia@apoloweb.com says:

    Yeah!! windows server permissions is the solution!!

  17. Jamie says:

    I had the same problem with tcpip, connecting to <hostname>SQLEXPRESS only worked on named pipes, finally i just connected to <hostname> over TCP/IP and it worked. I don’t know about named instances and whether they will work (vista 32bit)

  18. Jamie says:

    NOTE: this STOPPED working later, i don’t know why

  19. One of the nice things about moving from VS2005 to VS2008 is that you no longer need to run as admin

  20. One of the nice things about moving from VS2005 to VS2008 is that you no longer need to run as admin

  21. Christy says:

    I’ve got SQLExpressSP2 on a Vista machine, with a named instance.  You have to enable sqlbrowser, and you have to allow sqlbrowser.exe and sqlserv.exe through the firewall.  This allows me to use SQL Server Studio on another machine to connect to that instance.

  22. Mike says:

    I was getting this same problem on Windows XP with SP3… does SP3 introduce anything that might cause this same problem on XP?

    The solution I used was to simply add my windows account as a user in SQL… even though the BUILTINAdministrators group was listed as sysadmin.

  23. dawar says:

    Use sql native client for connecting to sql server 2005 in vista..

  24. nikhil says:

    I also found the following message if any one found solution about this pls tell me the solution at nikhil338389@gmail.com

    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:26 – Error Locating Server/Instance Specified).

  25. David Duranceau says:

    I’m having this same issue using a client application, written in C#, running on a Vista Biz PC connecting to a SQL 2005 Standard Edition with the latest SP installed.  XP clients work perfectly, but not the Vista clients.  Firewalls are turned off, permissions are okay,  named pipes and tcp/ip ok, standard ports (1433, 1434) open, tada tada tada.  If anyone truly solves this, please let me know.  I am about to toss Vista out the window.

  26. Sorry, forgot to leave my email.

  27. what is the final resoultion for this connectivity issue.

    regards,

    chandra pathivada.

  28. Mahesh K says:

    Hi,

    I have installed SQL Server 2005 on a Vista Business. I am able to connect to SQL Server instance on Vista machine from Management Studio on other machine (Running on Xp).

    But I am not able to connect to Analysis Services default instance on Vista Business machine from Management Studio(Client) on other machine (Running on Xp).

    I did all settings with Vista firewall exceptions, SQL Surface area configuration, Security, everything.

    Please tell me do I need to modify something else on ‘Vista Business’.

    Thank you.

  29. Jillian says:

    What were the server permission that needed to be corrected for the Vista box to work.  My XP box is fine but the Vista laptop with the same code base is not.

    Jillian@lockedinsteel.com

  30. Kimberly says:

    Yea!  Which Permission?????  You kinda left me hanging here!!!  I have been researching this problem for hours now and this site seems to be the one that is having exactly the same problem as me.  Vista machine with SQL server, XP machine fine, additional Vista machine not able to connect.

    Please give a little more details!!!!

  31. Mirza H. - Bosnia says:

    I found that SQL Server Browser windows service, after MSDE (SQL Serv Expr) is instaled, sometimes is disabled. I spend days looking for regular options to enable network loging, network services etc.etc.and everything was fine, but network loging simply did not worked.

    When I enabled and started this service miracle happend…

    Before this afcourse you have to check with Configuration Manager is TCP/IP Clieant protocol enabled, with Management Studio is Sql Server authentication mode selected, and those standard things. After those checks everything worked for me at Vista and XP.

    Regards.

  32. biyi says:

    am new to sql database,after installing the required software i tried to conect to the database and i got the following error TITLE: Connect to Database Engine

    ——————————

    Cannot connect to ADEJ-PCSQLEXPRESS.

    ——————————

    ADDITIONAL INFORMATION:

    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: 26 – Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

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

    ——————————

    BUTTONS:

    OK

    ——————————

    pls can you help me out

    my email is adej20032000@yahoo.com