How can we Query Database and check what are the servers placed in maintenance window in SCOM?

Deepak 86 Reputation points
2021-05-19T12:34:14.757+00:00

Hello,

There is a query which runs everyday and sends report with the server list, which are placed in maintenance mode with start and end time.

The problem we are facing here is, Time updated in the CSV file we are receiving and time which shows in the SCOM console is varying with 2 hours. however both database server and operation manager server are in same time zone.

Please let me know, what or where exactly i need to check to understand the actual problem?

My Guess: In the database table itself it is writing with different timezone?. if my guess is correct, then i am not sure how to query database and verify the same?

Thanks,
Deepak

System Center Operations Manager
System Center Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,603 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 86,026 Reputation points
    2021-05-19T12:40:44.897+00:00

    Hi @Deepak ,

    The time in the SCOM database is always in UTC (Universal Time), it doesn't matter in which time zone your servers are in.
    The console uses the local time (server time zone), as far as I know the database time cannot be changed as it is by design.

    If you want the time to be your local time, you would have to modify the database query and convert the UTC time to local time.
    https://stackoverflow.com/questions/8038744/convert-datetime-column-from-utc-to-local-time-in-select-statement

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Best regards,
    Leon

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.