SQL Server 2005 Connectivity Issue Troubleshoot - Part I

This post provides some tips to troubleshoot Sql Server connection problems based on various displayed error messages. And, I will describe connection problems according to different client stack: SNAC/MDAC/SQLClient. Thus, there are 3 parts for this topic.

 

First Part – Troubleshoot SNAC connect to SQL Server 2005

Second Part - Troubleshoot MDAC connect to SQL Server 2005

Third Part – Troubleshoot SqlClient connect to SQL Server 2005

 

Before start, it is very important to identify which client connected to Server and failed. Here, I list out follow key terminology in Sql Server Connection.

 

SNAC - A new data access technology that is new in SQL Server 2005, and is a stand alone data access application programming interface that is used for both ODBC and OLEDB.

 

MDAC - Microsoft Data Access Component contains core data access components, such as OLEDB provider and ODBC provider.

 

SqlClient  - Access data from within a CLR database object by using the .NET Framework Data Provider for SQL Server.

 

Protocol Prefix: explicitly specify which protocol you want to use to make connection. Supported protocol prefix in Sql Server 2005 includes: “lpc:”, “np:”, “tcp:”, “via:”

 

Last connect cache – contains the fully resolved/specified connection strings for the instances that were successfully connected to. 

 

Part I – Connection Fail when SNAC connects to Sql Server 2005

 

Use osql.exe to simulate the connection string in your application and quick troubleshoot if your application uses ODBC provider and use sqlcmd.exe for OLEDB provider. They are located in %SYSTEMDRIVE%Program FilesMicrosoft Sql Server90toolsbinn.

 

Basic connection string:          osql(sqlcmd) /S[prefix]<servername> /E

                                                Osql(sqlcmd) /S[prefix]<servername><Instance> /E

In each follow Message, there are two, one is from ODBC, and the other one is from OLEDB.

 

Message 1:

 

[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]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.

-OR-

 

HResult 0x35, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [53].
Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

This indicates that your target server can not be accessed or does not exist. Try to use "ping <servername>" , " ping <ipofserver>" , "ping -a <ip>", If either of the pings time out, fail, or do not return the correct values, then either the DNS lookup is not working properly or there is some other networking or routing issue that you will need to resolve.

 

Message 2:

 

[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL

Server [2].

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

 

-OR-

 

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

This error message means that the server was not found or not running or can not make Named Pipe connection through the pipe name that client specified. To verify this:

 

1) From the command line, do "sc query mssqlserver" or "sc query mssql$<instancename>" to check whether sql instance present.  Then open sql server configuration manager -> check the state of the sql service, if it is not running, start it. If server started fail, check event log or server error log, see what happened there.

2)  if you are sure the service is running and shared memory/Named Pipe enabled, please try connection if it is local default instance "osql /Snp:\.pipesqlquery"; or try connection "osql /Snp:\.pipemssql$<InstanceName>sqlquery" if it is local named instance. if you still get error 2, then go to step 3).

3) Double check the server is started and listening on named pipe if you enabled Named Pipe. One way is that see the ERRORLOG of the server, search follow keywords: 

Server named pipe provider is ready to accept connection on [ \.pipesqlquery ] or [\.pipemssql$<InstanceName>sqlquery] 

Notice that "sqlquery" is the default pipe name, so you need to know server is listening on which pipe name. eg: if you specify server pipe name is "sqlquery1", then you would see in the errorlog that server listening on [ \.pipesqlquery1 ]. 

4) See your connection string, whether you explicitly specify the pipe name and does it match the pipe that server is listening on? Or whether you just specify server name( like ".","(local)", etc), but you specify the wrong pipe name on client side Named Pipe configuration.eg, go to SQL Server Configuration Manager, click client Named Pipe properties, see whether the pipe name is same with the one server listening on. 

Note: For remote connection, you need to verify step 2) and 3).  

Message 3:

 

[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL

Server [233].

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

 

 

-OR-

 

HResult 0xE9, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [233].

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

Note: the difference between Message 2 and Message 1 is “Could not open a connection to SQL Server [233].” – error state.

 

You might specify the server name as FQDN/127.0.0.1/ IP Address and NP was disabled on the server. To resolve this, first way is to replace server name as the machine name or “.” or”(local)” or “<machinename>” and you should be able to connect as long as server listening on Shared Memory; second way is to enable named pipe from sql configuration manager and restart server.

 

Message 4:

 

[SQL Native Client]Named Pipes Provider: No process is on the other end of the pipe.

[SQL Native Client]Communication link failure

[SQL Native Client]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.

 

-OR-

 

HResult 0xE9, Level 16, State 1

Named Pipes Provider: No process is on the other end of the pipe.

Error: Microsoft SQL Native Client : Communication link failure.

Error: Microsoft SQL Native Client : 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..

 

1) Local connection: You might specify the server name as FQDN/127.0.0.1/ IP Address in the connection string and speculate connection through Named Pipe provider. To resolve this, either change server name to <machinename> as long as the server is listening on Shared Memory or enabled NP.

2) Remote connection: the server is not listening on Name Pipe. To resolve this, enable name pipe on the remote server and restart the server.

 

Message 5:

 

[SQL Native Client]SQL Network Interfaces: Server doesn't support requested protocol [xFFFFFFFF].

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

 

-OR-

 

HResult 0xFFFFFFFF, Level 16, State 1

SQL Network Interfaces: Server doesn't support requested protocol [xFFFFFFFF].

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

1) Local connection: You might explicitly specify protocol prefix “np:” and connect to a named instance and NP was disabled.

2) Remote connection: You might connect to remote named instance and remote server is not listening on name pipe.

To resolve this, enable NP if you only want to use name pipe protocol or you can remove “np:” prefix to let connection over shared memory locally.

 

Message 6:

 

[SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [0xFFFFFFFF].

[SQL Native Client]Login timeout expired

[SQL Native Client]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 remot the connections.

 

-OR-

 

HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

You might connect to local named instance and explicitly specify protocol prefix “tcp:” or “np:” in the connection string, however, SqlBrowser service was not running.

To resolve this, you should enable Sqlbrowser service on the server

1) Use net start or go to sql configuration manager(SSCM), check whether sqlbrowser service is running, if not, start it.

2) You still need to make sure SqlBrowser is active. Go to SSCM, click properties of sqlbrowser service -> Advanced-> Active “Yes” or “No”, if sqlbrowser is running but is not active, the service would not serve you correct pipe name and Tcp port info on which your connection depends.

 

Message 7: Shared Memory provider error

 

HResult 0x2, Level 16, State 1

Shared Memory Provider: Could not open a connection to SQL Server [2].

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

-OR-

 

 

[SQL Native Client]Shared Memory Provider: Could not open a connection to SQLServer [2].

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

The error indicate you speculated shared memory as connection protocol and server is not listening on shared memory, plus you probably specified “.”/”(local)”/<machinename> /localhost as the server name in the connection string. To resolve this, enable shared memory protocol and restart the server.

 

