Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSgetmergelastupdatedtime

  No additional text.


Syntax
create procedure sys.sp_MSgetmergelastupdatedtime(
    @publisher sysname,
    @publisher_db sysname,
    @publication sysname,
    @subscription_type int
    )
as
begin
    set nocount on
    declare @pubid          uniqueidentifier
    declare @subid          uniqueidentifier
    declare @last_updated_time         nvarchar(40)
    declare @last_updated_datetime    datetime

    select @last_updated_datetime = null
    select @last_updated_time = null

    select @pubid = pubid from dbo.sysmergepublications
        where UPPER(publisher) collate database_default = UPPER(@publisher) collate database_default
            and publisher_db = @publisher_db and name = @publication
    if @pubid is NULL
    begin
        select 'last updated time' = @last_updated_time
        raiserror(21056, 16, -1)
        return 1
    end

    select @subid = subid from dbo.sysmergesubscriptions
        where UPPER(subscriber_server) collate database_default = UPPER(@@servername) collate database_default
        and db_name = db_name()
    if (@subid is NULL)
    begin
        select 'last updated time' = @last_updated_time
        raiserror(21056, 16, -1)
        return 1
    end

    select @last_updated_datetime = last_sync_date
      from dbo.sysmergesubscriptions where pubid = @pubid and subid = @subid and subscription_type = @subscription_type

    if @last_updated_datetime is not null
    begin
        select @last_updated_time = sys.fn_replformatdatetime(@last_updated_datetime)
    end

    select 'last updated time' = @last_updated_time

    if @last_updated_time is null
    begin
        raiserror(21384, 16, -1)
        return 1
    end
    return 0
end

 
Last revision 2008RTM
See also

  sp_MSgetlastupdatedtime (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