I am trying to create an integrity check to tell me when my two servers are more than 5 seconds apart in time.
I have two servers
HP1 is the server I am running this from HP2 is the remote server
This code works but I need to be able to produce a value that I can do a check against
select GETDATE()
exec ('select getdate()') at HP2
this is the code I am trying to produce
if( ABS(SUM(GETDATE() - exec ('select getdate()') at Jupiter)) > 5)
begin
print 'not in sync'
end