Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
--This runs from PubDB USE PubDB select top 1 lastupdate from TABLE1 (NOLOCK) order by lastupdate desc /* The next does the same in the replicated ReplDB via Linked Server.Wouldn't it be it be better here to use OPENQUERY, so I can use the (NOLOCK) hint ? */ select top 1 lastupdate from [REM_SERVER].[ReplDB].dbo.TABLE1 order by lastupdate desc --now the two results will look like that (just an example) --PubDB 2010-08-21 03:30:000 --ReplDB 2010-08-21 01:30:000 --Now the comparison should follow, and if PubDB minus --ReplDB >90 min. an email should notify DBAONCALL@ACME.com