Net sqlclient data provider ошибка 80131904

I am seeing this in several situations and it is intermittent in our web based application connecting to SQL Server 2008 R2 serve back end. Users are coming across a point 2 point connection and seeing this on and off. Thought it was bandwidth issues until I started seeing it on terminal servers that are on the same core switch as this SQL server. I have checked remote connection enabled, Port 1433 is set correctly in Configuration for TCP/IP and the only thing I see that could be a cause is the timeout setting is set to 100000 in the remote connections rather than unlimited.

System.Data.SqlClient.SqlException (0x80131904):
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)

System.ComponentModel.Win32Exception (0x80004005): The network path
was not found

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) > at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions
userOptions, DbConnectionInternal& connection) at
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at
System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory,
TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1
retry) at
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.Open() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func1
operation) at
System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action
operation) at
System.Data.Entity.Core.EntityClient.EntityConnection.Open()
ClientConnectionId:00000000-0000-0000-0000-000000000000

ee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 36 — The Shared Memory dll used to connect to SQL Server 2000 was not found) —> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlInternalConnection.cs:line 779 at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientTdsParser.cs:line 1668 at Microsoft.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(SqlAuthenticationMethod authType, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, ServerCertificateValidationCallback serverCallback, ClientCertificateRetrievalCallback clientCallback, Boolean& marsCapable, Boolean& fedAuthRequired) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientTdsParser.cs:line 1293 at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, Boolean isFirstTransparentAttempt, SqlAuthenticationMethod authType, String certificate, ServerCertificateValidationCallback serverCallback, ClientCertificateRetrievalCallback clientCallback, Boolean useOriginalAddressInfo, Boolean disableTnir) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientTdsParser.cs:line 640 at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover, Boolean isFirstTransparentAttempt, Boolean disableTnir) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlInternalConnectionTds.cs:line 2251 at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlInternalConnectionTds.cs:line 1873 at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlInternalConnectionTds.cs:line 1685 at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, ServerCertificateValidationCallback serverCallback, ClientCertificateRetrievalCallback clientCallback, DbConnectionPool pool, String accessToken, SqlClientOriginalNetworkAddressInfo originalNetworkAddressInfo, Boolean applyTransientFaultHandling) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlInternalConnectionTds.cs:line 536 at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlConnectionFactory.cs:line 143 at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionFactory.cs:line 163 at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionPool.cs:line 943 at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionPool.cs:line 2000 at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionPool.cs:line 1412 at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionPool.cs:line 1296
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionFactory.cs:line 354 at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionInternal.cs:line 766
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataProviderBaseDbConnectionClosed.cs:line 71 at Microsoft.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlConnection.cs:line 1946
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry, SqlConnectionOverrides overrides) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlConnection.cs:line 1934 at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides) in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlConnection.cs:line 1495 at Microsoft.Data.SqlClient.SqlConnection.Open() in H:tsaagent2_work11ssrcMicrosoft.Data.SqlClientnetfxsrcMicrosoftDataSqlClientSqlConnection.cs:line 1466 at Dapper.SqlMapper.<QueryImpl>d__1401.MoveNext() in //Dapper/SqlMapper.cs:line 1078
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable1 commandTimeout, Nullable`1 commandType) in /
/Dapper/SqlMapper.cs:line 721
at WindowsFormsApp1.Form1.LoadLeadButton_Click(Object sender, EventArgs e) in M:developmentR1R1WindowsFormsApp1Form1.cs:line 21
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ClientConnectionId:67e04f97-acbb-48e7-a4d7-918df00c2e58
Error Number:2,State:0,Class:20

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

WindowsFormsApp1
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///M:/development/R1/R1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

Microsoft.Data.SqlClient
Assembly Version: 2.0.20168.4
Win32 Version: 2.00.20168.4
CodeBase: file:///M:/development/R1/R1/WindowsFormsApp1/bin/Debug/Microsoft.Data.SqlClient.DLL

System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll

Dapper
Assembly Version: 2.0.0.0
Win32 Version: 2.0.35.21366
CodeBase: file:///M:/development/R1/R1/WindowsFormsApp1/bin/Debug/Dapper.DLL

System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

HI,

We have done following changes to Production environment.

1. Migrated Application from 2007 to 2010

2. Done User Domain Migration user MoveSP-User commmand

3. Then we Run following command to block users from another domain.

Set-SPSite -Identity ‘SiteName’ -UserAccountDirectoryPath «DC=xxx,DC=xxx,DC=xxx»

After All above changes, application were working fine without a single bug. all Operation are working fine. Then suddenly from 2 days below error coming in ULS log.

This error is thrown on item.update();

Unknown SPRequest error occurred. More information: 0x80131904

System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint ‘AllUserDataJunctions_PK’. Cannot insert duplicate key in object ‘dbo.AllUserDataJunctions’.  The statement has been terminated.     at System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler,
SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()     at System.Data.SqlClient.SqlDataReader.get_MetaData()    
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBeh…

avior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand
command, CommandBehavior behavior, SqlQueryData …

…monitoringData, Boolean retryForDeadLock)

at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String
bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames,
Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback,
ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft…

….SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId,
String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback,
ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration,
Boolean bPublish, Boolean bCheckOut, Boolean bCheckin,…

SqlError: ‘Violation of PRIMARY KEY constraint ‘AllUserDataJunctions_PK’. Cannot insert duplicate key in object ‘dbo.AllUserDataJunctions’.’    Source: ‘.Net SqlClient Data Provider’ Number: 2627 State: 1 Class: 14 Procedure: ‘proc_CreateItemJunctionsVersion’
LineNumber: 9 Server: ‘xxxxxxxxxxxxxx’ a035fb89-0a86-4817-b531-f20a537a002a

SqlError: ‘The statement has been terminated.’    Source: ‘.Net SqlClient Data Provider’ Number: 3621 State: 0 Class: 0 Procedure: ‘proc_CreateItemJunctionsVersion’ LineNumber: 9 Server: ‘xxxxxxxxxxxxxxx’ a035fb89-0a86-4817-b531-f20a537a002a

Please help!!!

I am unable to find any solution.

Regards,

Yogesh Ghare

EDIT — Just adding some extra points that come from observation .

1. This Error comes when following scenario is true

Second Attempt: User udate the same item in list from «Sharepoint UI or Custom aspx form».. After clickin on Save button this erro comes up.

Third Attempt: If after error user updates the same itme from UI the the data get saved

Third Attempt : If after error user updates the same itme from datasheet view User get Unresolve data confilct again and again.

Above Scenario is true only for Existing items in lists. For Newly added Items this is not producible(erroe not generated).One of the ovbservation is that All the items which are having issue are migrated from 2007 to 2010

Discover expert solutions that worked for others

by Kazim Ali Alvi

Kazim has always been fond of technology, be it scrolling through the settings on his iPhone, Android device, or Windows. And at times, unscrewing the device to take… read more


Updated on May 12, 2023

Reviewed by
Alex Serban

Alex Serban

After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more

  • The 0x80131904 prevents users from signing in and has been a major concern for administrators.
  • It generally appears when incorrect credentials are provided, or the firewall is blocking the connection.
  • To fix things, check for network issues, verify firewall rules, or change the DNS entries, amongst other solutions.

fix 0x80131904 SQL error

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer’s security and performance
  • Restoro has been downloaded by 0 readers this month.

Administrators creating applications using a SQL connection don’t usually face many issues if the backend is tight. But often, due to misconfigurations or network issues, users come across the 0x80131904 error.

The message reads, A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 – The specified network name is no longer available.). It’s not something regular users can fix, and administrators, too, have a tough time dealing with it. Let’s find out more!

What is component error code 0x80131904?

The error usually has to do with a network-related issue, but if the problem persists, it could be settings to blame. More so, for some administrators, only a handful of users encountered the 0x80131904 error, while others could easily access things.

Here are a few reasons you are encountering the error:

  • Incorrect credentials: When a user enters incorrect credentials, the error message may appear. So you will have to verify that.
  • Firewall blocking the connection: In some cases, a firewall was blocking the connection, and it could be both, the one on the server’s side as well as the user’s end. For the latter, you can easily disable the firewall.
  • Network issues: Some administrators found that it was a network issue triggering the error, and things automatically resolved in a short while.
  • Misconfigured SQL settings: For a few, the server properties were misconfigured, or the security settings were not optimal, which led to the error.

How do I fix error 0x80131904?

Before we move to the slightly complex solutions, check these aspects first:

  • Verify that the user is not entering incorrect credentials to access the application.
  • Check for network issues and talk to the service provider for an update on it.
  • Make sure the firewall is not blocking the connection. You can disable it temporarily to verify the same.

If none work, head to the fixes listed next.

1. Change the DNS entries

  1. Press Windows + E to open File Explorer, paste the following path in the address bar, and hit Enter:C:/Windows/System32/Drivers/ETCpath
  2. Now, change the DNS entries in the hosts.ini file.

An administrator shared that changing the DNS entries fixed things when only a single user was unable to access the server while others could. Whether or not that’s the case with you, do try this first.

2. Reconfigure server authentication setting

  1. Open the Server Properties and select Security from the navigation pane.security to fix 0x80131904
  2. Now, under Server authentication, choose SQL server with Windows Authentication mode, and click OK to save the changes. security settings to fix 0x80131904

In some cases, the server’s security settings were be to blame for the 0x80131904: login failed error, and reconfiguring Server authentication to SQL Server and Windows Authentication mode got things running.

3. Downgrade the SQL client package

For many, the problem appeared after updating to a newer SQLClient package, which points to a bug in it. And in this case, you should downgrade to the previous one.

For instance, a user reported the issue after upgrading to 2.0.0 from 1.1.3 and reverting the change fixed things in no time.

Read more about this topic

  • Chatsonic Network Error: How to Bypass it
  • Why is Perplexity AI Not Working? 4 Ways to Fix It
  • 0x80040216 Import Failed: How to Fix This Error
  • Jasper AI Not Working: 5 Ways to Quickly Fix it

4. Remove problematic suites

If nothing else worked, you could remove the following two cipher suites from the client list:TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

This has worked for many users, but remember to check if a patch has been released for the problem before making changes to fix 0x80131904.

Before you leave, check some quick tips to increase the Internet speed in Windows.

For any queries or to share what worked for you, drop a comment below.

Still having issues? Fix them with this tool:

SPONSORED

If the advices above haven’t solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

newsletter icon

  • Remove From My Forums

 locked

System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

  • Question

  • Hi All

    I am getting below error pls advice.

    Inner Exception -> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
    Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider
    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. —> System.ComponentModel.Win32Exception (0x80004005): The wait operation
    timed out

    Exception Name -> Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Answers

  • Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider
    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. —>

    Unless you specify otherwise using the SqlCommand.CommandTimeout property, the .Net SqlClient Data Provider will wait no more than 30 seconds before cancelling the query and raising a timeout error.  You can set the CommandTimeout property to specify
    a longer value (in seconds) if a long-running query is normal and expected.

    Long-running queries can be a symptom of the need for query and index tuning or blocking.  Examine the query plan in SQL Server Management Studio by pressing CTRL-L with the query in a query window to make sure indexes are used efficiently, additional
    indexes are needed or query tuning is needed.  A quick way to identify blocking is by running sp_who2 while the query is running to see if BlkBy contains a SPID of a blocking session.

    If you need additional help, post your DDL (CREATE TABLE statements with constraints and indexes) and problem query.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Proposed as answer by

      Tuesday, July 2, 2013 10:56 AM

    • Marked as answer by
      Allen Li — MSFT
      Friday, July 12, 2013 6:43 AM

  • Hi All,

    I am getting below issue even though procedure takes very less time to execute.

    I have tried all work around posted but still facing problem. Please help!!

    Data -> System.Collections.ListDictionaryInternal

    Target Site -> Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action])

    Inner Exception -> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

    Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider

    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. —> System.ComponentModel.Win32Exception (0x80004005): The wait operation
    timed out

    Exception Name -> Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    • Merged by
      Allen Li — MSFT
      Wednesday, July 3, 2013 3:19 AM
      Same question
    • Marked as answer by
      Bhanu Prakash K
      Friday, July 12, 2013 7:00 PM

  • Hi Bhanu,

    Based on the error message, this issue can occur if the stored procedure execution time expands the “remote query timeout”. To troubleshoot the issue, I suggest performing the following steps:

    1. Check whether there is any block occurs with this store procedure. 
    2. Check whether the stored procedure execution plan is tuned and the statistics are up-to-date. 
    3. Specify where clause to return only the data we need rather than return all data from the table.

    There is a similar question on the following link, you can also refer to it:

    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated
    http://stackoverflow.com/questions/8602395/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation

    If you have any feedback on our support, please click here.


    Allen Li
    TechNet Community Support

    • Marked as answer by
      Allen Li — MSFT
      Friday, July 12, 2013 6:43 AM

Понравилась статья? Поделить с друзьями:
  • Net host ошибка
  • Net has only one pin altium ошибка
  • Net framework устранение ошибок
  • Neocore account ошибка сети
  • Net framework ошибка цепочка сертификатов