Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSrefresh_anonymous

  No additional text.


Syntax
CREATE PROCEDURE sys.sp_MSrefresh_anonymous
(
    @publication			sysname,
    @publisher				sysname,
    @publisher_db			sysname
)
AS
begin
    declare @retcode 		int
    declare @publisher_id	int
    declare @success		int
    declare @agent_id		int

    
    -- security check
    -- only db_owner can execute this
    
    if (is_member ('db_owner') != 1)
    begin
        raiserror(14260, 16, -1)
        return (1)
    end

    SELECT @publisher_id = NULL
    SELECT @publisher_id = srvid FROM master.dbo.sysservers WHERE UPPER(@publisher) = UPPER(srvname)
    IF @publisher_id IS NULL
    BEGIN
        RAISERROR(21169, 16, -1, @publisher, @@SERVERNAME, @publisher)
        return (1)
    END
    select @success = 2 --agent history status

    select @agent_id = id from dbo.MSmerge_agents where
    	anonymous_subid is not NULL and --touch anonymous only
    	publication like @publication and
    	publisher_id=@publisher_id and
    	publisher_db=@publisher_db

    update TOP(1) dbo.MSmerge_sessions set end_time=getdate() where agent_id=@agent_id and runstatus=@success
    if @@ERROR<>0
    	return (1)
end

 
Last revision 2008RTM
See also

  sp_instdist (Procedure)
sp_reinitmergesubscription (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