Message 8:

 

[SQL Native Client]SQL Network Interfaces: Cannot open a Shared Memory connection to a remote SQL server [87].

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

 

-OR-

 

HResult 0x57, Level 16, State 1

SQL Network Interfaces: Cannot open a Shared Memory connection to a remote SQL server [87].

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

The reason is same as the one of Message 6, just you might specify FQDN/127.0.0.1/IP Address as server name in the connection string.

 

Message 9: TCP specific

 

[SQL Native Client]TCP Provider: No connection could be made because the target machine actively refused it.

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

 

-OR-

 

HResult 0x274D, Level 16, State 1

TCP Provider: No connection could be made because the target machine actively refused it.

Error: Microsoft SQL Native Client : 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..

Error: Microsoft SQL Native Client : Login timeout expired.

 

The reason is server is not listening on TCP, probably TCP protocol was not enabled.

 

-Follow messages are some special case -

 

 

Message 10:

 

[SQL Native Client]Unable to complete login process due to delay in opening server connection.

 

Reason:

1) There are spaces after Instance name in the connection string eg. osql /S”<machinename>Instance  “ /E, to resolve this, you need to remove the trailing space.

2) Connect through 127.0.01.

3) Remote connection and WINS was disabled on the client machine and you connect using FQDN as server name. To resolve this, One way, turn on “File and Printer Sharing” and explicitly use name pipe protocol. Another is enlarge the connect timeout to around 30 secondes.

 

Message 11: - Firewall specific

 

HResult 0x274C, Level 16, State 1
An error has occurred while establishing a connection to the server. When connectiong 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, errror:0-A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

 

-OR-

 

Error: Microsoft SQL Native Client : 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..
Error: Microsoft SQL Native Client : Login timeout expired.

 

This is because connection blocked by firewall. To resolve this, take follow steps:

1) Enable SqlBrowser, see the info in Message 4. Plus, add sqlbrowser.exe into Firewall exception list: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfileAuthorizedApplicationsList
2) Add Tcp port to Firewall exception list. (eg, Name-1433:TCP, Value-1433:TCP:*:Enabled:Tcp 1433).

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfileGloballyOpenPortsList

F

