Deletes information about the specified database from the backup history tables.
sp_delete_database_backuphistory [ @db_nm = ] 'database_name'
[@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)
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.
Only members of the sysadmin fixed server role can execute sp_change_secondary_role.