The BACKUP DATABASE Statement is equivalent to the DBBACKUP utilty, but I am wondering how can I enforce the BACKUP DATABASE Statement to delete the unneeded transaction log files (after considering the delete_old_logs option, and also considering the logs required by DBREMOTE/DBMLSYNC). In the documentation I can see the option TRANSACTION LOG RENAME as backup-option of the BACKUP DATABASE Statement, but I can't see any option for deleting the unneeded transaction log files! Any ideas? |
TRANSACTION LOG TRUNCATE... but be careful. Many an otherwise good day has been ruined by BACKUP statements which work differently from the (supposed) equivalent dbbackup commands.
Why do you have "unneeded transaction log files"?
What is your backup strategy w.r.t. transaction logs, do you always rename them? It may be easier to let the log grow until the next full backup if size is no problem... - and to backup to rotating directories...