Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2012 Express backup database failure

I am trying to backup a database I have created in SQL Server 2012 Express. I right click the database -> tasks -> backup and assume normal defaults.

The error I get is then this:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Backup failed for Server 'JAMIE-PC\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: Cannot use the backup file 'C:\backup.bak' because it was originally formatted with sector size 4096 and is now on a device with sector size 512. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

This does not mean an awful lot to me but looks potentially like a FAT32/NTFS style issue !? despite that seemingly distinctly detached from SQL Server 2012! The version I am running is 11.0.2100

like image 737
RenegadeAndy Avatar asked Jun 18 '14 12:06

RenegadeAndy


People also ask

Is SQL Express 2012 still supported?

SQL Server 2012 is no longer a supported product, Microsoft announced on Tuesday. The product, on July 12, 2022, reached the end of its 10-year support model.

How do I check if a SQL Server backup failed?

Locate the event log for backup failure in the Event ViewerIn the Event Viewer, navigate to Windows Logs -> Application. On the right-hand side in the Actions menu, navigate to Find. Type in the name of the database for which the failure occurred, and click Find Next.

Does SQL Server 2012 Standard Edition support backup compression?

Backup compression is supported on SQL Server editions: Enterprise, Standard, and Developer.


1 Answers

Ah - turns out I had added a new backup file to the list but had not removed the existing one - and because the existing file was above the new file it was failing with the error before writing to the new backup file.

Removing the existing backup file from the list and adding a fresh one in the backup folder of the SQL server installation directory solved the problem! Thanks to Raphael for helping me spot it.

like image 94
RenegadeAndy Avatar answered Sep 18 '22 16:09

RenegadeAndy