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_DataD:\Program Files (x86)\XXX\Data\YYY_Data.mdf
restore filelistonly:
DPRIMARY709224693763518437208064010 000000000-0000-0000-0000-00000000000000 05121NULL27944100001483950024266CC6D17-575C-41E5-BB58-3FB4D33E288C 01NULL
XXX_LogE:\Program Files (x86)\XXX\Log\YYY_Log.ldfLNULL 319857623043518437208064020 000000000-0000-0000-0000-00000000000000 05120NULL0 00000000-0000-0000-0000-00000000000001NULL
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