sp_delete_database_backuphistory
Deletes information about the specified database from the backup history tables.
Syntax
sp_delete_database_backuphistory [ @db_nm = ] 'database_name'
Arguments
[@db_nm =] database_name
Specifies the name of the database involved in backup and restore operations. database_name is sysname, with no default.
Return Code Values
0 (success) or 1 (failure)
Result Sets
None
Remarks
sp_delete_database_backuphistory deletes information about the specified database from the backup history tables.
For example, after the removal of a log shipping pair, you may want to remove outdated or irrelevant information about the backup and restore of the pair's member databases. To do this, run sp_delete_database_backuphistory on both the former primary and former secondary servers.
Permissions
Only members of the sysadmin fixed server role can execute sp_change_secondary_role.
See Also
How to remove a log shipping pair from the Log Shipping Monitor (Transact-SQL)