Comments

  • Anonymous
    November 09, 2005
    Thanks. This resolved my issue!

  • Anonymous
    November 09, 2005
    I still get the error 2 ("Named Pipes Provider: Could not... [2]") even when I've make sure that the server is running, all protocols are enabled and the firewall is deactivated (i don't know if it can cause problems, but...). I've already tried to reinstall (CTP, September) with the same results, so the problem is likelly a configuration one. Are there more locations to re-verify that the server is up and running apart the Control Manager itself or Control Panel -> Services? Thanks.

  • Anonymous
    November 10, 2005
    The comment has been removed

  • Anonymous
    November 10, 2005
    The comment has been removed

  • Anonymous
    November 12, 2005
    Hi,Kevin
    1) As for Management Studio,is there any error displayed when you were trying to lauch it? You can go to "%ProgramFiles%Microsoft SQL Server90Setup BootstrapLOG"Summary.txt to see whether there is error or warning?
    2) What is the error message you saw when you tried to make connection through sqlcmd.exe,how do you make connection?("sqlcmd /S /E" or others?) what if you try osql.exe? If you can attach the error message and the connection string, I can help you identify the cause much faster.

    Thanks!

  • Anonymous
    January 06, 2006
    The comment has been removed

  • Anonymous
    January 10, 2006
    Tony, in the error "Logon Error: 18456, Severity: 14, State: 16" state 16 implies a problem switching the database context to the user's database. Given the arguments you're passing to sqlcmd.exe it looks like this would be "myDatabase". Try looking for any reason why this database would be unavailable at the time the login attempt occurred. Specifically operations that might take the database offline like backup or restore.

    Hope this helps,
    Vaughn

  • Anonymous
    January 10, 2006
    The comment has been removed

  • Anonymous
    February 15, 2006
    Fantastic - spent days try to connect and this has sorted it. Thanks a lot!

  • Anonymous
    February 26, 2006
    C:>sqlcmd -S zyltestip01.china.***.comSQLEXPRESS
    HResult 0xFFFFFFFF, Level 16, State 1
    SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
    shing a connection to the server. When connecting to SQL Server 2005, this failu
    re may be caused by the fact that under the default settings SQL Server does not
    allow remote connections..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired

  • Anonymous
    February 28, 2006
    been trying the error [2] but in osql I get "No user selected", I then try my current login and still it does not work.
    I'm using SQLExpress 2005 that comes with Visual C++.
    Are the Start/Stop service UIs the only tools?

  • Anonymous
    March 04, 2006
    The comment has been removed

  • Anonymous
    March 11, 2006
    The comment has been removed

  • Anonymous
    March 11, 2006
    Please ignore my posting above.

    It didn't work even with default install.

    Fortunately, since I was installing SQL 2005 on Microsoft Virtual Server 2005 R2, I simply undo all changes (reverted back to sysprep) and started from the scratch and now the installation is successful.

    It doesn't explain why it didn't work in the first place...

    Thanks,

  • Anonymous
    March 13, 2006
    Hi, ypae

       The error you saw in the first place might due to you disabled shared memory on the server or server was not stared properly during installation. Next time, when you came across any setup problem, please go to c:program filesMicrosoft SQL Server90Setup BootstrapLOG, there is a summary.txt which points you that setup log files. With the log, you can figure out what was going on during installation.

    Thanks!
    Ming.

  • Anonymous
    March 22, 2006
    I tried to connect to the SQL server Express 2005 database from my Pockect PC Emulator(Visual Studio 2005). I use C#.net and Remote Data Access method. so I used pull method of the RDA object. But there is a error on my Pockect PC Application like {"Failure to open SQL Server with given connect string. [ connect string = Provider=172.16.10.48,1433; Data Source=172.16.10.48\SQLEXPRESS;Initial Catalog=LocalDBInsurance;User ID=Niluka;Password=windowsloginpassword ]"}
    and
    I also used the connection string as Provider=SQLOLEDB.1; Data Source=172.16.10.48\SQLEXPRESS;Initial Catalog=LocalDBInsurance;User ID=Niluka;Password=windowsloginpassword. But these 2 were not worked.

  • Anonymous
    March 22, 2006
    Please overcome this

  • Anonymous
    March 23, 2006
    Hi, Thara

       1) The first connection string you used has wrong value for the "Provider" part, please search connection string properties in SQL Server Book Online for OLEDB provider.

       2) The second connection string you use seems good, but I do not know why you fail to connect. Please visit our Express blog to troubleshoot:
    http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

       3) We also noticed that it seemed that you try to use windows authentication from "windowsloginpassword", however, you should use connection property "Trusted_Connections=yes" instead of explicitly inputting password of windows account;unless you use SQL Login, you should use "User ID and Password".

    Thanks!
    Ming.

  • Anonymous
    March 27, 2006

    Hello,
    I have the following error while running this command:

    C:>sqlcmd -S <servername>SQLEXPRESS
    HResult 0xFFFFFFFF, Level 16, State 1
    SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
    shing a connection to the server. When connecting to SQL Server 2005, this failu
    re may be caused by the fact that under the default settings SQL Server does not
    allow remote connections..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

    When I run the above sqlcmd command on the client workstation (with SQL 2005 Express installed),
    I still get above error even though
    1. SQL Server Browser service is already running & active.
    2. All Share Memory, Named Pipes, TCP/IP Protocols for SQLEXPRESS & Client Protocols are Enabled.
    3, 'Local and remote connections-Using both TCP/IP and named pipes' are enabled.

    Are there anything I miss?
    Thanks

  • Anonymous
    March 28, 2006
    Hi,Lim

      Are you sure your sql server is running? Or whether you restarted the service after enabling the TCP or NP?
    1) If it is local connection, please see the SERVER ErrorLog to double check.
    2) If it is remote connection, please follow the instruction below http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx.

    For best practice and troubleshoot tips to make connection to SqlExpress, please visit our blog:
    http://blogs.msdn.com/sql%5Fprotocols/

    Thanks!
    Ming.

  • Anonymous
    April 30, 2006
    Hi there,

    I am wondering if I can get some help with connectivity to SQL Server Standard 2005.

    The obvious problem that I have is there is no protocols found in sql server 2005 network configuration (in SQL server configuration manager).

    The next thing I did was to run sqlcmd from command prompt and I received message as follow:

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:>sqlcmd
    HResult 0x2, Level 16, State 1
    Named Pipes Provider: Could not open a connection to SQL Server [2].
    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
    shing a connection to the server. When connecting to SQL Server 2005, this failu
    re may be caused by the fact that under the default settings SQL Server does not
    allow remote connections..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

    I think this is server-side related problem since none of the server's network protocol can be found. I have tried reinstall SQL server 2005 and .NET 2.0 but to no avail.

    Thanks.

  • Anonymous
    May 01, 2006
    I have seen that this problem can occur if you install SQL when the machine has no network hardware installed or enabled (sql can't find any networking support).  Does your machine have a network card?

  • Anonymous
    May 01, 2006
    The comment has been removed

  • Anonymous
    May 20, 2006
    Hello, I have a serious problem and I need a resolve as fast as you can. I have installed sql server 2005 express edition. By default the shared memory is enable and all others are disable. I enabled all of them and I tried to connect through the SQL MANAGER EXPRESS EDITION. Anyway I can login only with Network protocol SHARED MEMORY. But when I run the sqlcmd I have the following error:
    C:Program FilesMicrosoft SQL Server90ToolsBinn>sqlcmd -U sgvaultuser
    Password: HResult 0x7E, Level 16, State 1
    Shared Memory Provider: The Shared Memory dll used to connect to SQL Server 2000 was not found [126].
    Sqlcmd: Error: Microsoft SQL Native Client : 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..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

    Can any one tell me why I cannot connect through the sqlcmd utility? I have WinXP SP2

    Thanks Elias

  • Anonymous
    May 21, 2006
    The comment has been removed

  • Anonymous
    June 20, 2006
    Persone los pioneros non rabata. Great...

  • Anonymous
    August 08, 2006
    I get the following when trying to log in using

    osql -S instancename -U sa

    [SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
    [SQL Native Client]Login timeout expired
    [SQL Native Client]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.

    if I run it as
    osql -S 127.0.0.1 -U sa
    it logs in.

    Shared Memory, TCP/IP, Named Pipes all enabled, and in that order.

    Named Pipes not working with .pipemssql$instancenamesqlquery    or
    .pipesqlquery

    stopped and started services after each change.

    any help?

  • Anonymous
    August 08, 2006
    Figured it out.  The instancename was not the same as the server name.  When I do

    osql -S servername -U sa

    it works.   It's the only instance on this machine.  I'm an idiot.

  • Anonymous
    August 25, 2006
    Hi there, i hope i can get some help here :(
    I've been for about 3 days trying to connect VS2005 to my MS-SQLServer2005, what is working :
    ->I can connect trough SQL Server Management Studio , and Add, remove, edit any database
    ->I have allowed remote connections in SQL Server Surface Area Configuration
    ->My winXP SP2 firewall is off, and i don't have other
    ->In VS2005 i configure the webparts,membership providers to MSSQL2005 and work just fine

    Now the things that don't work:

    ->sqlcmd -S XPTO_NAMEMSSQLSERVER
    HResult 0x57, Level 16, State 1
    SQL Network Interfaces: Connection string is not valid [87].
    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
    shing a connection to the server. When connecting to SQL Server 2005, this failu
    re may be caused by the fact that under the default settings SQL Server does not
    allow remote connections..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

    ->When i try  in VS2005 create a Data Connection (under the server explorer) the only Server name is the instanse name of SQLEXPRESS, i already try to put the .MSSQLSERVER2005, but when i try to select any database show none, and the test connection faild

    Some configuration that i have:
    -> in the web.config of my application, the connection string that VS2005 use to save webparts information : <add name="LocalSQLServer" connectionString="&#xA;      server=(local);&#xA;      Trusted_Connection=False;&#xA;      uid=sa;&#xA;      password=12345;&#xA;      database=aspnetdb&#xA;" />, this work just fine.
    ->I have two sql server, the 2005 express and the 2005 developer edition

    Now anyone can help me to figure out whats wrong ? why the sqlcmd doesn't work ?

  • Anonymous
    August 28, 2006
    Hi, rstons

    1)

    sqlcmd -S XPTO_NAMEMSSQLSERVER
    HResult 0x57, Level 16, State 1
    SQL Network Interfaces: Connection string is not valid [87].

    The problem: "MSSQLSERVER" is not a valid instance name for SQL Server. If you installed a default instance, <machinename> can be the representitive of the default instance, hence, you need use "sqlcmd /S<machinename> /E"

    2)SQLExpress has fixed instancename, sqlexpress, so, when you make connection to the named instance sqlexpress, you should use ".sqlexpress" instead of ".MSSQLSERVER2005".

    More info about sqlexpress, please check another blog:

    http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

    Thanks!
    Ming.

  • Anonymous
    August 28, 2006
    Thanks Ming,
    But i still can connect to MS SQL Server 2005, can you help construct the connection String that i must use to access throw visual studio 2005 to my BD ?

    Thanks
    Rui

  • Anonymous
    August 29, 2006
    Hi, Rui

       If you try to connect to default instance, use following connection string:
       
    "Provider=SQLNCLI; server=<macinename>;  Trusted_Connection=No;     uid=sa;password=12345;database=aspnetdb"

    In your connection string, you did not specify provider, "sqlncli" is SQL2K5 OLEDB provider, and also, it is "No" not "false" in "trusted_connection" field.

    2) If you connect to named instance, let's say 2k5 express, try following connection string

    "Provider=SQLNCLI; server=<macinename>sqlexpress;  Trusted_Connection=No;     uid=sa;password=12345;database=aspnetdb"

    Good Luck!
    Ming.

  • Anonymous
    September 18, 2006
    Complaint: server is slow to very slow.
    Remedy:
    After the heavy burden of reinstalling MSSQLServer2005Express and .NET Framework, users, etc., we still had the same chain of timeouts on the test client.
    Finally MS Access was reinstalled on the client, extended with all(2?) features relating to .NET Framework. And that made things fly again like old times.

    Hard to prove to be the cause, but my client MS Access got corrupted suddenly after the last MS XP update, Thursday 14. September 2006.

    Hope to have helped out my fellow sufferers.

  • Anonymous
    September 26, 2006
    I am trying to connect sql2005 remotely but it always gives

    login failed for user "xyz"
    Server Name: serverName
    Error Number: 18456
    Severity: 14
    State: 1

    The login ID/password is coreect as I have checked it from different machines and it works fine. Only my machine can't connect to the server.
    Please help me in this regard.
    Thanks

  • Anonymous
    September 26, 2006
    Hi Frank,

    Take a look at this blog posting to understand how to determine the root cause of the login failure: http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

    Il-Sung.

  • Anonymous
    September 26, 2006
    Hi

    I tried it says
    [Sql Native Client]Tcp Provider: No Such host is known.
    and the remaining error Messages.
    Rgds,.

  • Anonymous
    September 27, 2006
    Hi, Nachi

       Can you provide your connection string, which server were you trying to connect, you can " ping <machinename>" to see whether the server is reachable.

    Thanks!
    Ming.

  • Anonymous
    October 20, 2006
    For those of us who are used to SQL Server 2000, the solution is a change to the query string.  SQL Server 2000 only required the server name in the query string.  2005 Express requires "servernameSQLEXPRESS".

  • Anonymous
    October 29, 2006
    Hi i keep getting this error when trying to connect to SQL. Sqlcmd: Error: Microsoft SQL Native Client : Cannot generate SSPI context.

  • Anonymous
    November 16, 2006
    Another reason for this issue is the use of square braces when specifying the data source in the code. E.g [ServernameInstance] will not let you connect and generate -26 error

  • Anonymous
    November 16, 2006
    I am getting this error on all machines except the one where I started developing. "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)" The issue here is I am trying to connect to SQL Server 2000 database. The statement I used in web.config is <appSettings>    <add key="connectionString" value="Data Source=192.168.50.5;Initial Catalog=tanger;Persist Security Info=True;User ID=sa; Password=sa"/>      </appSettings> Can you suggest any solution to overcome this.

  • Anonymous
    November 18, 2006
    The comment has been removed

  • Anonymous
    November 18, 2006
    PingBack from http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx

  • Anonymous
    November 23, 2006
    The comment has been removed

  • Anonymous
    November 23, 2006
    The comment has been removed

  • Anonymous
    December 05, 2006
    Please let me know how to increase user connections SQL Server 2005?

  • Anonymous
    December 06, 2006
    I am having connection issues... using the command: C:>osql -S <servername>SQLEXPRESS -U sa Password: [SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. [SQL Native Client]Login timeout expired [SQL Native Client]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. ALL of the protocols are on and should be working.  I can connect locally.  Any ideas?!

  • Anonymous
    December 08, 2006
    Hi, Tomo    The issue you came across is because you might not enable remote connection in sqlexpress. Please check following blog:   http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx Good Luck! Ming.

  • Anonymous
    December 09, 2006
    Hi, Mia    Can you be more specific to the question: "Please let me know how to increase user connections "?

  1. Does your client application  run out of tcp port? check following KB: http://support.microsoft.com/kb/328476
  2. Do you mean you want to increase cucurrent connections to SQL Server? Then search "Set User Connections" in SQL Server 2005 booksonline. Good Luck! Ming.
  • Anonymous
    December 15, 2006
    The comment has been removed

  • Anonymous
    December 19, 2006
    The comment has been removed

  • Anonymous
    December 21, 2006
    The comment has been removed

  • Anonymous
    December 28, 2006
    Hi, Nadir    1) If you were making remote connection, please double check whether you enable sqlbrowser service, and add it to the firewall exception list.    2) Try enable np or tcp on your remote sql server, and restart the sql service, plus enable "File and printer sharing" in firewall, or add your sql tcp port to firewall exception list.    3) Double check whther you were making connection to a named instance, if so, please modify your connetion string: "... Server = <ip><Instnacename> ..."    Finally, for more troubleshooting tips of remote connection, please see the following blog: http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx Good Luck! Ming.

  • Anonymous
    January 04, 2007
    The comment has been removed

  • Anonymous
    January 18, 2007
    Hi, I'm trying to use a DTS between two different servers but I get the "Message 1". Whish ports do I have to add to the firewall exception list?

  • Anonymous
    January 21, 2007
    Hi, Yesid    Were you make remote connection? So, please make sure    1) "File and Printer Sharing" is in your firewall exceptionlist. you can verify by "net view &lt;yourserver>" from your client.    2) Check sql errorlog, see whether your sql has tcp enabled and which tcp port it is listening on. Then add this port to the exception list.   If your sql server is default instance, then it is port 1433, otherwise, you need to double check the ERRORLOG. Good Luck! Ming.

  • Anonymous
    January 23, 2007
    The comment has been removed

  • Anonymous
    January 28, 2007
    Hi, James    Does your client application use same driver or provider as Osql which is using odbc driver. The error indicated that your client driver was not correcl installed, so, suggest you reinstall client_components from SQL2005 installatin package. Good Luck! Ming.

  • Anonymous
    February 04, 2007
    Hi, I have sql server running on a remote host and i am not able to connect to the machine without specyfing the port. like sqlcmd -S bentleysqlexpress -U salil -P Qpppwd1234 -d salil does not connect but sqlcmd -S bentleysqlexpress,1173  -U salil -P Qpppwd1234 -d salil does. Kindly help me with the settings.

  • Anonymous
    February 05, 2007
    hi everyone How can I connect to remote sql server behind router? How can I connect with passive connection?

  • Anonymous
    February 05, 2007
    SQL has two hurdles to deal with when connecting.   #1. Dynamic port resolution, or "What port is SQL running on?". #2. Once I know the port, can I connect to the port. #1 dynamic port resultion is blocked by most firewalls by default today, this is UDP port 1434.  If you want dynamic port resolution, you need to open up UDP port 1434 on your firewall and also ensure that the SQL Browser Service is running for SQL 2005.  Also note that dynamic port resolution only works on named instances, it does not work for default instances.  So if you changed the tcp port for the default instance, #1 will never work for you, the client MUST know the port to connect to. #2. Now that I know the port, why can't I connect to the port?  This one is just basic tcp-ip 101.  Can I ping the IP?  Can I telnet to the port (telnet 123.123.123.123 1433)?  You could be blocked by the firewall or router or IPSec policy, you need to open these up for the specified target port and then everything will work. So to successfully resolve #1 and #2, you need to know what port your SQL is running on.  Start SQL and examine the ERRORLOG to see what tcp-ip port it is listening on.  Perhaps you have not configured SQL to listen on TCP-IP at all, check the configuration tools and enable TCP-IP for the instance, etc...

  • Anonymous
    February 06, 2007
    The comment has been removed

  • Anonymous
    February 06, 2007
    In my previous message, I forget to ask whether Management Studio using a connection string which specifies protocol prefix "tcp:" or "np:" when it tries to connect to a local named instance?  If yes, what is the connection string look like and how to view it?

  • Anonymous
    February 06, 2007
    There is no need to start SQL Browser service if you are connecting locally.  This is the default configuration for SQLExpress and SQL Server in general. Q. SQL Network Interfaces mean?   A. This is just the name of the underlying network interface that the driver is using.  MDAC drivers use dbnetlib interface and the newer SNAC drivers use SNI (SQL Network Inteface).  To most customers this is not really that important, like knowing if you have copper or steel pipes, you don't care as long as the water comes out. Q. Does it mean the Shared Memory, Named Pipes and TCP/IP?   A. Yes.  SNI implements these protocols (and so does dbnetlib). Q. I also want to confirm my understanding that a remote connection means you're connecting to a SQL Server instance installed on another computer and it will not mean to connect to a SQL Server instance installed on the same machine regardless of which network protocol is used.   A. Yes, this is correct. The driver will first try hitting SQL Browser and secondly check the local registry to determine how to connect to the named instance SQLEXPRESS, this is how it works locally.  So if your client application cannot access the registry for some reason, then it could possibly fail to get information about the SQLEXPRESS instance. Go to SQL Server Configuration Manager and go under the SQL Native Client Configuration tool and verify Shared Memory is enabled and at the top of the list, this will probably fix it.

  • Anonymous
    February 06, 2007
    Q. In my previous message, I forget to ask whether Management Studio using a connection string which specifies protocol prefix "tcp:" or "np:" when it tries to connect to a local named instance?  If yes, what is the connection string look like and how to view it? A. Management studio does not make any changes to the connection string, it just uses the given server name and the server to connect to. You can actually prefix the servername with tcp: or np: if you want and it will pass this thru, for example ->    tcp:MyServer,5555 This will connect to server on tcp port 5555.

  • Anonymous
    February 06, 2007
    Hi Matt, Thanks for your posts.   I have tried few different settings in SQL Server Configuration Manager (SSCM).

  1. Enabled only the Shared Memory network protocol under SQL Server 2005 Network Configuration (SSNC) and disabled all the client protocols under SQL Native Client Configuration (SNCC).  I can connect in SSMS.  However, restarting SQL Server service in SSCM will get the message "The request failed or the service did not respond in a timely fashion..."  Sometimes, the message will just stay there and the CPU will run 100% and I need to reboot the machine.  If I stop and start the SQL Server service in SSCM, it does not have this problem.  It seems to me that the Client Protocols under SNCC can be all disabled and SSMS will still work.
  2.  Disabled all network protocols under SSNC.  Enabled only Shared Memory under SNCC.  Starting SQL Server service in SSCM will get the message "The request failed or the service did not respond..."  Does it mean that SQL Server service can only be started if at least one of the network protocols is enabled?
  3.  Enabled only Named Pipes or TCP/IP under SSNC.  Disabled all client protocols under SNCC.  Trying to connect in SSMS will get error: 26 Error Locating Server/Instance Specified if SQL Server Browser service is not running.
  • Anonymous
    February 06, 2007
    Hi Matt, Forget to ask this in my last message. You mention that connection issue may be caused by registry entries not being accessible.  What are the registry entries that I need to check?  Who should able to access those registries when the SQL Server service is running under NT Authority/networkservice? Thanks, Peter

  • Anonymous
    February 07, 2007
    SQL Server 2005 Express is installed in a Windows XP SP2 machine in a peer-to-peer network.  When the windows firewall is on, only 1 of the workstations within the network can connect to the SQL Server.  When windows firewall is off, all the workstations within the network can connect to the SQL Server. I cannot figure out why only 1 workstation can connect when the windows firewall is on. Thanks, Peter

  • Anonymous
    February 07, 2007
    BIG Ah Ha!  For a number of you, this may have been obvious, but I didn't see this one.  When trying to connect to my sql instance, such as using the SQL Server Manager; where Microsoft asks for a server, they REALLY MEAN Server AND Instance!  i.e. serverinstance (MYPCSQLEXPRESS) Hope this helps some of you!

  • Anonymous
    February 08, 2007
    I want to understand the IP Addresses tab of the TCP/IP Properties in SQL Server Configuration Manager.  The following settings are from the default named instance of SQL Server 2005 Express (computernameSQLEXPRESS) on a Windows XP SP2 machine with IP Address 192.168.1.151. IP1 has the following settings: Active: Yes Enabled: No IP Address: 192.168.1.151 TCP Dynamic Ports: 0 TCP Port: 1433 IP2 has the following settings: Active: Yes Enabled: No IP Address: 127.0.0.1 TCP Dynamic Ports: 0 TCP Port: IPAll TCP Dynamic Ports: 1121 TCP Port: Is the instance using Dynamic Port or Static Port?  Normally, I will see blank for TCP Port when TCP Dynamic Ports is 0 in IP1 but in this case, TCP Port has 1433. My guess is that the instance is using Dynamic Port and the port is 1121.

  • Anonymous
    February 11, 2007
    Hi, Peter    You are right, sql server named instance use Dynamic port. And from the configuration you posted, your sql express is listening on 1121 if tcp enabled. Since, IP1 and IP2 were not enabled, which means you server is listening on all IP Address, hence it use the port 1121. You can check out following blog for sqlexpress connectivity guidline and troubleshooting tips. http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx Good Luck! Ming.

  • Anonymous
    February 14, 2007
    It is not enough to set a firewall exception for sqlservr.exe. The 1433 port also has to be added as an exception.

  • Anonymous
    February 19, 2007
    I'm trying to create an ODBC System DSN to connect to a remote SQL Server 2005 default instance (MSSQLSERVER).  Information for the remote SQL Server 2005:

  1. SQL Browser service running under LocalSystem
  2. Windows Firewall is disabled
  3. Shared Memory, Named Pipes, and TCP/IP are enabled.
  4. TCP/IP's Listen All is set to Yes and IPAll is using dynamic port which is 1905. The problem I have is that the ODBC System DSN won't able to connect to the remote SQL Server 2005 if I check Dynamically determine port but able to connect if I specify the port number 1905.   If I issue telnet 192.168.1.151 1905, I will the blank command window titled Telnet 192.168.1.151 so I guess this mean the port is accessible.
  • Anonymous
    February 19, 2007
    I have just submitted a feedback in connect.microsoft.com.  I think I should include it in here since it is a connection issue: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=259022

  • Anonymous
    February 19, 2007
    The issue I posted on Monday, February 19, 2007 4:08 PM is also caused by the issue I posted on Monday, February 19, 2007 7:41 PM.

  • Anonymous
    February 20, 2007
    Hey!! Im a new user of sql server 2005... i want to connect sql server between two remote computers... When i do it, i get the following message: TITLE: Connect to Server


