2011-06-08 66 views

回答

0

我用一些simmiler來檢查最後的複製時間。但是,這是在數據庫級別而不是表級別。這是從發佈者的分發數據庫運行的。

SELECT  MAX(DISTINCT h.[time]) AS RunTime 
FROM   MSmerge_history h INNER JOIN 
     MSmerge_agents a ON a.id = h.agent_id 
WHERE  (a.publisher_db = 'PublishedDbName') 
AND (h.runstatus <> 1) 
AND Left(h.comments,2) = 'Up' 
OR (a.publisher_db = 'PublishedDbName') 
AND (h.runstatus <> 1) 
AND Left(h.comments,2) = 'No' 
OR (a.publisher_db = 'PublishedDbName') 
AND (h.runstatus <> 1) 
AND Left(h.comments,2) = 'Me' 
And Publication Like 'PublictionName%' 
GO 
相關問題