USE msdb 

BEGIN TRANSACTION 
SET XACT_ABORT ON;
SET NOCOUNT ON;

DECLARE 
    @jobid UNIQUEIDENTIFIER = NULL 
    ,@jobName varchar(100)
;

SELECT 
    @jobid   = [s].[job_id] 
   ,@jobName = [s].[name]
FROM [dbo].[sysjobs] [s]
WHERE [s].[name] like '[_]D0032_ - LkdSrv - APS Synchro After - ArizonaCASH'

IF @jobid IS NOT NULL 
BEGIN
    EXEC msdb.dbo.sp_update_job 
        @job_id = @jobid
       ,@enabled=0
    ;
    PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - job "'+@jobName+'" deactivated';
    
END 

COMMIT TRANSACTION 
