Add updated SqlAgent folder

This commit is contained in:
Neeraj Kumar
2025-11-02 14:50:48 -05:00
parent 2c94b89801
commit 8fca292a50
141 changed files with 6723 additions and 0 deletions

View File

@ -0,0 +1,13 @@
-- If you know both the job name and schedule name
DECLARE @JobName NVARCHAR(100) = 'DEVL_MONTHLY_DTSCHGDC';
DECLARE @ScheduleName NVARCHAR(200) = 'DEVL_MONTHLY_DTSCHGDC_MonthlySchedule';
DECLARE @JobId UNIQUEIDENTIFIER;
-- Get job ID
SELECT @JobId = job_id FROM msdb.dbo.sysjobs WHERE name = @JobName;
-- Detach from specific job
EXEC msdb.dbo.sp_detach_schedule @job_id = @JobId, @schedule_name = @ScheduleName;
-- Then delete
EXEC msdb.dbo.sp_delete_schedule @schedule_name = @ScheduleName;