June 5, 2007 at 11:37 pm
How to delete DTS package logs older than 1 month? Thanks.
June 6, 2007 at 8:55 am
I've used this to delete logs for a specific package:
DELETE
FROM sysdtspackagelog P
WHERE logdate <
(SELECT DATEADD(month,-1,MAX(logdate))
FROM sysdtspackagelog d
WHERE p.id = d.id)
and name = 'Refresh PR & SS'
You'll want to delete from sysdtssteplog also. Join it to sysdtspackagelog on lineagefull.
Greg
Greg
June 6, 2007 at 5:11 pm
Take a look at sp_dump_dtspackagelog in the msdb database.
Deleting from sysdtspackagelog will cascade to the step and task logs.
--------------------
Colt 45 - the original point and click interface
June 6, 2007 at 8:52 pm
Thanks guys.
June 7, 2007 at 9:12 am
Thanks, Phill. I didn't notice the referential constraints between sysdtssteplog, sysdtstasklog and sysdtspackagelog.
Greg
Greg
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply