I'm just trying to figure out whether I could use a system event of type "BackupEnd" to do some clean-up of older backups. However, that would need to distinguish between full vs. log-only backups. The event seems to be called for both kinds of backus.
I have not found an EVENT_PARAMETER or the like that would show a difference. Have I missed such a function or property?
(The idea to use an event instead of doing the clean-up as part of the backup itself is that backups can be taken in different forms (DBBACKUP, BACKUP statement, ...) and it seems helpful if the clean-up is centralized.)
You could possibly use the LAST_BACKUP records in the SYS.SYSHISTORY system view to help differentiate between full and incremental.
Another possibility would be to use Maintenance Plans and add your custom logic to the Event Handlers EVENT_PARAMETER generated by those. Or something equivalant in your own design using with your own Events.
As far as clean up actions you might want to be a little more specific about what you are looking for there.
Directory Access may also be of some benefit to determining the state of the target or offline directories, and for some clean up actions.