create procedure sys.sp_MSmergeupdatelastsyncinfo (
@subid uniqueidentifier,
@last_sync_status int,
@last_sync_summary sysname
)
as
set nocount on
declare @retcode int
-- Security check
exec @retcode= sys.sp_MSrepl_PAL_rolecheck @repid = @subid
if @retcode<>0 or @@error<>0 return 1
update dbo.sysmergesubscriptions
set last_sync_status = @last_sync_status,
last_sync_summary = @last_sync_summary,
last_sync_date = getdate()
where subid = @subid
if @@rowcount <> 1 or @@ERROR<>0
begin
raiserror('Could not update last sync info', 16, -1)
return (1)
end
return (0)