Microsoft sql server error 3241 restore headeronly is terminating abnormally

В Microsoft SQL Server 2019 восстановление сжатых резервных копий баз данных или резервных копий журналов баз данных с включенным прозрачным шифрованием данных (TDE) может привести к следующей ошибке:

Проблемы

В Microsoft SQL Server 2019 восстановление сжатых резервных копий баз данных или резервных копий журналов баз данных с включенным прозрачным шифрованием данных (TDE) может привести к следующей ошибке:

Msg 3241, уровень 16, состояние 18, строка <номер строки>

Семейство носителей на устройстве «<имени файла резервной копии>» имеет неправильный формат. SQL Server не может обработать это семейство носителей.

Обходное решение

Чтобы обойти эту проблему, не сжимайте резервные копии баз данных с поддержкой TDE одним из следующих методов:

  • Используйте WITH COMPRESSION, как описано в инструкции BACKUP (Transact-SQL).

  • Используйте сжатие резервных копий по умолчанию, как описано в разделе «Просмотр» или «Настройка параметра конфигурации сервера для сжатия резервных копий по умолчанию».

Решение

Сведения о накопительном пакете обновления

Эта проблема устранена в следующем накопительном обновлении для SQL Server:

Накопительный пакет обновления 16 для SQL Server 2019

Примечание. Чтобы избежать этой проблемы, необходимо создать резервные копии вместе с этим исправлением. Установка фиксированного накопительного пакета обновления на целевом экземпляре и попытка восстановить ту же резервную копию, созданную без исправления, не будет работать.

Дополнительная информация

Важно: Начиная с SQL Server 2019 с накопительным пакетом обновления 16 (CU16), при создании сжатых резервных копий (базы данных или журнала) баз данных с поддержкой TDE будет использоваться новый формат резервного копирования, который можно восстановить только в экземпляре с установленным накопительным пакетом обновления 16 (CU16) или более поздней версии.

Восстановление сжатой резервной копии базы данных с поддержкой TDE, созданной в накопительном пакете обновления 16 или более поздней версии на экземпляре SQL Server 2019 версии CU15 или более ранней версии, завершается сбоем и вызывает следующие ошибки:

  • RESTORE DATABASE

    Msg 3013, level 16, State 1, Line <LineNumber>

    Инструкция RESTORE DATABASE завершается аномально.

    Msg 9004, level 21, State 1, Line <LineNumber>

    При обработке журнала для базы данных «TDE_DB» произошла ошибка. По возможности выполните восстановление из резервной копии. Если резервная копия недоступна, может потребоваться перестроить журнал.

  • RESTORE LOG

    Расположение: mediaRead.cpp:1018

    Выражение: readSize <= m_Demand

    SPID: 84

    Идентификатор процесса: ProcessID

    Msg 3013, level 16, State 1, Line <LineNumber>

    Инструкция RESTORE LOG завершается аномально.

    Msg 3624, level 20, State 1, Line <LineNumber>

    Сбой проверки системного утверждения. Дополнительные сведения см. в журнале ошибок SQL Server. Как правило, сбой утверждения вызван ошибкой программного обеспечения или повреждением данных. Чтобы проверить наличие повреждения базы данных, попробуйте выполнить инструкцию DBCC CHECKDB. Если вы согласились отправлять дампы в корпорацию Майкрософт во время установки, мини-дамп будет отправлен в корпорацию Майкрософт. Обновление может быть доступно корпорацией Майкрософт в последнем пакете обновления или в исправлении из службы технической поддержки.

Примечание. Инструкции RESTORE HEADERONLY и RESTORE FILELISTONLY не затрагиваются проблемой и будут работать во всех случаях.

Инструкция RESTORE VERIFYONLY может успешно вернуться для полной резервной копии, которая является недопустимой в соответствии с описанным выше сценарием: не следует полагаться на инструкцию RESTORE VERIFYONLY, чтобы убедиться, что резервную копию можно восстановить, не нажав указанную выше проблему. Инструкция RESTORE VERIFYONLY для резервной копии журнала обычно завершается сбоем с той же ошибкой, что и в фактическом журнале RESTORE, описанном выше.

Поэтому важно убедиться, что в контексте, где может быть включено Сжатие TDE и резервного копирования, все экземпляры SQL Server 2019, использующие резервные копии из других экземпляров SQL Server 2019, получают накопительный пакет обновления 16 (или более поздней версии) до экземпляров, создающих резервный материал. Архитектура доставки журналов будет простым примером такой ситуации: сначала обновите вторичные экземпляры.

После создания резервной копии журнала транзакций со сжатием ее обычно невозможно воссоздать без сжатия. Таким образом, обновление сервера-источника доставки журналов до SQL Server 2019 с накопительным пакетом обновления 16 (CU16) или более поздней версии в таком контексте приведет к разрыву заданий восстановления до обновления сервера-получателя.

Несжатая резервная копия базы данных с поддержкой TDE, сжатая резервная копия базы данных, которая не включена для TDE, или несжатая резервная копия базы данных, которая не включена для TDE, не будет использовать новый формат резервной копии, представленный в накопительном пакете обновления 16, и может быть восстановлен в экземпляре SQL Server 2019 любых версий.

Поэтому необходимо отключить сжатие резервных копий, если вы планируете восстановить материал базы данных с поддержкой TDE (полное резервное копирование или резервное копирование журнала транзакций) на любые экземпляры SQL Server более ранних версий до SQL Server 2019 CU16.

Статус

Корпорация Майкрософт подтверждает наличие этой проблемы в своих продуктах, которые перечислены в разделе «Применяется к».

Ссылки

Сведения о терминологии, используемой корпорацией Майкрософт для описания обновлений программного обеспечения.

Нужна дополнительная помощь?

Symptoms

In Microsoft SQL Server 2019, restoring the compressed database or log backups of the databases that have transparent data encryption (TDE) enabled may cause the following error:

Msg 3241, Level 16, State 18, Line <LineNumber>

The media family on device ‘<backup file name>’ is incorrectly formed. SQL Server cannot process this media family.

Workaround

To work around this issue, do not compress the backups of TDE-enabled databases by using either of the following methods:

  • Use WITH COMPRESSION as described in BACKUP (Transact-SQL).

  • Rely on backup compression default as described in View or Configure the backup compression default Server Configuration Option.

Resolution

Cumulative update information

This problem is fixed in the following cumulative update for SQL Server:

Cumulative Update 16 for SQL Server 2019

Note You need to create the backups together with this fix to avoid the problem. Installing the fixed CU on the target instance and trying to restore the same backup created without the fix will not work.

More information

Important: Starting with SQL Server 2019 CU16, the creation of compressed backups (database or log) of TDE-enabled databases will use a new backup format that can only be restored on an instance that has CU16 or later installed.

Restoring a compressed backup of a TDE-enabled database that’s created on CU16 or later on a SQL Server 2019 instance of version CU15 or earlier fails and causes the following errors:

  • RESTORE DATABASE

    Msg 3013, Level 16, State 1, Line <LineNumber>

    RESTORE DATABASE is terminating abnormally.

    Msg 9004, Level 21, State 1, Line <LineNumber>

    An error occurred while processing the log for database ‘TDE_DB’. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

  • RESTORE LOG

    Location:     mediaRead.cpp:1018

    Expression:   readSize <= m_Demand

    SPID:         84

    Process ID:   ProcessID

    Msg 3013, Level 16, State 1, Line <LineNumber>

    RESTORE LOG is terminating abnormally.

    Msg 3624, Level 20, State 1, Line <LineNumber>

    A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

Note RESTORE HEADERONLY and RESTORE FILELISTONLY are unaffected by the issue and will work in all cases.

RESTORE VERIFYONLY may return successfully for a FULL backup that is invalid as per the above scenario: do not rely on RESTORE VERIFYONLY to establish that the backup can be restored without hitting the above issue. RESTORE VERIFYONLY against a log backup will usually fail together with the same error as an actual RESTORE LOG described above.

Therefore, it’s important to make sure that in a context where TDE and Backup Compression may be enabled, any SQL Server 2019 instances consuming backups from other SQL Server 2019 instances receive CU16 (or later) before the instances that generate the backup material. Log shipping architectures would be a prime example of such a situation: upgrade secondary instances first.

Once a transaction log backup has been created with compression, it is usually not possible to recreate it without compression. Therefore, upgrading the Log Shipping primary server to SQL Server 2019 CU16 or later in such a context would break the restoring jobs until the secondary server is also upgraded.

An uncompressed backup of a TDE-enabled database, a compressed backup of a database that’s not enabled for TDE, or an uncompressed backup of a database that’s not enabled for TDE will not use the new backup format introduced in CU16, and can be restored on a SQL Server 2019 instance of any versions.

It is therefore required to disable backup compression if you plan to restore a TDE-enabled database material (either full backup or transaction log backup) to any SQL Server instances of earlier versions before SQL Server 2019 CU16.

Each new cumulative update for SQL Server contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest build for your version of SQL Server:

Latest cumulative update for SQL Server 2019

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Summary: SQL database error 3241 is a media-related error that occurs when restoring a database from a backup. This error is usually caused due to a corrupted backup file. Read this blog for complete details on the error. Also, learn about the most effective solutions to fix the 3241 SQL error. You can also use a backup extractor tool to extract data from the corrupted backup and restore the database.

Free Download for Windows

Contents

  • What Causes SQL Database Error 3241, ‘RESTORE HEADERONLY is Terminating Abnormally’?
  • Before We Proceed
  • Solutions to Resolve SQL Database Error 3241
  • Alternative Solution to Restore Database from Backup
  • End Note

At times, when restoring a SQL Server database from a backup, you might encounter the 3241 error along with an error message ‘RESTORE HEADERONLY is terminating abnormally’.

sql database error 3241 restore headeronly terminating abnormally

What Causes SQL Database Error 3241, ‘RESTORE HEADERONLY is Terminating Abnormally’?

The error is caused when a backup file you are trying to restore gets corrupt due to an issue with the hardware (i.e., hard disks, network storage, etc.) or because of a malware attack. Also, you may encounter the error if you restore a backup from a recent version of SQL Server to an earlier version of SQL Server.

Note: If you get error 3241 when executing the ‘RESTORE FILELISTONLY’ statement, the error is caused due to a bug in SQL Server. To resolve the issue, install the cumulative updates released by Microsoft. For more information, read this KB.

Before We Proceed

Before attempting the solutions to troubleshoot the error, ensure the backup is readable by running the following T-SQL statement:

RESTORE VERIFYONLY FROM DISK=’ <path_to_your_backup>.BAK’

This command will check the backup file and returns a message stating whether the backup is useable or not.

If there is no problem with the backup, check your Windows System event logs for any hardware-related or networking issues. Also, ensure that you’re not restoring a database from a backup created on a higher version of SQL Server to a lower version.

If there is some issue with the backup file, proceed with implementing the following solutions.

Solutions to Resolve SQL Database Error 3241

Here’s what you can do to fix the error 3241 – that occurs due to corruption in the backup set:

  • Locate another valid backup file to restore the database
  • Create a new backup if the database is accessible

Alternative Solution to Restore Database from Backup

If you fail to restore the backup correctly, try to extract data from the corrupted backup (BAK) file using Stellar Repair for MS SQL Technician. The software provides a backup extractor tool to help the users recover data from a corrupt BAK file easily and quickly. After extracting the backup data, the software saves the data in a new or an existing database. You can evaluate the software functionality by downloading the demo version from the link below.

Stellar

For detailed steps on using the backup extractor tool for data recovery, read this: How to Recover SQL Server Database from a Corrupt Backup File?

Stellar Repair for MS SQL Technician also comprises tools to repair a corrupt SQL database MDF, NDF files. Also, it provides a utility to reset the lost or forgotten password of master.mdf file.

End Note

You might fail to perform a backup and restore operation on a SQL Server database. And, get an error message that reads: ‘Restore HEADERONLY is terminating abnormally, Microsoft SQL Server error 3241’.  It happens when the backup you’re trying to restore is corrupt. In that case, check if you have any other backup copy you can use to restore the database or create a new backup set. If the issue persists, use Stellar Backup Extractor for MS SQL to retrieve data from a backup file.

Once you’ve retrieved your backup data and restored the database, you must prevent the 3241 media error from reoccurring. For this, do the following:

  • To avoid backing up a corrupt database, ensure that the Backup CHECKSUM option is enabled. For more information, see Possible Media Errors During Backup and Restore (SQL Server).
  • Use trace flag 3023 to enable CHECKSUM option when using backup utilities to perform a backup; this will ensure that the data is backed up in a healthy state. Besides, generation of backup checksum during a restore process ensures that the backup media is not damaged when transferring a copy of the SQL database.

About The Author

Charanjeet

Charanjeet is a Technical Content Writer at Stellar®who specializes in writing about databases, e-mail recovery, and e-mail migration solutions. She loves researching and developing content that helps database administrators, organizations and novices to fix multiple problems related to MS SQL and MySQL databases and Microsoft Exchange.

Best Selling Products

Stellar Repair for MS SQL

Stellar Repair for MS SQL

Stellar Repair for MS SQL is an enterpri

Read More

Stellar Toolkit for MS SQL

Stellar Toolkit for MS SQL

3-in-1 software package, recommended by

Read More

Stellar Converter for Database

Stellar Converter for Database

Stellar Converter for Database is an eff

Read More

Stellar Repair for Access

Stellar Repair for Access

Powerful tool, widely trusted by users &

Read More

Содержание

  1. KB5014298 — исправление: ошибка 3241 возникает при выполнении инструкции RESTORE DATABASE ИЛИ RESTORE LOG
  2. Проблемы
  3. Обходное решение
  4. Решение
  5. Сведения о накопительном пакете обновления
  6. Дополнительная информация
  7. Статус
  8. Ссылки
  9. Исправление: Ошибка 3241 при выполнении инструкции RESTORE FILELISTONLY в SQL Server 2008 R2 или SQL Server 2012
  10. Симптомы
  11. Причина
  12. Решение
  13. Информация о накопительном пакете обновления
  14. Накопительное обновление 9 для SQL Server 2012
  15. Накопительного обновления 5 для SQL Server 2012 Пакет обновления 1
  16. Накопительное обновление для 13 SQL Server 2008 R2 с пакетом обновления 1
  17. Накопительного обновления 7 для SQL Server 2008 R2 с пакетом обновления 2
  18. Статус
  19. Временное решение
  20. Microsoft sql server error 3241 restore headeronly is terminating abnormally
  21. Answered by:
  22. Question
  23. KB5014298 — FIX: Error 3241 occurs during executing RESTORE DATABASE OR RESTORE LOG
  24. Symptoms
  25. Workaround
  26. Resolution
  27. Cumulative update information
  28. More information
  29. Status
  30. References

KB5014298 — исправление: ошибка 3241 возникает при выполнении инструкции RESTORE DATABASE ИЛИ RESTORE LOG

Проблемы

В Microsoft SQL Server 2019 восстановление сжатых резервных копий баз данных или резервных копий журналов баз данных с включенным прозрачным шифрованием данных (TDE) может привести к следующей ошибке:

Msg 3241, уровень 16, состояние 18, строка номер строки>

Семейство носителей на устройстве » имени файла резервной копии>» имеет неправильный формат. SQL Server не может обработать это семейство носителей.

Обходное решение

Чтобы обойти эту проблему, не сжимайте резервные копии баз данных с поддержкой TDE одним из следующих методов:

Используйте WITH COMPRESSION, как описано в инструкции BACKUP (Transact-SQL).

Используйте сжатие резервных копий по умолчанию, как описано в разделе «Просмотр» или «Настройка параметра конфигурации сервера для сжатия резервных копий по умолчанию».

Решение

Сведения о накопительном пакете обновления

Эта проблема устранена в следующем накопительном обновлении для SQL Server:

Примечание. Чтобы избежать этой проблемы, необходимо создать резервные копии вместе с этим исправлением. Установка фиксированного накопительного пакета обновления на целевом экземпляре и попытка восстановить ту же резервную копию, созданную без исправления, не будет работать.

Дополнительная информация

Важно: Начиная с SQL Server 2019 с накопительным пакетом обновления 16 (CU16), при создании сжатых резервных копий (базы данных или журнала) баз данных с поддержкой TDE будет использоваться новый формат резервного копирования, который можно восстановить только в экземпляре с установленным накопительным пакетом обновления 16 (CU16) или более поздней версии.

Восстановление сжатой резервной копии базы данных с поддержкой TDE, созданной в накопительном пакете обновления 16 или более поздней версии на экземпляре SQL Server 2019 версии CU15 или более ранней версии, завершается сбоем и вызывает следующие ошибки:

Msg 3013, level 16, State 1, Line LineNumber>

Инструкция RESTORE DATABASE завершается аномально.

Msg 9004, level 21, State 1, Line LineNumber>

При обработке журнала для базы данных «TDE_DB» произошла ошибка. По возможности выполните восстановление из резервной копии. Если резервная копия недоступна, может потребоваться перестроить журнал.

Выражение: readSize ProcessID

Msg 3013, level 16, State 1, Line LineNumber>

Инструкция RESTORE LOG завершается аномально.

Msg 3624, level 20, State 1, Line LineNumber>

Сбой проверки системного утверждения. Дополнительные сведения см. в журнале ошибок SQL Server. Как правило, сбой утверждения вызван ошибкой программного обеспечения или повреждением данных. Чтобы проверить наличие повреждения базы данных, попробуйте выполнить инструкцию DBCC CHECKDB. Если вы согласились отправлять дампы в корпорацию Майкрософт во время установки, мини-дамп будет отправлен в корпорацию Майкрософт. Обновление может быть доступно корпорацией Майкрософт в последнем пакете обновления или в исправлении из службы технической поддержки.

Примечание. Инструкции RESTORE HEADERONLY и RESTORE FILELISTONLY не затрагиваются проблемой и будут работать во всех случаях.

Инструкция RESTORE VERIFYONLY может успешно вернуться для полной резервной копии, которая является недопустимой в соответствии с описанным выше сценарием: не следует полагаться на инструкцию RESTORE VERIFYONLY, чтобы убедиться, что резервную копию можно восстановить, не нажав указанную выше проблему. Инструкция RESTORE VERIFYONLY для резервной копии журнала обычно завершается сбоем с той же ошибкой, что и в фактическом журнале RESTORE, описанном выше.

Поэтому важно убедиться, что в контексте, где может быть включено Сжатие TDE и резервного копирования, все экземпляры SQL Server 2019, использующие резервные копии из других экземпляров SQL Server 2019, получают накопительный пакет обновления 16 (или более поздней версии) до экземпляров, создающих резервный материал. Архитектура доставки журналов будет простым примером такой ситуации: сначала обновите вторичные экземпляры.

После создания резервной копии журнала транзакций со сжатием ее обычно невозможно воссоздать без сжатия. Таким образом, обновление сервера-источника доставки журналов до SQL Server 2019 с накопительным пакетом обновления 16 (CU16) или более поздней версии в таком контексте приведет к разрыву заданий восстановления до обновления сервера-получателя.

Несжатая резервная копия базы данных с поддержкой TDE, сжатая резервная копия базы данных, которая не включена для TDE, или несжатая резервная копия базы данных, которая не включена для TDE, не будет использовать новый формат резервной копии, представленный в накопительном пакете обновления 16, и может быть восстановлен в экземпляре SQL Server 2019 любых версий.

Поэтому необходимо отключить сжатие резервных копий, если вы планируете восстановить материал базы данных с поддержкой TDE (полное резервное копирование или резервное копирование журнала транзакций) на любые экземпляры SQL Server более ранних версий до SQL Server 2019 CU16.

Каждое новое накопительное обновление для SQL Server содержит все исправления и исправления безопасности, которые были в предыдущей сборке. Рекомендуется установить последнюю сборку для вашей версии SQL Server:

Статус

Корпорация Майкрософт подтверждает наличие этой проблемы в своих продуктах, которые перечислены в разделе «Применяется к».

Ссылки

Сведения о терминологии, используемой корпорацией Майкрософт для описания обновлений программного обеспечения.

Источник

Исправление: Ошибка 3241 при выполнении инструкции RESTORE FILELISTONLY в SQL Server 2008 R2 или SQL Server 2012

Симптомы

Предположим, что одно из указанных ниже обновлений были установлены на компьютер с Microsoft SQL Server 2008 R2 или установлен Microsoft SQL Server 2012:

6 накопительное обновление для SQL Server 2008 R2 Пакет обновления 1 (SP1) или более поздней версии

Накопительное обновление 1 для SQL Server 2008 R2 Пакет обновления 2 (SP2) или более поздней версии

В этом случае запустите инструкцию RESTORE FILELISTONLY для восстановления базы данных в SQL Server 2008 R2. Тем не менее происходит сбой операции восстановления. Кроме того появляется следующее сообщение об ошибке:

Сообщение 3241, уровень 16, состояние 1, строка 1
Семейство носителей на устройстве « BackupFilePath>» сформировано неправильно. SQL Server не удается обработать семейства носителей.
Сообщение 3013, уровень 16, состояние 1, строка 1
ВОССТАНОВЛЕНИЕ FILELIST завершается аварийно.

Примечание При запуске Инструкции DBCC CHECKDB в ранних сборках SQL Server 2008 R2, возникают ошибки не согласованности, указывает на проблемы в носителе резервной копии. Следовательно резервная копия может быть восстановлена в этих ранних версиях.

Причина

Эта проблема возникает из-за накопительного обновления 1 для SQL 2008 R2 с пакетом обновления 2 и 5 накопительного обновления для SQL Server 2008 R2 SP1 выполнять проверку полноты базы данных при восстановлении базы данных. Тем не менее такая проверка не является обязательным для инструкцию RESTORE FILELISTONLY .

Эта проверка было включено в исправления, описанные в КБ 2685132. Дополнительные сведения о проверке полноты базы данных щелкните следующий номер статьи 2685132 в статье 2685132 базы знаний Майкрософт:

ИСПРАВИТЬ 2685132 : задание восстановления доставки журналов восстановление резервной копии журнала транзакций повреждены базы данных-получателя при выполнении задания резервного копирования на экземпляре SQL Server 2008 R2 или экземпляр SQL Server 2012 доставки журналов

Решение

Информация о накопительном пакете обновления

Накопительное обновление 9 для SQL Server 2012

Исправление, устраняющее эту проблему, сначала было выпущено в накопительное обновление 9. Дополнительные сведения о том, как получить этот накопительный пакет обновления для SQL Server 2012, щелкните следующий номер статьи базы знаний Майкрософт:

2867319 накопительного обновления 9 для SQL Server 2012Примечание. Поскольку построения являются накопительными, каждый новый выпуск исправление содержит все исправления и все исправления, входившие в состав предыдущих 2012 SQL Server исправления выпуска. Мы рекомендуем рассмотреть применение последнего выпуска исправления, содержащего это исправление. Для получения дополнительных сведений щелкните следующий номер статьи базы знаний Майкрософт:

2692828 SQL Server 2012 выполняется построение, выпущенных после выпуска SQL Server 2012

Накопительного обновления 5 для SQL Server 2012 Пакет обновления 1

Исправление этой уязвимости первого выпуска накопительного обновления 5. Дополнительные сведения о том, как получить этот накопительный пакет обновления для SQL Server 2012 Пакет обновления 1 щелкните следующий номер статьи базы знаний Майкрософт:

2861107 накопительного обновления 5 для SQL Server 2012 Пакет обновления 1Примечание. Поскольку построения являются накопительными, каждый новый выпуск исправление содержит все исправления и все исправления безопасности, которые были включены в Пакет обновления 1 для предыдущего SQL Server 2012 выпуска исправлений. Мы рекомендуем рассмотреть применение последнего выпуска исправления, содержащего это исправление. Для получения дополнительных сведений щелкните следующий номер статьи базы знаний Майкрософт:

2772858 SQL Server 2012 выполняется построение, выпущенных после выпуска SQL Server 2012 Пакет обновления 1

Накопительное обновление для 13 SQL Server 2008 R2 с пакетом обновления 1

Исправление этой проблемы сначала было выпущено в 13 накопительного обновления. Дополнительные сведения о том, как получить этот накопительный пакет обновления для SQL Server 2008 R2 SP1 щелкните следующий номер статьи базы знаний Майкрософт:

Пакет 13 2855792 накопительного обновления для SQL Server 2008 R2 SP1Примечание. Поскольку построения являются накопительными, каждый новый выпуск исправление содержит все исправления и все исправления, входившие в состав предыдущих SQL Server 2008 R2 SP1 исправления выпуска. Мы рекомендуем рассмотреть применение последнего выпуска исправления, содержащего это исправление. Для получения дополнительных сведений щелкните следующий номер статьи базы знаний Майкрософт:

2567616 SQL Server 2008 R2 выполняет построение, выпущенных после выпуска SQL Server 2008 R2 Пакет обновления 1

Накопительного обновления 7 для SQL Server 2008 R2 с пакетом обновления 2

Исправление этой уязвимости первого выпуска накопительного обновления 7. Дополнительные сведения о том, как получить этот накопительный пакет обновления для SQL Server 2008 R2 с пакетом обновления 2, щелкните следующий номер статьи базы знаний Майкрософт:

2844090 накопительного обновления 7 для SQL Server 2008 R2 с пакетом обновления 2Примечание. Поскольку построения являются накопительными, каждый новый выпуск исправление содержит все исправления и все исправления, входившие в состав предыдущих SQL Server 2008 R2 с пакетом обновления 2 выпуска исправлений. Мы рекомендуем рассмотреть применение последнего выпуска исправления, содержащего это исправление. Для получения дополнительных сведений щелкните следующий номер статьи базы знаний Майкрософт:

2730301 SQL Server 2008 R2 выполняет построение, выпущенных после выпуска SQL Server 2008 R2 Пакет обновления 2

Статус

Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».

Временное решение

Чтобы обойти эту проблему, запустите инструкцию RESTORE FILELISTONLY , а также параметр CONTINUE_AFTER_ERROR .

Источник

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I have taken backup of SQL Server 2008 DB on server, and download them to local environment.

I am trying to restore that database and it is keep on giving me following error.

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

The media family on device ‘C:go4sharepoint_1384_8481.bak’ is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

I have tried to create a temp DB on server and tried to restore the same backup file and that works. I have also tried no. of times downloading file from server to local pc using different options on Filezila (Auto, Binary)

But its not working. After that I tried to execute following command on server.

And it is giving me following error.

Msg 3201, Level 16, State 1, Line 1 Cannot open backup device ‘c:Program FilesMicrosoft SQL ServerMSSQL10.SQLEXPRESSMSSQLBackup C:HostingSpacesdbname_jun14_2010_new.bak’. Operating system error 123(The filename, directory name, or volume label syntax is incorrect.). Msg 3013, Level 16, State 1, Line 1 BACKUP DATABASE is terminating abnormally.

But still I can’t able to restore Database correctly.

Note: I am trying to restore on SQL Server 2008 DB.

Источник

KB5014298 — FIX: Error 3241 occurs during executing RESTORE DATABASE OR RESTORE LOG

Symptoms

In Microsoft SQL Server 2019, restoring the compressed database or log backups of the databases that have transparent data encryption (TDE) enabled may cause the following error:

Msg 3241, Level 16, State 18, Line LineNumber>

The media family on device ‘ backup file name>’ is incorrectly formed. SQL Server cannot process this media family.

Workaround

To work around this issue, do not compress the backups of TDE-enabled databases by using either of the following methods:

Use WITH COMPRESSION as described in BACKUP (Transact-SQL).

Resolution

Cumulative update information

This problem is fixed in the following cumulative update for SQL Server:

Note You need to create the backups together with this fix to avoid the problem. Installing the fixed CU on the target instance and trying to restore the same backup created without the fix will not work.

More information

Important: Starting with SQL Server 2019 CU16, the creation of compressed backups (database or log) of TDE-enabled databases will use a new backup format that can only be restored on an instance that has CU16 or later installed.

Restoring a compressed backup of a TDE-enabled database that’s created on CU16 or later on a SQL Server 2019 instance of version CU15 or earlier fails and causes the following errors:

Msg 3013, Level 16, State 1, Line LineNumber>

RESTORE DATABASE is terminating abnormally.

Msg 9004, Level 21, State 1, Line LineNumber>

An error occurred while processing the log for database ‘TDE_DB’. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

Expression: readSize ProcessID

Msg 3013, Level 16, State 1, Line LineNumber>

RESTORE LOG is terminating abnormally.

Msg 3624, Level 20, State 1, Line LineNumber>

A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

Note RESTORE HEADERONLY and RESTORE FILELISTONLY are unaffected by the issue and will work in all cases.

RESTORE VERIFYONLY may return successfully for a FULL backup that is invalid as per the above scenario: do not rely on RESTORE VERIFYONLY to establish that the backup can be restored without hitting the above issue. RESTORE VERIFYONLY against a log backup will usually fail together with the same error as an actual RESTORE LOG described above.

Therefore, it’s important to make sure that in a context where TDE and Backup Compression may be enabled, any SQL Server 2019 instances consuming backups from other SQL Server 2019 instances receive CU16 (or later) before the instances that generate the backup material. Log shipping architectures would be a prime example of such a situation: upgrade secondary instances first.

Once a transaction log backup has been created with compression, it is usually not possible to recreate it without compression. Therefore, upgrading the Log Shipping primary server to SQL Server 2019 CU16 or later in such a context would break the restoring jobs until the secondary server is also upgraded.

An uncompressed backup of a TDE-enabled database, a compressed backup of a database that’s not enabled for TDE, or an uncompressed backup of a database that’s not enabled for TDE will not use the new backup format introduced in CU16, and can be restored on a SQL Server 2019 instance of any versions.

It is therefore required to disable backup compression if you plan to restore a TDE-enabled database material (either full backup or transaction log backup) to any SQL Server instances of earlier versions before SQL Server 2019 CU16.

Each new cumulative update for SQL Server contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest build for your version of SQL Server:

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

References

Learn about the terminology that Microsoft uses to describe software updates.

Источник

Problem

Administrator launches Microsoft SQL 2005 Management Studio, and attempts to restore a Controller database backup (.BAK) file. However, an error message appears.

Symptom

Microsoft SQL Server Management Studio
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
Additional information:
The media family on device
‘C:foldernamebackup_name.bak’
is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)
[OK]

Cause

Backup file (.BAK) was created inside SQL 2008. It is not possible to restore this backup file in SQL 2005.

Resolving The Problem

Restore the .BAK file on a SQL 2008 server.

[{«Product»:{«code»:»SS9S6B»,»label»:»IBM Cognos Controller»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:»Controller»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»8.5″,»Edition»:»Not Applicable»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

 Restore HEADERONLY abnormall tarminationRecently I upgraded my SQL Server 2005 Express database with the SQL Server 2008 Express and then I noticed while restoring the database it started giving up restoration errors:

Error Details

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

ADDITIONAL INFORMATION:

The media family on device ‘C:NorthwindDB.bak’ is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click on: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476

I m sure you all might also come across such error while upgrading your SQL database. To solve these database problems there are few things that you should remember is that these error can occur due to many reasons but you must ensure the following before starting any solution. This will definitely save your lot of time.

1.    You need to ensure that the Backup copy of the Database is good :

  •    Take a backup copy of your database and restore them on machine where you tried to make backup.

  •    Then create a dummy of the database and then try to restore the database.

  •   If you tried to restore the database successfully on the machine that created the backup than the backup copy is good.

You can also try alternate methods to try the backup of the database with the following command

BACKUP DATABASE NorthwindDB

TO DISK=’C:HostingSpacesMyBackupCopy_NorthwindDB.bak’ with FORMAT

If this will able to take the backup successfully then the Backup copy is good.

2.   Ensure that the backup copy doesn’t get corrupted while downloading:

Such as in my case I created a backup copy of Hosting Server, and stored it in the .Zip format and then tried to download using the FileZila with default settings of filezila transfer type, i.e. auto.

Till this point everything was going cool but still I was not able to restore back my DB files.

3.    Then most importantly open the SQL Query window and then check the version of your SQL server.

Then run the following command and then you see the output:

 Select @@Version

It will give you the following output as it gave me:

Microsoft SQL Server 2005 – 9.00.4053.00 (Intel X86) May 26 2009 14:24:20 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6002: Service Pack 2)

After running this command I noticed that even though I was using SQL server 2008 express version it showed that I was using SQL Server 2005

Cause of this Error

This happen because even you are using the SQL Server 2008 the database is connected to SQL Server 2005 instances on the machine that I was trying to restore.

Remember: Restoration from the database from the lower version to higher version does not give any error. i.e. transfer from SQL Server 2005 to 2008 would not give any error. But restoring from the higher version to lower version always results to error.  As in this case the SQL server 2005 instance it results to above error.

So you need to validate the instance exhibits right version by “SELECT @@version”.

Solution

Then you need to fix the connection with the use of SQL 2008 instances.

For this try to run the SQL Server 2008 Express install program again during Name Instance configuration, and specify the Name Instance with the different name.  Example: MachineNameinstancename

Then create the database, create tables for database and then try to run restore again. This will work.

You can even resolve this with the help of SQL Repair Tool. This powerful recovery tool effectively retrieves your new data and scans the damaged database file and repairs it to recover inaccessible objects in MDF and NDF database files. It repair and restores every items from the corrupt database including tables, keys, views, deleted records, stored procedures, triggers, indexes and so on.

Steps to restore server when Restore HEADERONLY is terminating abnormally

Step 1: Stop the running MS SQL server. Perform the repair task on the copy of the corrupt database, click on the ‘OK’ button to continue.

1

Step 2: Click on the ‘Select database’ button and select the path of corrupt MDF file. You can also search your corrupt database file by using ‘Look in’ and ‘File Type’ button. click on the ‘Scan file‘ button to start the repairing process.

2

Step 3: The recoverable objects of database are listed in a tree view on the left side of the window. You can see the preview by clicking on the object.

3

Step 4: You can also search for a particular object by using ‘Find item’ option. Write the object name or a part of the object name in the given text box, check on ‘Match case‘ or ‘Match whole word‘ and then click find next button.

4

Step 5: Click on the ‘Start Repair’ icon. A dialog box will appear fill the SQL server instance name. To save the repaired file in the desired location click on the brows button and give the path, else the repaired file will be saved in the ‘Default SQL Location’. Click on the ‘OK’ button.

5

Jacob Martin is a technology enthusiast having experience of more than 4 years with great interest in database administration. He is expertise in related subjects like SQL database, Access, Oracle & others. Jacob has Master of Science (M.S) degree from the University of Dallas. He loves to write and provide solutions to people on database repair. Apart from this, he also loves to visit different countries in free time.

Понравилась статья? Поделить с друзьями:
  • Microsoft sql server error 262 как исправить
  • Microsoft office word сбой активации продукта как исправить
  • Microsoft office cannot open this file because some parts are missing or invalid как исправить
  • Microsoft office 2016 сбой активации продукта как исправить
  • Microsoft office 2013 сбой активации продукта как исправить