SQL SERVER – FIX: Msg 3231 – The Media Loaded on “Backup” is Formatted to Support 1 Media Families, but 2 Media Families are Expected According to the Backup Device Specification

While preparing for a demo for my upcoming session, I encountered an interesting error. I thought I have written a blog about it, but I was wrong. My earlier blog was about a different error which looks very similar. Here is my earlier blog for error 3132. SQL SERVER – FIX: Msg 3132, Level 16 – The Media Set has 2 Media Families, but Only 1 is Provided. All Members Must be Provided. In this blog post, we will learn how to fix the error The Media Loaded on “Backup” is Formatted to Support 1 Media Families, but 2 Media Families are Expected According to the Backup Device Specification.

In this blog, we would learn about error 3231. Here is the complete message of the error.

Msg 3231, Level 16, State 1, Line 5
The media loaded on “C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\SQLAuthority.bak” is formatted to support 1 media families, but 2 media families are expected according to the backup device specification.
Msg 3013, Level 16, State 1, Line 5
BACKUP DATABASE is terminating abnormally.

Here are the steps to reproduce the error.

CREATE DATABASE SQLAuthority
GO
BACKUP DATABASE SQLAuthority TO DISK = 'SQLAuthority.bak'
GO
BACKUP DATABASE SQLAuthority 
TO DISK = 'SQLAuthority.bak',
   DISK = 'SQLAuthority_1.bak' 
WITH DIFFERENTIAL

WORKAROUND/SOLUTION

As per error message, there is an existing backup available in SQLAuthority.bak, but in next backup, we have given two files to take split backup. One of the files is an earlier backup file which has only one media family.

The solution would be to use “FORMAT” and “INIT” to erase existing backup data in the existing backup. You might want to be careful as we are formatting existing media which has a backup. Here is the script with modification.

CREATE DATABASE SQLAuthority
GO
BACKUP DATABASE SQLAuthority TO DISK = 'SQLAuthority.bak'
GO
BACKUP DATABASE SQLAuthority 
TO DISK = 'SQLAuthority.bak',
   DISK = 'SQLAuthority_1.bak' 
WITH DIFFERENTIAL, FORMAT, INIT

If you want to use UI then below gives you the options.

SQL SERVER - FIX: Msg 3231 - The Media Loaded on "Backup" is Formatted to Support 1 Media Families, but 2 Media Families are Expected According to the Backup Device Specification backup-err-3231-01-800x587

CLEANUP SCRIPT

Here is the script to cleanup database backup history and dropping the database.

EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'SQLAuthority'
GO
USE [master]
GO
ALTER DATABASE [SQLAuthority] SET  SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
USE [master]
GO
DROP DATABASE [SQLAuthority]
GO

Have you encountered such errors while taking a backup? Please share via comments.

Reference: Pinal Dave (https://blog.sqlauthority.com)

, , ,
Previous Post
What is the ROI of a SQL Server Monitoring Tool?
Next Post
SQL SERVER – FIX: Error 14001: The Application Has Failed to Start Because its Side-by-side Configuration is Not Correct

Related Posts

1 Comment. Leave new

  • Hello Pinal,

    I am getting this error when I try to do a restore of tran files through gui. I select more than one, but it doesn’t work. Any info regarding this one?

    Thanks.

    Reply

Leave a Reply

Menu