Named Pipes Provider, error: 40 on workgroup workstations

I am having issues with a vendor supplied application. It generates an error when run from workstations that are not part of an Active Directory domain. The error is “provider: Named Pipes Provider, error: 40 –
Could not open a connection to SQL Server)”. It runs as expected when ran from a workstation that is a member of the domain. Obviously adding the workstation to the domain is a solution. However, because of concern of what might break this is not our preferred
solution.
The database is SQL Server 2008 on a 2008R2 system that is a member server of a domain. The systems that are having the error are workgroup systems running Windows 7. Except for the final step, I have pretty much
eliminated the other possibilities in Steps to troubleshoot SQL connectivity issues.
That, and the fact that the application successfully runs from a workstation that is a member of the domain lead me to believe it is an account/authentication issue on the workstation.
From what I have determined SQL authentication is required in this scenario and I have confirmed that the database server is configured for Windows and SQL Server authentication. I have also examined
the configuration file the application uses. It contains the user name and password for the account. Are these credentials not used to establish a connection?
The only thing I can think of, which I haven’t tested because 1) it is a production system and 2) it is a vendor supplied application, is the application needs to be run under a local workstation
account with the same credentials as the SQL Server account.
Could this be the case or is there something else I should be look at?
Thanks in advance.

Thanks for your response. I had posted a reply earlier but for some reason it doesn't appear to have uploaded.
The server name in the connection string is ntsrv12.xxx.yyy.edu. I am able to ping that name and ntsrv12 as well from workstations where the application fails.
I have some information from some additional testing I have done. Using my workstation, which is a domain member, I can successfully run the application when logged on with my domain user account.
However, if I logon with a local account the application fails with the error described above.
I have also been able to match Audit Failures in the SQL Server event log with failed attempts to run the application. There is a two error sequence that appears several times for 15 seconds until the application times out and displays the error message.
I have listed the errors below but certainly the application appears to see the server. Any ideas on what to check next?
Thank you.
The first error in the sequence is this:
Log Name:      Security
Source:        Microsoft-Windows-Security-Auditing
Date:         
5/6/2014 1:50:05 PM
Event ID:      4776
Task Category: Credential Validation
Level:         Information
Keywords:      Audit Failure
User:         
N/A
Computer:      Ntsrv12.xxx.yyy.edu
Description:
The computer attempted to validate the credentials for an account.
Authentication Package:              
MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Logon Account: <MyLocalAccount>
Source Workstation:      
<LocalSystemName>
Error Code:        
0xc0000064
This error is followed by this one:
Log Name:      Security
Source:        Microsoft-Windows-Security-Auditing
Date:         
5/6/2014 1:50:05 PM
Event ID:      4625
Task Category: Logon
Level:         Information
Keywords:      Audit Failure
User:         
N/A
Computer:      Ntsrv12.xxx.yyy.edu
Description:
An account failed to log on.
Subject:
Security ID:                        
NULL SID
Account Name:                
Account Domain:                            
Logon ID:                            
0x0
Logon Type:                                      
3
Account For Which Logon Failed:
Security ID:                        
NULL SID
Account Name:                
<MyLocalAccount>
Account Domain:                            
<LocalSystemName>
Failure Information:
Failure Reason:                
Unknown user name or bad password.
Status:                                 
0xc000006d
Sub Status:                        
0xc0000064
Process Information:
Caller Process ID:            
0x0
Caller Process Name:     -
Network Information:
Workstation Name:        <LocalSystemName>
Source Network Address:           
10.1.36.70
Source Port:                      
50145
Detailed Authentication Information:
Logon Process:                 
NtLmSsp
Authentication Package:              
NTLM
Transited Services:         
Package Name (NTLM only):      
Key Length:                       
0
This event is generated when a logon request fails. It is generated on the computer where access was attempted.
The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
The Process Information fields indicate which account and process on the system requested the logon.
The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
The authentication information fields provide detailed information about this specific logon request.
- Transited services indicate which intermediate services have participated in this logon request.
- Package name indicates which sub-protocol was used among the NTLM protocols.
- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

Similar Messages

  • Named Pipes provider, error:40 could not open a connection to sql server. Only happens on one of the front end SRS servers

    when testing a datasource connection I get the following error.
    Named Pipes provider, error:40 could not open a connection to sql server.
    I've read all the posts on this and nothing works.  This is a scale out deployment and the connection
    works from the other server I have setup with SRS that is connected to the same backend SRS databases.  It just doesn't work from one of the SRS front ends.  I'm at a loss..  please help

    Enable both named pipe and TCP communications.
    Make sure client is using the same (named) pipe name as server for connection.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Reporting Services 2008 R2 configuration error: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi, I am using SQL Server 2008 R2 and on one of our dev boxes I am trying to setup ReportServer using ReportingServices Configuration manager. This is was installed longtime back and during installation they created a service account for reporting services.
    When I try to configure the service account I do not get the service account created during the installation in the pull down and if I were to use something different I get this "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
    error.
    Thanks in advance...........
    Ione

    Hi,
    Take a look at this blog - http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx
    I hope it will help.

  • Re: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi,
    I'm encountering an issue with "Named Pipes Provider, error: 40 windows" and am having problems determining how to fix it due to the environment I'm using.  I have two SQL Servers installed on two separate Win2K3 Server boxes, one is SQL Server 2000 and the other is SQL Server 2005.  The SQL Server 2000 contains the actual application data.  The 2005 database is used only for Reporting Services.  I've set up the reports on SSRS such that their datasources hit the 2000 server.  This is using SQL Server authentication.
    When testing the reports via SSRS (in Visual Studio 2005), the connection to the data works and the reports are generated fine.  When I deploy them to the reporting server and launch IE to test locally (still on the 2005 box), I get this "Named Pipes Provider, error 40" issue.  I made sure that Named Pipes and TCP were enabled and the port set at 1433 (to match that on the 2000 box). 
    Now I changed the datasource's authentication from SQL Server to Windows authentication.  I tested this in SSRS and this works too.  When I redeployed the reports with this authentication change, testing the reports via IE locally (on the 2005 box) worked.  Great.  Now when I open IE on an external box, i.e. on the 2000 box, and try to test the reports, I get this same error 40 issue.  I've been through a few threads describing the error 40, fiddling around with the SQL Server configuration as well as SSRS, to no avail.  I have a feeling this error 40 issue has to due with permissions/authentication between the SQL Server boxes but I can't really be sure.  Anyone have any ideas on how to troubleshoot my situation.  Thanks.
    larry

    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server :
    I.   Incorrect connection string, such as using SqlExpress.
    Check out: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=558456&SiteID=17
                    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1245564&SiteID=1
    The typical error when dealing with Express includes:
    a.  User is not aware of SqlExpress was installed as a named instance, consequently, in his/her connection string, he/she only specify ".","localhost" etc instead of ".\SqlExpress" or "<machinename>\Sqlexpress".
    b. Np was disabld by default after installing SqlExpress.
    c. If Sqlexpress was installed on the remote box, you need to enable remote connection for Express.
    Please read the following blog for best practice of connecting to SqlExpress.
    http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx
    II. Named Pipes(NP) was not enabled on the SQL instance.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=136253&SiteID=1
    Oppose to SQL 2000 which turn on all protocols, SQL 2005 SKUs turn off NP by default. So, when you see this error, please check:
    1) Go to SQL Server Configuration Manager, See Server has NP enabled.
    2) %windir%\program files\microsoft sql server\mssql.1\mssql\log, notepad ERRORLOG, see whether Server is listening on NP.  You should see "Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ] or [\\.\pipe\mssql$<InstanceName>\sql\query]"
    3) Notice that "sql\query" 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 "sql\query1", then you would see in the errorlog that server listening on [ \\.\pipe\sql\query1 ], and go to SQL Server Configuration Manager, click client Named Pipe properties, see whether the pipe name is same with the one server listening on.
    4) If you are using SQL Native Client ODBC/OLEDB provider({SQL Native Client} or SQLNCLI), go to SQL Configuration Manager, click client protocols, make sure NP and TCP are both enabled. Right click properties of NP, make sure client is using the same pipe name as server for connection.
    5) If you are using MDAC ODBC/OLEDB({SQL Server} or SQLOLEDB) provider, in command line, launch "cliconfg.exe" and make sure NP enabled and right pipe name specified.
    III. Remote connection was not enabled. 
    Check out: when you right click on the Server in SQL Server Management Studio, in Connections, the Remote server connections part, you have enabled the "Allow remote connections to this server" check box
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322792&SiteID=1
    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=763875&SiteID=1
    If you are making a remote connection, namely, your target SQL Server is on the different box as client application, you might need to check whether:
    a. "File and Printer Sharing" was opened in Firewall exception list.
    b. Please see the blog for enabling remote connection for express and troubleshooting tips of remote connection.
    http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    IV. Server not started, or point to not a real server in your connection string.
    Check out: Open SQL Server Surface Area Configuration and ensure all the required services are started, Remote Connections are configured.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=348662&SiteID=1
    a. use "sc query mssqlserver" for default instance or "sc query mssql$<instancename>" to make sure SQL Server was started. Sometimes, reseason behind the broken of your client application w/ this error:40 might be SQL server restarted and failed, so, it'd better for you to double check.
    b. User specified wrong server in their connection string, as described in the forum discussion, "MSSQLSERVER" is an invalid instance name. Remember, when you connect to default instance, <machinename> could be best representitive for the instance, when you connect to a named instance such as sqlexpress, you should specify <machinename>\<instancename> as data source in your connection string.
     V. Other reasons such as incorrect security context.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=192622&SiteID=1
    Such error also occured during user operation such as moving database or db mirroring or cluster, any DB OP that might invovle different sql instances, namely, the destination database is located in another sql instance and user is not aware of the state of the destination. I recommend you first isolate whether this fail is during connection stage or data operation stage.
    a. During data operation, you are normally asked to type in the destination server name whether it is default to "(local)" or another server "<remotemachinename>". So, remember the exact string that represent the target instance, then when the error repros, open command line, use "sqlcmd -S<representitive> -E" ,see what happens, if the connection fail, please follow up above I - IV troubleshooting lists. otherwise continue.
    b. If you can make basic conection, but still face the error, then there must be something that server reject the connection or client close the connection for some reason.
    VI. Please try basic connectivity tests between the two mahcines you are working on. One simple way to verifty connectivity is to use command line tools, such as osql.exe. For example, osql -E -Stcpervername\instancename. If it connects cross-machine successfully, please also verify that your connection string in your scenario is correct.
    Here are some blogs which could be helpful: just follow the basic connectivity troubleshooting guidelines on the SQL Protocols blog, see:
    SQL Server 2005 Connectivity Issue Troubleshoot - Part I
    http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx
    and
    SQL Server 2005 Connectivity Issue Troubleshoot - Part II
    http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx
    Hope this helps.

  • Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    This was originally posted in the SSIS Forum, but a member of the IS team suggested it be moved here.  "Most recently I got this error (Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) so does this mean that SQL Server is still trying to use named pipes even if I only have TCP/IP enabled in SQL Server Configuration Manager?"
    I'm having the same issue, and here's our scenario:
    Installed SQL Server 2005 Developer Edition on a machine with WinXP SP2 and enabled remote connections over TCP/IP
    Installed SQL Server 2005 Standard Edition on a machine with Win2003 SP1 (remote connections over TCP/IP enabled by default)
    Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'Detach and Attach' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
    Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'SQL Management Objects' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
    Reinstalled Standard Edition on the Win2003 SP1 machine
    Checked all the settings on both machines several times, restarted services etc., and read every post I could find referencing the error.
    Same error
    Lost my last hair
    Thanks in advance,
    Steve

    Nan,
    Before I get on with this post - thank you for your reply.
    The XPSP2 machine actually had the firewall disabled, and I verified that it could accept connections on the the associated ports with the Shields Up utility.  I tested this on both machines.
    I can connect to the server from the XPSP2 machine, Import / Export, manage, view logs, and do everything EXCEPT get the Copy Database package to run.  SQL Server Agent always fails on the last step with the following error:
    Event Type: Error
    Event Source: SQLISPackage
    Event Category: None
    Event ID: 12550
    Date:  1/10/2006
    Time:  1:34:15 PM
    User:  NT AUTHORITY\SYSTEM
    Computer: 401SERVER
    Description:
      Event Name: OnError
     Message: Failed to connect to server BETHESDA.
    StackTrace:    at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
       at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.OpenConnection(Server& server, ServerProperty serverProp)
    InnerException-->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)
    StackTrace:    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect(WindowsIdentity impersonatedIdentity)
       at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
     Operator: NT AUTHORITY\SYSTEM
     Source Name: BETHESDA_401SERVER_Transfer Objects Task
     Source ID: {86F355AD-3B74-4D7B-8D2D-C743C790A269}
     Execution ID: {91B7C32C-C439-4EDB-8A0F-9F8BF207BC06}
     Start Time: 1/10/2006 1:34:15 PM
     End Time: 1/10/2006 1:34:15 PM
     Data Code: 0
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Have you (or anyone else) successfully executed a Copy Databse task?
    Steve

  • Can't connect to the database after 1-2 day, Named Pipes Provider, error: 40,Microsoft SQL Server, Error: 121

    HI
    I have a problem. I can't connect to the database. It said : 
    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: 121)
    When I restart the server, I can connect normally. But after 1-2 days, it can't be connected. 
    How can I fix this?

    Hi Lee,
    Please refer to the following article to configure SQL Server 2005 to allow remote connections:
    http://support.microsoft.com/kb/914277/en-us
    Regards,
    Elvis Long
    TechNet Community Support

  • 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,

    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)

    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)
    Hello,
    Make sure your SQL Server service is started.
    Make sure TCP\IP and names pipes protocol is enabled
    Make sure you have made an exception in firewall for SQL Server connection
    Make sure SQL Server browser service is enabled
    Make sure you connect with correct name hostname\instance name for named instance,MSSQLSERVER for default instance and Hotname\SQLEXPRESS for express edition.
    Please make sure you use port no when connecting to SQL server listeing on different port (hostname\instance ,portno)
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Named Pipes Provider: Could not open a connection to SQL Server

    We are running into an error on a SQL request from SQL-IDA to the SQL-IDB server. Both servers are on Windows 2005 with MS SQL Server 2003 SP3.
    OLE DB provider "SQL-IDA" for linked server "SQL-IDB" returned message "Login timeout
    expired".
    OLE DB provider "SQL-IDA" for linked server "SQL-IDB" returned 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.".
    Msg 53, Level 16, State 1, Line 0
    Named Pipes Provider: Could not open a connection to SQL Server [53].
    It seems to suggest that SQL-IDA cannot find the network path to SQL-IDB. We've followed the steps in this article http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 but it did not resolve our issue. Is it possible that the MSDTC dynamic port range
    should be set to a specific range on both servers?
    Any help is greatly appreciated.
    Albert

    Hi Albert,
    Can you try to use the SQL Server Management Studio on server ‘SQL-IDA’ to connect to the instance on server ‘SQL-IDB’ to see if it works or not?
    There are possible reasons to error 53:
     a) typo in the server name, or using "/" rather than "\" between server name and instance name, e.g. "myserver/myinst" is not correct.
     b) name resolution to the server name is not correct, "ping -a yourserver" would tell if that's the case
     c) The server machine is firewall'ed and file sharing is not in the exception list. You need put "File and Printer Sharing" in exception.
    For more information:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server (Microsoft SQL Server, Error: XXX).
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Stephanie Lv
    TechNet Community Support

  • SQL Server Agent - [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

    Hi,
    I keep receiving the error below in the SQL Server Agent Error Log;
    [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]
    It is occurring approximately 20 times an hour and i cannot link it to any job failures. All jobs on the same SQL instance are working.
    The server is a clustered server and there are no errors occuring in the SQL Server error log at the same time. I have attempted to trace using profiler looking for errors and warnings but anything that does occur doesn't seem to correspond to the reported
    times of the errors within the sql agent error log.
    Please could someone point me where to look next?
    Many thanks.

    Please may I add that this is on a SQL Server 2008 R2 Enterprise edition patched to 10.50.1600.
    Nah, that server is not patched at all, because 10.50.1600 is the RTM version. Find Service Pack 2 and install at the next maintenance window, after having performed tests according to your local policy.
    It is not going to resolve your particular problem though.
    It seems like you have a job that attempts to a connect to s server that is down or non-existing. The job may be configured to return success also on failures. I would check if there are jobs that target other servers.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Named pipes provider : could not open a connection to a SqL server . . . . .

    Hey all, i need help 
        I have a job which was running quite peacefully for the last EVER, but since last Saturday it keeps failing  and then run successfully and then fails. . . . .and gives me the below error.
       Executed as user: Sx\xxx. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.5500.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  9:00:00 PM  Progress: 2014-03-11
    21:00:02.16     Source: {122F32F1-F99F-4A5A-BA70-F5426B2747DA}      Executing query "DECLARE @Guid UNIQUEIDENTIFIER      EXECUTE msdb..sp...".: 100% complete  End Progress  Progress: 2014-03-11 21:00:02.19
        Source: Manually replicate tables      Executing query "  USE DBNAME  ".: 50% complete  End Progress  Error: 2014-03-11 21:00:22.35     Code: 0xC002F210     Source: Manually replicate
    tables Execute SQL Task     Description: Executing the query "          exec usp_ReplicateEsourceTable 'Ebase'; ..." failed with the following error: "Named Pipes Provider: Could not open a connection to SQL
    Server [53].   OLE DB provider "SQLNCLI10" for linked server "ServerName" returned message "Login timeout expired".  OLE DB provider "SQLNCLI10" for linked server "ServerName" returned message "A
    network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information
    see SQL Server Books Online.".". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.  End Error  Progress: 2014-03-11
    21:00:22.45     Source: Notify on failure      Executing query "exec msdb.dbo.sp_notify_operator   @profile_name =...".: 100% complete  End Progress  DTExec: The package execution returned DTSER_FAILURE (1).
     Started:  9:00:00 PM  Finished: 9:00:23 PM  Elapsed:  22.25 seconds.  The package execution failed.  The step failed.
    I have already tested the linked server connection between those servers and its fine. And what is weird is that when i run the job manually it runs successfully. 
      Any ideas? 

    Hi,
    How often does the job run? Does the query fail intermittently?
    I suggest you check the following configuration on both servers:
    1. In SQL Server Configuration Manager, expand SQL Server Native Client Configuration, right-click
    Client Protocols, and then click Properties. What’s the order of protocol?
    2. Check if the default port of TCP/IP  is set to 1433.
    By default, the top protocol is to use TCP/IP and then Named Pipes. There are two possible situations:
    1. Connection fails and client protocol is using TCP/IP 1433.
    When server A remotes to server B, it will use TCP/IP connection. If it encounters some issue during connecting (such as network issues), it will use Named Pipes instead. If the Name Pipes 445 still fails, thus the above error message will
    be thrown out. It will use Name Pipes afterwards until the SQL Server service is restarted.
    2. The port number is not 1433.
    However, the remote machine is listening 1433. Then, the linked server will trying to use TCP/IP first. Because of the port error, it will change to Name Pipes.
    Thanks.
    Tracy Cai
    TechNet Community Support

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

    Hi
    I'm a complete sql/asp.net newbie and want to try this tutorial:
    http://beta.asp.net/GuidedTour/
    First I installed:
    Visual Web Developer 2005 Express Edition Beta 2
    systemsettings\software shows the "sql server 2005 express edition ctp (sqlexpress)" installed
    mmc\service shows me the SQL Server (SQLExpress) is running
    Following the guided tour I use the commandline, type cmd, and type in the commandbox:
    "C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD90" -S "localhost\SqlExpress"
    Instead of localhost I also tried computername.smallbusiness.local (thats my fully domain name).
    However I always receive the error:
    Named Pipes Provider: Could not open a connection to SQL Server [2]
    Thank you very much for all your help

    Typically I have found problems with connection strings as one of a few things:
    1. Your instance is named different than the default.  I labeled mine BrettSQLServer instead of the regular instance.
    2. Your default storage of the your database has a user the system does not like and won't give it access.
    3. You have ports blocked that SQL Server is trying to access.
    1. Your instance should show up under 'SQL Server Configuration Manager'.  Start>MS SQL Server 2008 > Configuration Tools> SQL Server Configuration Manager.  You should see a left view panel where you can click 'SQL Server Services'.  This
    will show on the right all of your SQL services that are running.  The most important one is SQL Server({Your SQL Server Name}).  You will see column headers's displaying: "Name, State, Start Mode, Log on as,  ProcessID" by default.  If
    you don't see a version of this you may have no installed SQL server properly and gotten SQL management studio but not the server.  If you have the server and it's off or not running that is another problem.  If your "LOG On AS" is a service account
    is "NT ...." or something besides "Local System" that may be a problem.  Without getting into the symantecs of protection suffice to say you log in with less than system, yes you are more secure but some built in functions for connections may not work.
    2. Going off of rights of your 'Log On As' I WOULD USE 'System' NOT "NT Authority....".  The reason is that you can access less things with 'NT Authority....' but yes you are more secure for that reason.  If you are just trying to connect at home
    to test non secure things I don't see the harm.  If you are setting up a database for a multinational corporation than, Yes I would use a more secure account.  If you need to change it while still in SQL Server Confi Manager: Right Click> SQL
    Server(Your Version) > On 'Log On' tab > Choose drop down for 'Built-in Account' select 'Local System'.  As extra steps make sure by some strange reason your database locales have this user by default(They should).  MS likes to install database
    as default to: C:\Program Files\Microsoft SQL Server\MSSQL10.{instanceName}\MSSQL.  If you go to this location by going: right click>Properties>Security Tab .. and you fail to see your user that SQL server is defined as you may have lots of
    issues.
    3. Turn off Windows Firewall during SQL installation.  If you are scared of being attacked during this down window, disconnect your NIC and reconnect later.  I have not added a port manually in a while but it is simply easier to just
    turn off your firewall during install.  Having your TCP/IP connection from SQL Server blocked is kind of bad if you need to connect to it that way later.
    Problems most commonly encountered with SQL Server by users I have seen and I myself encountered a lot with full blown SQL Server Enterprise as well as Express versions of SQL:
    Connection string DO not work for BIDS, ADO.net, Linq, etc...
    Once you follow steps above just go {ComputerName}\{SQL Server Instance} as your connection name.   That mostly always works.  As a preliminary test you should install SQL Management Studio first before doing connection strings for a basic test
    that it can access your server.  When you first boot it up and click 'New Database Engine Query' it will display Server Type: "Database Engine" and a blank field or autopopulated field for 'Servername'.  The {ComputerName}\{SQL Server Instance} almost
    always works.  If it works and you can connect, you know that you have access, if you don't start there first before getting into connection strings through .NET languages.   I suggest just adding an easy alias, my local SQL box is simply called
    'Brett'.  Go again back to SQL Server Configuration Manager.  On the left side click 'SQL Native Client ...' > 'Aliases' > New > type in whatever you want.  Go back to the left pane click on 'SQL Server Services' ensure the service
    'SQL Server Browser' is running and set to run automatic.  Have fun accessing SQL Server with your alias.  
    Help I can't get FileStream to work and I ran 'spconfigure' in SQL and it still doesn't work.
    Kind of annoying that more sites don't list that it is entirely in the Configuration manager and has zilch to do with setting the option if the config has it off.  I am not a master of the sp_configure TSQL access method but I know during installs turning
    it on fails to REALLY turn it on.  Once again go to SQL Config Manger > SQL Server Services > Right click your instance > Select FILESTREAM tab > enable both check boxes.  Restart SQL Server.  Install Adventureworks 2008 and whatever
    else failed due to filestream access levels.
    Medium to Advanced on some things, but always wanting to know more

  • Named Pipes Error Recovery

    I have a program which uses named pipes to communicate with a (third party) named pipe server. I call CreateFile to open the pipe, then Readfile and Writefile to read and write data. If I get an error, e.g. due to a network fault, I call CancelIo, then
    CloseHandle to close the pipe, then Createfile to re-open it. I have tested this by unplugging/replugging the network cable. However, on site in a 'real' environment, I have had a couple of occasions where I have received a 'ERROR_NETNAME_DELETED' from the
    pipe I/O, and when I close the handle and call CreateFile to try and recover, I get the error 'ERROR_SEM_TIMEOUT' from the CreateFile call. Can anyone think why this might be? I guess a difference between my testing and what is happening 'for real' might be
    that my testing involved disconnecting the network cable, whereas the 'live' incident may have been just a temporary glitch on the network.

    Yes, unpluggin a network cable is entirely different from communication glitches, lost packets and firewall issues.
    One of the big reasons is that unplugged network cables are detected by windows, and the port is shut down. In network management in control panel you'll see the red cross. resources associated with that port will be freed, and communications will be aborted.
    However, if the network port stays up, Windows will not know that anything went wrong. It still sees an active port, so it will just keep waiting for data to arrive. Communications that were in process may still be waiting when you retry them, so you have
    to be careful with the error handling, and verify that a) you handle all problems, and b) you cancel all necessary things.
    If you want to test such scenarios, you could play with the firewall on the target computer to simulate lost packets and timeouts.

  • Disable Shared memory & Named Pipes protocols - Post implementation issues

    Hi,
     As per security guidelines, we disabled Shared memory & Named Pipes protocols and enabled "TCP/IP" only. Also, we changed the port# from 1433 to 1533 and after that, in management studio, SQL Server Error logs is not openning up and SQL
    Agent Service doesn't start.
     Error while opening SQL Server Error Logs in SSMS:
    The description for Event ID 17052 from source MSSQLSERVER cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    Severity: 16 Error:10061, OS: 10061 [Microsoft][SQL Server Native Client 11.0]TCP Provider: No connection could be made because the target machine actively refused it. 
    the message resource is present but the message is not found in the string/message table
    Error while trying to start SQL Agent Service from the configuration manager:
    SQLServerAgent could not be started (reason: Unable to connect to server '(local)'; SQLServerAgent cannot start).
     We changed the Server host in the registry by entering <ServerName>,<Port#>. This resolved SQL Agent Service startup issue. After startup, we tried to run jobs but they all are failing with the below error.
    Job runtime Error:
    Could not load package "Maintenance Plans\Daily DB Backups" because of error 0xC0014062.  Description: The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired).  The SQL statement that was issued
    has failed.  Source:   Started:  4:40:45 PM  Finished: 4:41:00 PM  Elapsed:  15.547 seconds.  The package could not be loaded.  The step failed.
     Resolution: If I create an alias name then all problems are solved.
     Question: Alias name is the only one solution or is there any other turn around? For some reason, I’m not at all comfortable with alias name. I feel like cheating. :-) .
     PLEASE COMMENT
    If you feel that I have answered your question then please "Mark as Answer".

    Hi,
     Shared memory is a security threat reported by several security audit tools. In our company, we are using "DBProtect" and "FortiDB" tools. Both checks for "Shared memory" & "Named Pipes" protocols. In case,
    our server is compromised then the last step is to get into the SQL Server to steal the data and we are trying to restrict this from being happening. So, we are disabling both protocols.
     Finally, we got it worked.
     "Cliconfig" in run command and enable "TCP/IP" protocols and it worked like a charm. This is a fluke resolution and I don't know the technical reason why we need to do this in "Client Configuration" on the server when
    we have "Configuration Manager".
     We successfully configured by disabling "Shared memory/Named Pipes" protocols. SQL Browser is also disabled & no aliases are configured.
    Thanks.
    If you feel that I have answered your question then please "Mark as Answer".

  • Javascript and Named Pipes

    I am trying to write a script for AE and I want to use named pipes to communicate.  My pipe server is working fine and it's functioning great in .NET when both sides are .NET programs.
    When I connect my AE javascript to the pipe as the client, the server side sees the connection, but the javascript side immediately closes it.  The server reports that the pipe is broken.  For the record, the server is set up for only one client and the .NET client program has been shut down.
    I am just getting started with this, so the code is only a few lines:
    var f = new File("\\\\.\\pipe\\MYPIPE");
    b=f.open ("r");
    $.writeln (b);
    $.writeln (b);
    What's interesting is that the value of "b" is immediately false, and the error is simply "I/O error".
    Anyone have any experience with this?
    Thanks in advance.

    At this point we do not have specific plans for adding shared memory or named pipes support but we appreciate your feedback, and will take it into consideration when planning future release(s). 
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • LDAP Newbie:    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT)

    Hi,
    I am getting the following error when I try to do a search on an ldap (AD LDS) database:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT), data 0, best match of:
    'DC=AppPartFE,DC=com'
    ]; remaining name 'cn=Users,dc=AppPartFE,dc=com'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
    at javax.naming.directory.InitialDirContext.search(Unknown Source)
    at Test.<init>(Test.java:70)
    at Test.main(Test.java:118)
    I can bind successfully using either the userPrincipalName (UPN) or the Distinguished Name (DN), however my search is failing.
    It is almost as if I am connected to the db tree at the wrong place.  Do I need a different search scope?
    I appreciate any assistance you can provide.
    Here is my code:
    import java.util.*; 
    import static java.lang.System.err;
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    import javax.naming.ldap.InitialLdapContext;
    import javax.naming.ldap.LdapContext;
    public class Test 
    public Test() 
      Properties prop = new Properties(); 
      prop.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory"); 
      prop.put("java.naming.provider.url", "ldap://MyHost.Mydomain.labs.CompanyX.com:50004");
      String strProviderUrl = "ldap://MyHost.Mydomain.labs.CompanyX.com:50004";
      // Can successfully bind with the userPrincipalName in AD LDS
      //prop.put("java.naming.security.principal", "[email protected]");
      // Can successfully bind with Distinguished Name
      // Note: the string is case insensitive and embedded blank after a comma is not a problem
       prop.put("java.naming.security.principal", "cn=tst0001,cn=Users,dc=AppPartFE,dc=com"); 
      prop.put("java.naming.security.credentials", "password"); 
      try { 
        LdapContext ctx = new InitialLdapContext(prop, null); 
        System.out.println("Bind successful");
    //I am successful to this point....
       //now try doing a search on another user
         String strFilter = "(&(objectClass=userProxy)(sAMAccountName=tst0001))";
        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE); //works with object class=* to find top partition node
        NamingEnumeration<SearchResult> results = ctx.search("cn=Users,dc=AppPartFE,dc=com", strFilter, searchControls);
        SearchResult searchResult = null;
        if(results.hasMoreElements()) {
             searchResult = (SearchResult) results.nextElement();
            //make sure there is not another item available, there should be only 1 match
            if(results.hasMoreElements()) {
                System.err.println("Matched multiple users for the accountName");
      catch (NamingException ex) { 
        ex.printStackTrace(); 
    public static void main(String[] args) 
      Test ldaptest = new Test(); 

    Because you are specifiying a base distinguished name in your ldap url, the ldap context will be rooted at that context and all subsequent objects will be relative to that base distinguished name.//connect to my domain controller
    String ldapURL = "ldaps://rhein:636/dc=bodensee,dc=de";andString userName = "CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de";results in an fully distinguished name of:CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de,dc=bodensee,dc=deEither specify your ldap url asString ldapURL = "ldaps://rhein:636";and leave your username as is, or specify the user object relative to the base distinguished name in the ldapurlString userName = "CN=verena bit,OU=Lehrer,OU=ASR";

Maybe you are looking for