Error in restoring ...
 
Notifications
Clear all

Error in restoring .sql database.

3 Posts
2 Users
0 Likes
1,695 Views
Posts: 0
Topic starter
(@Anonymous)
New Member
Joined: 1 second ago

Hello Team,

Can anyone help me on below issue? While trying to restore the database from .sql file, below error, was seen.
error:

Stack Trace:
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: Error executing 'RESTORE' task on 'quizdb' SQL_DATABASE ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: The media family on device 'C:UsersSCPServerAppDataLocalTempquiz.sql' is incorrectly formed. SQL Server cannot process this media family. 
RESTORE FILELIST is terminating abnormally. 
at System.Data.SqlClient.SqlConnection.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.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, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) 
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) 
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 
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.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) 
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) 
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) 

2 Replies
Posts: 1964
Admin
(@m-tiggelaar)
Noble Member
Joined: 8 years ago

Hello,
This would be an issue with SQL and backup file (for example if original SQL version is different then the new, etc).
Some usefull tips can be found here: https://dba.stackexchange.com/questions/37288/media-family-on-device-is-incorrectly-formed-sql-server-cannot-process-this-med
Regards,
Marco

Reply
Posts: 0
Topic starter
(@Anonymous)
New Member
Joined: 1 second ago

Thanks, Marco for your reply.
The backup file was created on SQL 2014 and try to deploy on the same version. The above issue was only seen on .sql backup file (not in .bak file) while restoring from solidcp web-panel. But the error was not found while restoring from SQL management studio.
Thank you.

Reply
Share: