How To Change Server Time

BACKGROUND

For testing purposes it may be necessary to change the date on the server (and thereby changing the database time). This document describes how to change the date to a different one, and how to put it back again.

ASSUMPTIONS & PRE-REQUISITES

  • The following is assumed and expected:
    • The tasks are carried out by a qualified DBA;
    • Access to the root user is available;
    • Knowledge of how start and stop the various Oracle software components, e.g. ASM, dbconsole;
    • The servers normal clock is being maintained by synchronising with an NTP server;
    • The consequences on the data within the database of changing the date are understood.

CHANGE FROM CURRENT DATE TO A NON-CURRENT DATE

  1. Log on to the server as oracle.
  2. Shutdown dbconsole, if started.
  3. Shutdown RDBMS.
  4. Shutdown ASM if installed.
  5. Log on to the server as root.
  6. Stop the ntp daemon using the following command:
    • svcadm disable ntp
  7. Change the date using the following command:
    • date ddmmHHMI[SSCCYY]
    • e.g. 12 Sep 2005 13:40:28 would be 09121340282005
  8. Log on to the server as oracle.
  9. Start ASM if installed.
  10. Start RDBMS.
  11. Start dbconsole, if required.

CHANGE FROM A NON-CURRENT DATE TO CURRENT DATE

  1. Log on to the server as oracle.
  2. Shutdown dbconsole, if started.
  3. Shutdown RDBMS.
  4. Shutdown ASM if installed.
  5. Log on to the server as root.
  6. Start the ntp daemon using the following command:
    • svcadm enable ntp
  7. Change the date using the following command:
    • date ddmmHHMI[SSCCYY]
    • e.g. 12 Sep 2005 13:40:28 would be 09121340282005
  8. Log on to the server as oracle.
  9. Start ASM if installed.
  10. Start RDBMS.
  11. Start dbconsole, if required.
© copyright 2001-2014 ABCdba.com | all rights reserved