Scenario: Changing the system clock

When adjusting or changing the system clock, there is no reason to stop the Db2® database manager. Db2 successfully handles daylight saving time changes twice a year all over the world without issue. Configurations which use NTP to synchronize clocks across systems are also fully supported.

About this task

There are some best practices that you must be aware of when changing the system time.


Restrictions

When changing the system clock in the vast majority of scenarios there is absolutely no impact.

When major time shifts occur, you must be aware of two situations.

  • If you execute point-in-time recovery you need to be aware of any significant time shifts.
  • Function definitions include the time and date they were created in the form of a timestamp. At function invocation, Db2 attempts to resolve the function definition. As part of the function resolution, the timestamp value logged in the function definition at create time is checked. If you move the system clock back to a time before the functions were created, Db2 does not resolve references to those functions.

Procedure

Best practices to avoid these two situations:

  1. If you are moving time forward, proceed to step 3.
  2. If you are moving time backward by X minutes:
    1. Choose a time to execute the change when no new functions were created in the past X minutes, and no update transactions occur in X minutes.
    2. If you are unable to find a time as outlined in step a, you can still move the system clock backwards by X minutes with Db2 online. However, you must accept the following implications:
      • You might not be able to use point-in-time recovery to recover to a point within those X minutes. That is, you might not be able to recover a subset of the update transactions that executed within those X minutes.
      • Functions created within X minutes before the change might not be resolved for X minutes after the change.
  3. Change the system clock.

Results

By following the best practices as outlined, you avoid any potential point-in-time recovery or function resolution issue when changing the system clock.