Share via

For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=17.100.40.0&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476

sinesh hari 0 Reputation points
2025-05-06T08:50:55.15+00:00

Microsoft.Data.SqlClient.SqlError: Cannot use the backup file 'C:\Program Files\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQL\Backup\Surveillance.bak' because it was originally formatted with sector size 512 and is now on a device with sector size 4096. (Microsoft.SqlServer.Smo)


For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=17.100.40.0&LinkId=20476


Program Location:

at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages, Boolean retry)

at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)

at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)

SQL Server Database Engine
0 comments No comments

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 134.3K Reputation points MVP Volunteer Moderator
    2025-05-06T21:00:10.14+00:00

    The error message makes it quite clear what is going on.

    To resolve the issue, you need to use the FORMAT and INIT options:

    BACKUP DATABASE db TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQL\Backup\Surveillance.bak' WITH INIT, FORMAT
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.