Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSgetmaxsnapshottimestamp

  No additional text.


Syntax
create procedure sys.sp_MSgetmaxsnapshottimestamp
(
	@agent_id 	int = NULL,
	@timestamp	timestamp output
)
as
	set nocount on
	
	declare @retcode 			tinyint

    -- this proc is called over the admin link
    if (is_srvrolemember('sysadmin') <> 1)
    begin
		raiserror (14126, 11, -1)
        return (1)
    end

    -- Has to be executed from distribution database
    if sys.fn_MSrepl_isdistdb (db_name()) != 1
    begin
    	raiserror (21482, 16, -1, 'sp_MSgetmaxsnapshottimestamp', 'distribution')
    	return 1
    end

    if @agent_id is NULL
    begin
        select @timestamp = max(timestamp) from MSsnapshot_history
    end
    else
    begin
        select @timestamp = max(timestamp) from MSsnapshot_history where agent_id = @agent_id
    end

    if @timestamp is NULL
	    select @timestamp = 0x00000


 
Last revision 2008RTM
See also

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