Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSsnapshotagentjobcontrol

  No additional text.


Syntax
create procedure sys.sp_MSsnapshotagentjobcontrol
(
    @publisher      sysname,
    @publisher_db   sysname,
    @publication    sysname,
    @action         tinyint
)
as
begin
    set nocount on

    declare @publisher_id int
    declare @job_id uniqueidentifier
    declare @retcode int
    set @retcode = 0

    select @publisher_id = server_id
      from sys.servers
      where upper(name) = upper(@publisher) collate database_default

    -- Joining to sysjobs_view & sysjobsteps to make sure we are starting a
    -- snapshot job.
    set @job_id = null
    select @job_id = mssa.job_id
      from dbo.MSsnapshot_agents as mssa
inner join msdb.dbo.sysjobs_view as sjv
        on mssa.job_id = sjv.job_id
inner join msdb.dbo.sysjobsteps as sjs
        on sjv.job_id = sjs.job_id
     where mssa.publisher_id = @publisher_id
       and mssa.publisher_db = @publisher_db
       and mssa.publication = @publication
       and sjv.category_id = 15
       and sjs.subsystem = N'Snapshot'
       and mssa.dynamic_filter_login is NULL
       and mssa.dynamic_filter_hostname is NULL

    if @job_id is null
        raiserror(20678, 16, -1, @publication)

    exec @retcode = sys.sp_MSreplicationagentjobcontrol
        @job_id = @job_id,
        @action = @action
    return @retcode
end

 
Last revision 2008RTM
See also

  sp_MSstartsnapshot_agent (Procedure)
sp_MSstopsnapshot_agent (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash