SQL Flow Field Guide

sys.sp_adddynamicsnapshot_job

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

Creates an agent job that generates a filtered data snapshot for a publication with parameterized row filters.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Creates an agent job that generates a filtered data snapshot for a publication with parameterized row filters.

Syntax at a glance

sys.sp_adddynamicsnapshot_job
    [ @publication = ] N'publication'
    [ , [ @suser_sname = ] N'suser_sname' ]
    [ , [ @host_name = ] N'host_name' ]
    [ , [ @dynamic_snapshot_jobname = ] N'dynamic_snapshot_jobname' OUTPUT ]
    [ , [ @dynamic_snapshot_jobid = ] 'dynamic_snapshot_jobid' OUTPUT ]
    [ , [ @frequency_type = ] frequency_type ]
    [ , [ @frequency_interval = ] frequency_interval ]
    [ , [ @frequency_subday = ] frequency_subday ]
    [ , [ @frequency_subday_interval = ] frequency_subday_interval ]
    [ , [ @frequency_relative_interval = ] frequency_relative_interval ]
    [ , [ @frequency_recurrence_factor = ] frequency_recurrence_factor ]
    [ , [ @active_start_date = ] active_start_date ]
    [ , [ @active_end_date = ] active_end_date ]
    [ , [ @active_start_time_of_day = ] active_start_time_of_day ]
    [ , [ @active_end_time_of_day = ] active_end_time_of_day ]
[ ; ]

Work example

Creates an agent job that generates a filtered data snapshot for a publication with parameterized row filters.

Write a proposed call on paper. Name the target, required permission, expected change, and recovery step before any lab use.

Check your work What can this procedure change or start, and what permission does it need?

Open Microsoft Learn for full syntax, permissions, and details for your version.