Cannot connect to PC1_V6810administrator.

ADDITIONAL INFORMATION: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476

Any body has any idea how to resolve it... Im not an expert so tell  me in the easiest language..

  • Anonymous
    February 26, 2007
    Hi,am trying to connect a remote database to sql server 2005 but it keeps giving me error report.what could be the problem?

  • Anonymous
    February 26, 2007
    am trying to connect to a remote database using sql server 2005 but it keeps giving an error messege.whats happening?

  • Anonymous
    February 26, 2007
    I have the error below, I try everything, If I can't solve this error the solucion will be only one, change to Oracle. 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) juliaojoa@msn.com

  • Anonymous
    February 26, 2007
    The comment has been removed

  • Anonymous
    February 27, 2007
    Hi, Juliano    The error is very general, it indicated you probably connected to a named instance, is it sqlexpress?    1) In your connection string, gave a wrong sql insrance name.    2) You were making remote connection, and you did not enable tcp or np on you SQL 2k5.    3) You did not add tcp port and sqlbrowser.exe into firewall exception list.    4) Your sql instance is not started.    5) You do not have a sql named instance, but you specify a named instance in your connection string. To help out your problem, please check out the following blogs: http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx Good Luck! Ming.    2)

  • Anonymous
    February 28, 2007
    Only aspnetdb don't work in my production environment, access to any other database work fine and in developer machine running the project, the access work too. Below my connection String. My server is a multhomed machine using Ras and the internal firewall disable, in local nic. I can't see why that error, because to any other connection works fine. Any help, really apreciate. <connectionStrings> <remove name="SqlConnectionString" /> <add name="SqlConnectionString" connectionString="Data Source=zeussql2005;Persist Security Info=True;Initial Catalog=aspnetdb;User Id=AspNet; Password=***; "/>  </connectionStrings>

  • Anonymous
    March 06, 2007
    Hi, I am trying to create a system dsn on a client pc but i am getting the following error: 'Connection failed. SQL state '01000' SQL Server Error:10061 [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets] ConnectionOpen(COnnect()). Connection Failed. SQL State '08001' SQL Server Error:17 [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Serever does not exist or access denied.' I have unchecked 'dynamically determine port' in 'client configuration' but it still not working.

  • Anonymous
    March 27, 2007
    Hi I have the Message 1 type error: "TITLE: Connect to Server


