Skip to content

Sync-DbaAvailabilityGroup feature request #5189

@potatoqualitee

Description

@potatoqualitee

from email

Would it be possible to extend the command (Copy-DbaAgentJob ) to check the last modification date of an agent job on the primary and secondary replicas?

Something like:


If job not found on secondary replica à create it

If job found on secondary replica and last modification date is the same like on the primary à skip copy

If job found on secondary replica and last modification is older than on the primary à recreate job on secondary (delete / create)

The modification date could be found on [msdb].[dbo].[sysjobs]
 
SELECT [sJOB].[job_id] AS [JobID],

       [sJOB].[name] AS [JobName],

       [sJOB].[date_modified] AS [JobLastModifiedOn]

FROM [msdb].[dbo].[sysjobs] AS [sJOB];


That would be really cool and helpful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions