Delete Unused Agent SchedulesHave you ever taken a step back and looked at the enormous barrage of unused SQL Server Agent Job Schedules which have accumulated over the years on your aging SQL Server? Well, there's a solution and it not that hard!
--DELETE FROM
SELECT * FROM
dbo.sysschedules
WHERE
schedule_id NOT IN (SELECT sjs.schedule_id FROM dbo.sysjobschedules AS sjs)
Is this code snippet, product or advice warrantied against ill-effect and/or technical malaise? No. No it's not! Not expressed - Not implied - not at all.