question

DeepakUppund-8412 avatar image
0 Votes"
DeepakUppund-8412 asked LeonLaude edited

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

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


msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLaude avatar image
1 Vote"
LeonLaude answered LeonLaude edited

Hi @DeepakUppund-8412,

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.