Sql-server – Getting data from this MS SQL bak file

backupimportsql server

The following commands

restore filelistonly from disk = 'C:\....bak'
restore verifyonly from disk = 'C:\....bak'

produce this error

The media family on device 'C:\...bak' is incorrectly formed. SQL Server cannot process this media family.

This command

restore headeronly from disk = 'C:\....bak'

produces

BackupName  BackupDescription   BackupType  ExpirationDate  Compressed  Position    DeviceType  UserName    ServerName  DatabaseName    DatabaseVersion DatabaseCreationDate    BackupSize  FirstLSN    LastLSN CheckpointLSN   DatabaseBackupLSN   BackupStartDate BackupFinishDate    SortOrder   CodePage    UnicodeLocaleId UnicodeComparisonStyle  CompatibilityLevel  SoftwareVendorId    SoftwareVersionMajor    SoftwareVersionMinor    SoftwareVersionBuild    MachineName Flags   BindingID   RecoveryForkID  Collation   FamilyGUID  HasBulkLoggedData   IsSnapshot  IsReadOnly  IsSingleUser    HasBackupChecksums  IsDamaged   BeginsLogChain  HasIncompleteMetaData   IsForceOffline  IsCopyOnly  FirstRecoveryForkID ForkPointLSN    RecoveryModel   DifferentialBaseLSN DifferentialBaseGUID    BackupTypeDescription   BackupSetGUID   CompressedBackupSize
*** INCOMPLETE ***  NULL    NULL    NULL    NULL    1   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL

I verified the .bak file did indeed come from a Microsoft SQL Server. It is not encrypted. It is doubtful that it was created from Microsoft SQL Server 2012 because the old system was several years old. The import was attempted using a temporary install onto a Vista machine with SQL Server 2008 R2.

The goal is to get the data into either a different database (for example, using ODBC), or into a plain data type (.csv, .sql, .xml, etc) that we can create an import program for.

Do you suggest a different method other than TSQL for performing this import?

Do you have an alternate explanation for the error message? I am not inclined to guess whether I should try again on a newer or older SQL Server Version because every re-install takes a significant amount time, which is a limited resource.

Best Answer

If this is not a version mismatch, then the backup file could be actually corrupted.

If this is the case, you're not going to be able to (at least easily) recover anything from it.