0x80131904 sql ошибка

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, Action`1 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, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 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](Func`1 operation)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()

Hello,

I am migrating client’s database to my hosted environment, the client runs
SQL Server 2008 R2
, and we run SQL Server 2014.

I am stuck on restoring one log file, which left below error message when I restore it:

Restoring files
  DBFile_20150401030954.trn
Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
in databa
se ID 49 at offset 0x000001942a6000 in file ‘F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
sseyTSIAKL_Data.mdf’.  Additional messages in the SQL Server error log or system
 event log may provide more detail. This is a severe error condition that threat
ens database integrity and must be corrected immediately. Complete a full databa
se consistency check (DBCC CHECKDB). This error can be caused by many factors; f
or more information, see SQL Server Books Online.
RESTORE LOG is terminating abnormally.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
 cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
Behavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
havior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 time
out, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletio
nSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at OnBoardingTrnRestore.FileRestorer.FileIsRestored(SqlConnection connection,
 String sourceBackupFileName, String sourceDatabaseName, String destinationDatab
aseName, String databaseName, String strFileName) in c:\Dev\WiseCloud\OnBoarding
TrnRestore\OnBoardingTrnRestore\FileRestorer.cs:line 223
ClientConnectionId:6f583f98-9c23-4936-af45-0d7e9a9949ea
Finished

I have run restore filelistonly and verifyonly in both client and my box, and both worked well:

XXX_Data D:\Program Files (x86)\XXX\Data\YYY_Data.mdf

restore filelistonly:

D PRIMARY
70922469376 35184372080640
1 0
0 00000000-0000-0000-0000-000000000000
0 0
0 512 1
NULL 279441000014839500242
66CC6D17-575C-41E5-BB58-3FB4D33E288C
0 1 NULL
XXX_Log E:\Program Files (x86)\XXX\Log\YYY_Log.ldf
L NULL
31985762304 35184372080640
2 0
0 00000000-0000-0000-0000-000000000000
0 0
0 512 0
NULL 0
00000000-0000-0000-0000-000000000000 0
1 NULL

restore verifyonly:

Attempting to restore this backup may encounter storage space problems. Subsequent messages will provide details.
The path specified by «D:\Program Files (x86)\XXX\Data\YYY_Data.mdf» is not in a valid directory.
Directory lookup for the file «E:\Program Files (x86)\XXX\Log\YYY_Log.ldf» failed with the operating system error 3(The system cannot find the path specified.).
The backup set on file 1 is valid.

Dbcc checkdb also confirmed there is no error in client sql server database.

dbcc checkdb (XXX, NOINDEX) 

Results as follows:
DBCC results for ‘XXX’.
Warning: NO_INDEX option of checkdb being used. Checks on non-system indexes will be skipped.
Service Broker Msg 9675, State 1: Message Types analyzed: 17.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 9.
Service Broker Msg 9667, State 1: Services analyzed: 7.
Service Broker Msg 9668, State 1: Service Queues analyzed: 7.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
DBCC results for ‘sys.sysrscols’.
There are 23808 rows in 350 pages for object «sys.sysrscols».

DBCC results for ‘BMBoard’.
There are 0 rows in 0 pages for object «BMBoard».
DBCC results for ‘CusOutturnHeader’.
There are 0 rows in 0 pages for object «CusOutturnHeader».
CHECKDB found 0 allocation errors and 0 consistency errors in database ‘XXX’.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

We use ftp to transfer the log files from the another country to here, I confirmed the file’s MD5(checksum) is same as the copy in client’s environment, we have tried to upload the file a couple of times, same outcome.

The full backup is fine, I have successfully restored a series log backups prior to this file.

Has anyone seen this issue before? It is strange, all information indicates the file is good,but somehow it goes wrong.

Below are the version details:

Client: 

MICROSOFT SQL SERVER 2008 R2 (SP2) — 10.50.4000.0 (X64) 

My environment:

Microsoft SQL Server 2014 — 12.0.2480.0 (X64) 
Jan 28 2015 18:53:20 
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )

Thanks,

Albert

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\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlInternalConnection.cs:line 779 at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\TdsParser.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\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\TdsParser.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\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\TdsParser.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\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlInternalConnectionTds.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\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs:line 1873 at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlInternalConnectionTds.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\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs:line 536 at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlConnectionFactory.cs:line 143 at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionFactory.cs:line 163 at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionPool.cs:line 943 at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionPool.cs:line 2000 at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionPool.cs:line 1412 at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) in H:\tsaagent2_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionPool.cs:line 1296
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionFactory.cs:line 354 at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) in H:\tsaagent2_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionInternal.cs:line 766
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\ProviderBase\DbConnectionClosed.cs:line 71 at Microsoft.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) in H:\tsaagent2_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 1946
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry, SqlConnectionOverrides overrides) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 1934 at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides) in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 1495 at Microsoft.Data.SqlClient.SqlConnection.Open() in H:\tsaagent2\_work\11\s\src\Microsoft.Data.SqlClient\netfx\src\Microsoft\Data\SqlClient\SqlConnection.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:\development\R1\R1\WindowsFormsApp1\Form1.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.

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

  • 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

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

  • Error Authenticating With Venmo: 6 Ways to Fix it
  • Fix: Immersive Reader not Working in OneNote
  • WS-117178-5 PS5 Error Code: How to Fix it
  • TypingClub is Not Working on Windows 11? Here’s What to do

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.