Cannot connect to "SQL Server Name".

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

BUTTONS: OK

" I can ping to the machine name and ip ok. Remote connections are allowed on the SQL server instance. I can login locally to the SQL server. sqlcmd -S "sqlservername" -E gives the following error HResult 0x35, Level 16, State 1.... Any ideas how to reslove this

  • Anonymous
    April 01, 2007
    hello sir,            i download MSQSL server 2005 from MicroSoft site now i run successfully but connection making is fail with DSN because of wrong Login Name and Password so plz tell the right Login Name and password for making DSN(data source name ) and run the test successfully thank you Hemendra Singh

  • Anonymous
    April 02, 2007
    The comment has been removed

  • Anonymous
    April 08, 2007
    Hi, Regarding the error Named Pipes Provider, error: 40 - Could not open a connection to SQL Server. I was receiving this error when attempting to add the server MCXP-DEV (my local sql server instance) in server explorer in VS2005.  This was the only option available in the drop down.  By adding LOCAL to this string (as I had seen this in connection strings I have generating previously) the server was adding no problem.  Maybe someone else could shed some light on why the dropdown showed the machine name as the ID for the sql server instance when however the fully qualified instance name of MCXP-DEVLOCAL was required to connect successfully. Regards, Martin

  • Anonymous
    April 12, 2007
    The comment has been removed

  • Anonymous
    April 17, 2007
    Hi, pioner    Please check out the following blog:http://blogs.msdn.com/sql_protocols/archive/2006/07/26/678596.aspx Good Luck! Ming.

  • Anonymous
    April 18, 2007
    I can't telnet my SQL2k5 server within the same network, but I can use SQL Server Mangement Studio to configure and manage it now problem. I have a SQL2K server on the same network, both Telnet and Studio work without any problem. please help

  • Anonymous
    April 19, 2007
    Most likely the port 1433 is blocked on this SQL Server by Windows Firewall.  Even if port 1433 is blocked by Windows Firewall, tools like SQL Management Studio can connect over named pipes, which goes over a different port.  The client will try tcp-ip and then named pipes and if one succeeds you can connect. So solution is to open TCP port 1433 on the SQL Server machine you cannot telnet to.

  • Anonymous
    April 20, 2007
    Thanks. Solved my connection problems

  • Anonymous
    April 26, 2007
    Here is an interesting scenerio I came across while migrating from SQL 2000 to SQL 2005. After migrating to SQL 2005 all users could connect to the server through the SQL management studio. But they were unable to make an ODBC connection to the server. After spending almost 2 days on this issue  I finally  dropped the login  and recreated it again. I was finally able to make an ODBC connection to the server. Interesting!!. Shilpi Balan

  • Anonymous
    May 04, 2007
    Hi, I have a connectivity problem in accessing SQL server 2000 using dotnet provider(SQL client). I tried connecting using visual web developer 2005.

  1. I can connect to SQL server using OLEDB provider but dotnet provider(SQL client) is failing with exception "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding"
  2. I can connect to other SQL servers without any problem. So I guess the problem is related to this particular SQL server. I wonder any extra configuration setting should be required in SQL server to communicate with Dot net provider. Any help is greatly appreciated. Thanks, Rakesh
  • Anonymous
    June 22, 2007
    Hi, I am having a connection failed error in SQL. This is the full error we are getting. Connection faiiled: SQLState:'01000' SQL Server Error: 10060 [Microsoft][ODBC SQL Sever Driver][TCP/IP Sockets]ConnectionOpen (connect()). Connection failed: SQLState:'08001' SQLServer:17 [Microsoft][ODBC SQL Server Driver]SQL Server dose not exist or access denied. Any help would be great or if you could point me in the right direction. Thank you.

  • Anonymous
    June 22, 2007
    Hi, Redcell    Can you answer the question by followin the below guidence for us to further help you: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=87&SiteID=1 Thanks! Ming.

  • Anonymous
    July 09, 2007
    I don't think that would be the reason.

  • Anonymous
    July 29, 2007
    The comment has been removed

  • Anonymous
    July 30, 2007
    Hi, Ashwani    Please check out the server errorlog, which will give you the info that why your client connection got rejected. Good Luck! Ming.

  • Anonymous
    October 17, 2007
    Unable to connect to server MMSINDIA: Server: Msg 17, Level 16, State 1 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. please help me

  • Anonymous
    October 18, 2007
    The comment has been removed

  • Anonymous
    December 21, 2007
    I'm puzzled. None of these is the message I get. Besides, I spent the best part of a morning copying a database from SQL2K to this instance, debugging, and getting a connection from a client app. When I left, it was all working, and I did the whole thing by remote desktop connect to the server and running Mgmt Studio on the server by remote connection. A day later, the client can't connect and when I try and use Mgmt Studio by remote connect to the SQL Server I get: Cannot connect to SQLSERVE. 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) (Microsoft SQL Server, Error: 2) Help on the error says the service is not started, but it is. ERRORLOG shows no info since I successfully accessed the SQL server on the 19th. Two questions:

  1. How to resolve?
  2. How did this get changed?
  • Anonymous
    December 26, 2007
    The comment has been removed

  • Anonymous
    December 26, 2007
    do you have same page for Server 2008?

  • Anonymous
    December 27, 2007
    This situation occurs in SQL Server 2005.  While I have sql server 2008 Nov beta installed in another system, i have not even started testing replication in 2008.  I have 85 replicated databases in 2000 and 8 in 2005. Any ideas on solving the problem?

  • Anonymous
    December 27, 2007
    The comment has been removed

  • Anonymous
    December 27, 2007
    The comment has been removed

  • Anonymous
    January 07, 2008
    The comment has been removed

  • Anonymous
    February 20, 2008
    I am using Vista Ultimate.  I still get the 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) " I've tried most of the things in this forum.  My named pipes are enabled and I've tried changing the connection string to both use SQL Authentication and Windows.   I am setting the connection string in my web.config using the Enterprise Library config tool.  This doesn't do anything wierd, it just sets the connection string up and inputs that into your web.config per the database, authenticaion method (windows or sql), logon info (if using sql), etc.   You can even test the connection while in the config tool and it works fine either way so I don't understand why when I try to load my .aspx I am still getting this error. The user of course has rights to the database or else the config testing of the connection string in enterprise manager wouldn't work anyway. Here's a couple of connection strings that were created that I tried but I get the same error for all t hese: <add name="Connection String" connectionString="Data Source=(local);Initial Catalog=Elbalazo;Persist Security Info=True;User ID=ElbalazoAdmin;Password=******"      providerName="System.Data.SqlClient" /> <add name="Connection String" connectionString="Data Source=(local);Initial Catalog=Elbalazo;Integrated Security=True"      providerName="System.Data.SqlClient" /> I checked in the SQL Server Configuration Manager and named pipes is enabled across the board. The connection string test to be good in Enterprise Library Config tool (what was created above) when it tests that string. I don't now what else to do.  I of course am part of the Administrators group on my PC.  This is a home PC using Vista Ultimate.

  • Anonymous
    February 20, 2008
    The comment has been removed

  • Anonymous
    March 06, 2008
    The comment has been removed

  • Anonymous
    March 06, 2008
    On the server which we're trying to pull the data from (via the linked object) a quick glance at the SQL Server Logs reveals this error: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'. Error: 18456, Severity: 14, State: 11.

  • Anonymous
    March 06, 2008
    Hi Patrick,  It looks like this is your problem: -Do not trust this user for delegation  The SQL Server's user account needs to be trusted for delegation, otherwise it won't be able to pass on its credentials to the next SQL Server account.  Try changing this to trust the SQL Server account for delegation and see if that helps.    If it isn't already, you will also need to set the account of the user that is connecting to the SQL Server and issuing the query (i.e., the user your application runs under) so that it is trusted for delegation. Hope this helps. Dan

  • Anonymous
    March 06, 2008
    Dan, Thanks for the quick response!!!  One more question.  I haven't seen a delegation tab under any other users except for this account (happens to be the company president) that's running the SQL services....  Why would that tab not be there for anyone but him?  Does the tab automatically appear if your user account is used to run a service on the domian like SQL?  Or is it a setting somewhere else?

  • Anonymous
    March 06, 2008
    The comment has been removed

  • Anonymous
    March 06, 2008
    Dan, Well, I solved our problem and answered your question all in one shot. I believe the delegation tab appears if you have a service running under your user account on the domain.  The reason I think this is because I just changed both our dev SQL boxes to run the SQL service under "NT AuthorityNetworkService" and that solved our linked server problem.  I went back and checked the user's account that it was running under before, and viola!  No more delegation tab.  For the record, I have no idea why these boxes were setup to run under his domain account (instead of a built-in one) in the 1st place, but I'm sure he had a good reason at the time. Thanks for all your help on this..  I'll keep you guys posted if anything changes. Patrick-

  • Anonymous
    June 10, 2008
    The comment has been removed

  • Anonymous
    June 22, 2008
    I recently install game called Perfect World. Installation was succesful also patching. But when i started the game i got this error: [SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53] i have no idea what to do, because I dont have any experiance regarding SQL. I have SQL Server Compact edition insatlled v3.1.

  • Anonymous
    June 22, 2008
    The comment has been removed

  • Anonymous
    July 14, 2008
    The comment has been removed

  • Anonymous
    August 06, 2008
    The comment has been removed

  • Anonymous
    September 17, 2008
    hello sir, i m having problem...problems i must say in connection to MS sql server 2005.

  1. I works fine with windows authentication...but does not work with sqlserver authentication.
  2. I program it give error 40...something like that.
  3. Please help me configure sql server fro sqlserver authentication and connection
  • Anonymous
    October 23, 2008
    Yo tengo una aplicacion hecha en VB 2005, mi aplicacion la monte en un servidor 2008 con sql 2005, mi aplicacion hace una búsqueda en una base de datos y muestra un GridView mismo que puede paginar la informacion. Puedo ingresar a mi aplicacion (algunos componentes cargan datos de la base de datos), logro hacer la busqueda y el grid view la pagina, el problema es que cuando quiero ver lasiguiente pagina u otra que no sea la primera me manda el error. Puedo ingresar a mi aplicacion (algunos componentes cargan datos de la base de datos), logro hacer la busqueda y el Vista grid la pagina, el problema es que quiero ver cuando lasiguiente pagina u otra que no sea la primera me manda el error. "Error mientras se establecía la conexión con el servidor. Al conectar con SQL Server 2005, el error se puede producir porque la configuración predeterminada de SQL Server no admite conexiones remotas. (provider: Proveedor de canalizaciones con nombre, error: 40 - No se pudo abrir una conexión con SQL Server) " "Error mientras se establecía la conexión con el servidor. Al conectar con SQL Server 2005, el error se puede producir porque la configuración predeterminada de SQL Server no admite conexiones remotas. (Proveedor de: proveedor de canalizaciones con nombre, error: 40 - No se pudo abrir una conexión con SQL Server) " La opcion de conexiones remotas esta marcada y mi FireWall esta configurado para que permita la conexion, si no fuera asi no me deberia permitir ingresar a mi aplicacion pues mi aplicacion al cargarse utiliza la base de datos. La opcion de conexiones remotas esta marcada y mi firewall está configurado para que permita la conexión, si no fuera asi no me deberia permitir ingresar a mi aplicacion mi aplicacion pues al cargarse utiliza la base de datos. espero me puedan ayudar muchas gracias. espero me puedan ayudar muchas gracias.

  • Anonymous
    October 27, 2008
    plz tell me about the error 40 its hapening here when i wants to connect with remote server. and its also tell dat sqlserver doesnot connect with remote server in default setting, is dere any genious who tell me about dis problem

  • Anonymous
    November 25, 2008
    Hi,   I am trying to connect to the SQL Server2005 database through SQlConnection in VS2005 using .NET2.0. It works great for direct internet connections but does not work when the client computer is connected to internet through a proxy server. Any pointers on what I should be doing ? Atul

  • Anonymous
    December 10, 2008
    Hello, I am running SQL 2005 Server management studio. I can connect remotely to other DB's in the domain where the SQL server is located without any problems. The problem I have is when I try to connect to a DB in another domain I get the following error message: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Also, I've tried connecting via the osql prompt but I get the same error. There are other SQL 2005 servers in the domain that are workking fine. It's only this one server that is causing this problem. Thanks for your help!

  • Anonymous
    February 27, 2009
    why oh why did i ever decide to 'get into computers'

  • Anonymous
    March 06, 2009
    I keep getting this error.... Connection failed: SQLState:'01000' SQL  Server Error:2 [Microsoft][ODBC SQL Servier Driver][DBNETLIB]Connection Open (Connect()). SQL State:'08001' SQL Server Error:17 [Microsoft]{ODBC SQL Server Driver][DBNEBLIB]SQL Server does not exist or access denied. but your instructions will not work for Windows Vista. I am just a baby when it comes to this stuff. Please Help

  • Anonymous
    March 11, 2009
    I tried to establish a remote connectivity with another instance of sql server 2005 in a remote computer and inspite of following all the steps,I coudn't make it and i got the following error: "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) " Please write down step by step procedure to resolve this issue. Thankyou

  • Anonymous
    May 12, 2009
    use the connection string in this way and if you follow all the instructions that the users give before maybe you can solve the problem... static SqlConnection cn = new SqlConnection("Server=YOURPC\SQLEXPRESS; Database=YOURBASE; Trusted_Connection=true");

  • Anonymous
    July 08, 2009
    In Message 3, you indicate that error 233 is related to "Could not open a connection to SQL Server" How is it that sysmessages shows error 233 as "The column '%.*ls' in table '%.*ls' cannot be null."?

  • Anonymous
    July 29, 2009
    [Hi,  I am trying to connect to the SQL Server2005 database through SQlConnection in VS2005 using .NET2.0. It works great for direct internet connections but does not work when the client computer is connected to internet through a proxy server. Any pointers on what I should be doing ?] Somebody asked this... can we find an answer?

  • Anonymous
    July 31, 2009
    Thank you very much for your post you have solved my gr8 problem.

  • Anonymous
    March 08, 2010
    I am using the connection string in the following  way but i couldnot overcome of (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) problem, even i declared impersonate="true" in config file static SqlConnection cn = new SqlConnection("Server=YOURPC\SQLEXPRESS; Database=YOURBASE; Trusted_Connection=true");

  • Anonymous
    April 29, 2010
    Hi guys, I work as a DBA and i configured replication from server A to B. but iam geting an 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: TCP Provider, error: 0 – No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061). snapshot agent is running on server A but server A is not able to connect to server B when i check in replication monitor ican see the error can connect to server and the above error…can anyone help me on this issue..iam working on it since 2 ddays but no luck. iam able to ping server B from server A using 1433 port. even tcp/ip is enabled on both servers and there is no windows firewall enabled on server B. i even enabled sql server browser. i dont understand what is the issue.

  • Anonymous
    August 18, 2010
    I get this error message and I am not sure what the issue is, any help will be appreciated; TITLE: Connect to Database Engine


