1

I have database mirroring set up on my SQL Server instance.

If I run SELECT * FROM sys.dm_db_mirroring_connections I get information about the mirroring connections, however, all the time columns in that table (connect_time, login_time, last_activity_time) are all an hour behind what they should be.

For example, last_activity_time is currently showing 2019-06-06 15:07:30.444 but the when I do SELECT GETDATE() I get 2019-06-06 16:07:48.324 (obviously a few seconds elsapsed between the two) which is the correct time now.

Where does this DMV get it's times from and how can I ensure they use the correct time?

  • 2
    What time zone is your server in? – Max Vernon Jun 6 at 17:19
  • 1
    The docs don't say so explicitly but I suspect (for reasons involving what happens when a mirrored server adjusts forward or backward for DST) that those times are UTC. – Aaron Bertrand Jun 6 at 19:21
  • @MaxVernon the server timezone is (UTC +00:00) Dublin, Edinburgh, Lisbon, London – SEarle1986 Jun 7 at 9:06
1

Since it is presently summer time in the Northern hemisphere, it's likely that you're comparing winter time to summer time, which would explain the 1 hour difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.