newsletter icon

Hello,

I am migrating client’s database to my hosted environment, the client runs
SQL Server 2008 R2
, and we run SQL Server 2014.

I am stuck on restoring one log file, which left below error message when I restore it:

Restoring files
  DBFile_20150401030954.trn
Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
in databa
se ID 49 at offset 0x000001942a6000 in file ‘F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
sseyTSIAKL_Data.mdf’.  Additional messages in the SQL Server error log or system
 event log may provide more detail. This is a severe error condition that threat
ens database integrity and must be corrected immediately. Complete a full databa
se consistency check (DBCC CHECKDB). This error can be caused by many factors; f
or more information, see SQL Server Books Online.
RESTORE LOG is terminating abnormally.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
 cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
Behavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
havior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 time
out, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletio
nSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at OnBoardingTrnRestore.FileRestorer.FileIsRestored(SqlConnection connection,
 String sourceBackupFileName, String sourceDatabaseName, String destinationDatab
aseName, String databaseName, String strFileName) in c:\Dev\WiseCloud\OnBoarding
TrnRestore\OnBoardingTrnRestore\FileRestorer.cs:line 223
ClientConnectionId:6f583f98-9c23-4936-af45-0d7e9a9949ea
Finished

I have run restore filelistonly and verifyonly in both client and my box, and both worked well:

XXX_Data D:\Program Files (x86)\XXX\Data\YYY_Data.mdf

restore filelistonly:

D PRIMARY
70922469376 35184372080640
1 0
0 00000000-0000-0000-0000-000000000000
0 0
0 512 1
NULL 279441000014839500242
66CC6D17-575C-41E5-BB58-3FB4D33E288C
0 1 NULL
XXX_Log E:\Program Files (x86)\XXX\Log\YYY_Log.ldf
L NULL
31985762304 35184372080640
2 0
0 00000000-0000-0000-0000-000000000000
0 0
0 512 0
NULL 0
00000000-0000-0000-0000-000000000000 0
1 NULL

restore verifyonly:

Attempting to restore this backup may encounter storage space problems. Subsequent messages will provide details.
The path specified by «D:\Program Files (x86)\XXX\Data\YYY_Data.mdf» is not in a valid directory.
Directory lookup for the file «E:\Program Files (x86)\XXX\Log\YYY_Log.ldf» failed with the operating system error 3(The system cannot find the path specified.).
The backup set on file 1 is valid.

Dbcc checkdb also confirmed there is no error in client sql server database.

dbcc checkdb (XXX, NOINDEX) 

Results as follows:
DBCC results for ‘XXX’.
Warning: NO_INDEX option of checkdb being used. Checks on non-system indexes will be skipped.
Service Broker Msg 9675, State 1: Message Types analyzed: 17.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 9.
Service Broker Msg 9667, State 1: Services analyzed: 7.
Service Broker Msg 9668, State 1: Service Queues analyzed: 7.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
DBCC results for ‘sys.sysrscols’.
There are 23808 rows in 350 pages for object «sys.sysrscols».

DBCC results for ‘BMBoard’.
There are 0 rows in 0 pages for object «BMBoard».
DBCC results for ‘CusOutturnHeader’.
There are 0 rows in 0 pages for object «CusOutturnHeader».
CHECKDB found 0 allocation errors and 0 consistency errors in database ‘XXX’.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

We use ftp to transfer the log files from the another country to here, I confirmed the file’s MD5(checksum) is same as the copy in client’s environment, we have tried to upload the file a couple of times, same outcome.

The full backup is fine, I have successfully restored a series log backups prior to this file.

Has anyone seen this issue before? It is strange, all information indicates the file is good,but somehow it goes wrong.

Below are the version details:

Client: 

MICROSOFT SQL SERVER 2008 R2 (SP2) — 10.50.4000.0 (X64) 

My environment:

Microsoft SQL Server 2014 — 12.0.2480.0 (X64) 
Jan 28 2015 18:53:20 
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )

Thanks,

Albert

Понравилась статья? Поделить с друзьями:
  • 0x7d4 ошибка флештул
  • 0x70 ошибка привода мотора apg
  • 0x70a2 атол ошибка ккт
  • 0x61000008 ошибка принтера hp
  • 0x65b ошибка исполнения функции гибернация