KA Extract Jobs in SSMS

Hi everyone - in our environment, scheduled extractions create Jobs in SSMS (I assume this is normal?).  Can anyone share what they do with these jobs?  Do you delete them from SSMS?

Thanks,

Frannie

  • Frannie,

    Yes, every once in a while we go in and just delete any of the jobs that have been created by an extract. 

    Michele

    PS - make sure the ones you are deleting are old and not currently executing!



    [edited by: Michele Keutsch at 9:22 AM (GMT -6) on 23 Mar 2017]
  • Former Member
    Former Member $organization

    Hi Frannie,

    I created a job that runs nightly to deleted these KA Extract jobs. From what I have gleaned -- these jobs are only created when the extraction fails. So, they are really not needed.

     

    Here is the t-sql:

    DECLARE @jobId BINARY(16);

    WHILE (1 = 1)
    BEGIN
        SET @jobId = NULL;
        SELECT TOP 1 @jobId = job_id
        FROM msdb.dbo.sysjobs
        WHERE (name LIKE N'KA Extract %');

        IF @@ROWCOUNT = 0
            BREAK;

        IF (@jobId IS NOT NULL)
            EXEC msdb.dbo.sp_delete_job @jobId;
    END;

     

    Debbie