Events
Mar 31, 11 p.m. - Apr 2, 11 p.m.
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2016 (13.x) and later versions
Deletes all snapshots and the backup file that comprise a snapshot backup set from the specified database. This system stored procedure is the only recommended method for managing snapshot backup sets. For more information, see File-Snapshot Backups for Database Files in Azure.
Transact-SQL syntax conventions
sys.sp_delete_backup
[ @backup_url = ] N'backup_metadata_file_url'
, [ [ @db_name = ] N'database_name' | NULL ]
The URL of the backup to be deleted, which deletes all snapshots comprising the specified backup set including the backup file itself.
The name of the database containing the snapshot to be deleted. When a database name is provided, the system verifies that the backup URL provided is a backup URL for the specified database and uses sp_delete_backup_file_snapshot to delete each snapshot. If no database name is provided, this database check isn't performed.
Requires ALTER ANY DATABASE permission or ALTER permission on the specified database.
Events
Mar 31, 11 p.m. - Apr 2, 11 p.m.
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today