Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSupdatelastsyncinfo

  No additional text.


Syntax
create procedure sys.sp_MSupdatelastsyncinfo
    @publisher      sysname,                    -- publishing server name
    @publisher_db   sysname,                    -- publishing database name. If NULL then same as current db
    @publication    sysname,                    -- publication name,
    @subscription_type int,
    @last_sync_status     int,
    @last_sync_summary     sysname
AS
    set nocount on
    declare @retcode int

    --  Security Check
    EXEC @retcode = sys.sp_MSreplcheck_subscribe
    IF @@ERROR <> 0 or @retcode <> 0
        RETURN(1)

    if object_id('dbo.MSsubscription_agents') is null
        return(1)

    -- For non independent agent publications
    if @publication is null or @publication = ''
        set @publication = 'ALL'

    if not exists (select * from MSsubscription_agents where
            UPPER(publisher) = UPPER(@publisher)
            and publisher_db =  @publisher_db
            and publication = @publication
            and subscription_type = @subscription_type)
    begin
        exec sys.sp_MSinit_subscription_agent
            @publisher,
            @publisher_db,
            @publication,
            @subscription_type
    end

    update MSsubscription_agents set
        last_sync_time = getdate(),
        last_sync_status = @last_sync_status,
        last_sync_summary = @last_sync_summary
        where UPPER(publisher) = UPPER(@publisher)
            and publisher_db =  @publisher_db
            and publication = @publication
            and subscription_type = @subscription_type

    update MSreplication_subscriptions set
        time = convert(smalldatetime, getdate())
    WHERE UPPER(publisher) = UPPER(@publisher) AND
        publisher_db  = @publisher_db AND
        ((@publication = N'ALL' and independent_agent = 0) or
        @publication = publication) and
        subscription_type = @subscription_type

 
Last revision 2008RTM
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