Cannot connect to TECHWORXS2MSSQLSERVER.

BUTTONS: OK

  • Anonymous
    August 18, 2010
    techieg,  It is better to post questions at: social.msdn.microsoft.com/.../threads. In your error message, it says, "Connection string is not valid". From the rest of your error, I can see that it's because you've specified the instance name as "MSSQLSERVER", which is not permitted (you should never specify the instance name with a default instance). Please try specifying "TECHWORXS2" as the server name, rather than "TECHWORXS2MSSQLSERVER".

  • Anonymous
    December 20, 2010
    i cannot access my remote connection my local connection is working but on the other system is not working....plz help me i was creating a dsn for local system....can i craete dsn for remote systems so i can access database on other system easily...............

  • Anonymous
    March 25, 2011
    Please see the below scenario. We have 2 SQL Servers in our production. They are in different domains. Both of them have tcp-ip & np enabled. I need to pull the data from Server1 to Server2. Server1 is configured to port 1433 while the Server2 is configured to use port 65333. I am able to connect from Server1 to Server2 through SSMS using the IP Address. However, I am not able to connect from Server1 to Server2 from my SSIS package and so cannot bring in the data. The SSIS package uses "Native OLEDBSQL Server Native Client 10.0 provider". I am assuming that it is not a firewall / port issue since i am able to connect tru SSMS. SQL Browser is not enabled on Server1. The telnet from both the Servers (using ports) do not work either. What else could be the issue here? Any ideas? Thanks in advance!

  • Anonymous
    July 26, 2011
    i read this article and it solve my problem very informative article indeed thanks to writer www.webhostingmatters.com

  • Anonymous
    August 22, 2011
    Hi...I have an issue. My computer using SQL 2005. and i want to create Link Server to Server that using SQL 2008. But the case is, in the server there are SQL 2005 and SQL 2008 installed. when i create the link server, the link server always connect to SQL 2005 by default. how to connect to the SQL 2008? thx

  • Anonymous
    August 31, 2011
    "Some issues that you would need to resolve" Alteast be a bit more helpful or else dont bother writing articles

  • Anonymous
    August 05, 2014
    Microsoft][ODBC SQL server Driver][TCP/IP Sockets] SQL Server does not exist or access denied. Getting this error connecting from one server to another. reply me please anybody at vijay.ahire8@gmail.com