473,748 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 & System Dates

People,

I have an ESE 8.2.2 database running on win2k server [sp4]. I need to
do some system testing that requires I reset the dates back a couple of
years then progressivily move it forward to current date.

The last time I tried this the database got very upset and the date
functions such as DAYOFWEEK_ISO, YEAR, WEEK, QUARTER etc got all
screwed up and failed. I subsequently had to completely drop the
database, recreate from scratch and reload all of the data. Not a
pleasant task.

Can anyone please suggest a way that I can reset the system date either
forwards or backwards without corrupting or upsetting the database.

Thanks.

Nov 12 '05 #1
2 3965
Moving dates forward isn't a problem. That's what happens when db2 is
shut down for a while then restarted.

Move date forward: Stop the instance, change the date, restart the
instance. (Stop the instance as insurance that the database is stopped.)

Moving backwards is a different issue. Recovery information is kept by
db2 that gets very unhappy when time regresses. Many, many years ago,
this was a problem in the Fall when the clocks were moved backwards at
the end of the Summer's Daylight Savings Time. I even remember
instrucions to shut down for an hour to prevent timestamp overlaps in
the logs.

The safest approach may be to export your data, change the clock (with
the instance down), define a new database, then import your data. All
clock movement from this point should be forward which should not be a
problem.

Do any of your tables have dates or timestamps in them? if so, what are
you going to do when you initially move the clock back a couple of years?

Phil Sherman
p175 wrote:
People,

I have an ESE 8.2.2 database running on win2k server [sp4]. I need to
do some system testing that requires I reset the dates back a couple of
years then progressivily move it forward to current date.

The last time I tried this the database got very upset and the date
functions such as DAYOFWEEK_ISO, YEAR, WEEK, QUARTER etc got all
screwed up and failed. I subsequently had to completely drop the
database, recreate from scratch and reload all of the data. Not a
pleasant task.

Can anyone please suggest a way that I can reset the system date either
forwards or backwards without corrupting or upsetting the database.

Thanks.

Nov 12 '05 #2
Phil Sherman wrote:
Moving dates forward isn't a problem. That's what happens when db2 is
shut down for a while then restarted.

Move date forward: Stop the instance, change the date, restart the
instance. (Stop the instance as insurance that the database is stopped.)

Moving backwards is a different issue. Recovery information is kept by
db2 that gets very unhappy when time regresses. Many, many years ago,
this was a problem in the Fall when the clocks were moved backwards at
the end of the Summer's Daylight Savings Time. I even remember
instrucions to shut down for an hour to prevent timestamp overlaps in
the logs.

The safest approach may be to export your data, change the clock (with
the instance down), define a new database, then import your data. All
clock movement from this point should be forward which should not be a
problem.

Do any of your tables have dates or timestamps in them? if so, what are
you going to do when you initially move the clock back a couple of years?

Phil Sherman
p175 wrote:
People,

I have an ESE 8.2.2 database running on win2k server [sp4]. I need to
do some system testing that requires I reset the dates back a couple of
years then progressivily move it forward to current date.

The last time I tried this the database got very upset and the date
functions such as DAYOFWEEK_ISO, YEAR, WEEK, QUARTER etc got all
screwed up and failed. I subsequently had to completely drop the
database, recreate from scratch and reload all of the data. Not a
pleasant task.

Can anyone please suggest a way that I can reset the system date either
forwards or backwards without corrupting or upsetting the database.

Thanks.

Can't comment on the DB2 internals, but routine resolution goes by
timestamp. If you create any procedure or function and then roll back
time you will not see the routine until "it's time" :-).

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1472
by: Massimo Fiorentino | last post by:
Hello there! I am a bit of a newbee into the mySQL world and I have a question regarding switching from one DB to another. I have for a couple of years used a very simple CMS-system created by myself but now I want to move to textpattern (http://www.textpattern.com/). Using a mySQL tool called NaviCat, I can easily create queries regarding porting ID, text data etc. from my old DB into the textpattern DB (using INNER JOINS it seems). But...
0
1876
by: Angelos Karantzalis | last post by:
Hi y'all, here's a tricky one: I've written a wrapper around a Com Interop-generated assembly in C#. It's called SDEHandler & implements a previously defined interface, so that I can use it as a provider, and load instances of it dynamically. In other words, I use it as a "plugin implementation" of a well-known API (a Provider?). Inside it I create a DataSet, which gets filled with at least a column containing values of type SDEPoint,...
0
1122
by: Maxim Kazitov | last post by:
Hi, Does anybody know how to generate (sql2comega.exe) wrapper DLL for System tables (for example for sysobjects) ? -- Thanks, Maxim
1
3898
by: Ashkan Daie | last post by:
Hi All, When trying to install a performance counter via InstallUtil I get the following exception: Creating performance counter category Enterprise Library Caching. An exception occurred during the Install phase. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was
4
8190
by: nhmark64 | last post by:
Hi, Does System.Collections.Generic.Queue not have a Synchronized method because it is already in effect synchronized, or is the Synchronized functionality missing from System.Collections.Generic.Queue? Putting it another way can I safely replace a System.Collections.Queue.Synchronized(myUnSynchronizedQueue) with a System.Collections.Generic.Queue while porting a working 2003 project? Thanks,
0
1315
by: WhiteWizard | last post by:
Here’s the situation: I am writing a C# Windows application using VS 2003. I have built a user control, and it has a Tab Control on it with (currently) 2 tab pages, and the whole thing sits on a panel (for resizing with a splitter etc). Each of the tab pages is marked AutoScroll = true. When I load the application I load a tree-view control (scrollable = false), to the first tab page, and that page has system scroll bars that...
2
1102
by: Bill Nguyen | last post by:
I'm using .Net framework 1.4 and having problem sending mail with System.Web.mail. Got error System.Web.HttpException: Could not access CDO.Message object. What do I need to do to get thru this? Thanks Bill
1
1786
by: muzilli | last post by:
Howdy all, somebody used in the past the library System.Resources for internationalization purpose? I would like to develop an application multi-lingual (english and french) and I´m thinking to use this library. But the problem is that, I created the resources file (binary) normally but when I run the application, one exception occurs for me.
8
3370
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location on a network for files and then copies these files to another location (on the network) AND then updates a record in the database. The file copying is performed before the database update because the file system is not transactional. The code...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9326
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4877
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.