52 DB2 10 for Linux on System z Using z/VM v6.2, SSI Clusters and LGR
Last committed transaction = 2012-06-14-14.42.48.000000 UTC
DB20000I The ROLLFORWARD command completed successfully.
As expected, all records were restored (Example 5-25).
Example 5-25 All records have been restored sucessfuly even with the wrong timestamp
db2inst1@itsolnx1:~> db2 "select received,source from in_tray2"
RECEIVED SOURCE
-------------------------- --------
2012-06-14-10.41.37.626076 right1
2012-06-14-10.41.37.646395 right2
2012-06-14-10.42.48.478041 right11
2012-06-14-10.42.48.500735 right12
2012-06-14-10.27.58.757020 wrong1
2012-06-14-10.27.58.784167 wrong2
2012-06-14-10.30.37.366638 wrong11
2012-06-14-10.30.37.394163 wrong12
8 record(s) selected.
Results
As a result of the sequence of events in this case (Example 5-21 and Example 5-25), DB2
restore and rollforward commands are not affected by a configuration using the wrong time.
However, the data integrity is affected. Be aware that if your data uses a current timestamp, it
picks up the time from the guest and applications may face issues. Avoiding this issue is
analyzed in the next section.
5.2 Network Time Protocol (NTP)
A standard way of keeping dates synchronized is by using NTP. It is widely used to
synchronize computer clocks via the Internet. It will always keep the time synchronized in
your environment, even if it has been relocated to hardware that has the wrong time and the
server has been rebooted.
5.2.1 Configuring NTP
The NTP configuration file is located at /etc/ntp.conf. If you do not have this file, the NTP
package is probably not installed, so you can use the package management tool of your Linux
distribution to install it.
A basic configuration file follows in Example 5-26.
Example 5-26 ntp.conf basic configuration
# --- GENERAL CONFIGURATION ---
server aaa.bbb.ccc.ddd
# Drift file.
driftfile /var/lib/ntp/drift/ntp.drift