A job is backing up an LDF with the following command:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <the id> -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpLog "\\server\sqlbak$" -DelBkUps 6HOURS -BkExt "TRN"'
I would like the job to truncate the LDF after backing it up.
I have looked at the xp_sqlmaint documentation and it seems that the flag
-RmUnusedSpace may do the trick, but I'm not sure as it seems to only remove unused space rather than truncating.
I read that using
dbcc shrinkfile('logfile' , destination size) can break the backup chain, as you cannot then backup to a specific point in time.
How can I go about truncating the LDF after the backup?