System date changing in IBM DB2 9.7 Express-C

I have successfully migrated the IBM DB2 8.2 LUW to IBM DB2 9.7 Express-C on Windows 2003 Server. But when i change the system date back one week from current date I can't access some new tables that was created before changing the date without schema prefix, If I use schema prefix then I can access the table (schema.Tablename).

Example:
Logging with "db2admin"
Try to access "test" table of db2admin like "select * from test" got error "Table not found".
Try to access "test" table of db2admin like "select * from db2admin.test" result successfully displayed.

Note:  db2 values current schema shows "db2admin"

sgoganAsked:
Who is Participating?
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi sgogan,

That's a fairly common phenomenon with database engines and other major applications, though the errors often look different.

Do the same thing on an Oracle system and an attempt to access data in the table will likely generate an error about data consistency.

The heart of the matter is that the RDBMS must validate some things, typically header information such as dates, counts, and known constants.  When it detects a date in the future, or something that isn't a date in a date field, the DBMS must behave as if the data is illegal.  After all, the data is indicating that the item WILL be created at a future date.  Clearly something that the DBMS must treat as an anomaly.

Why is it that you need to set the system date back a week?


Kent
0
 
sgoganAuthor Commented:
Dear Kent,

Thanks for reply.

But if I create table in IBM DB2 8.2 Express Edition and change the date one week back. We haven’t any problem to access the table like IBM DB2 9.7 Express Edition.

Iqtedar
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi Iqtedar,

I don't have access to the DB2 internals (and don't know anyone that does).  What you're seeing suggests that IBM has made at least one change to the way that DB2 validates some of the internally managed items.

If you really need to set the clock back to run some of these updates, can you create the table(s) after the clock has been rolled back?  That might get you past this.


Kent
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
sgoganAuthor Commented:
Hi Kent,

It’s my requirement to change the system date after creating new tables.  This scenario is successfully working on IBM DB2 8.2 Express Edition but not in IBM DB2 9.7 Express-C.

Is there any way to do that?

iqtedar

0
 
sgoganAuthor Commented:
Hi Kent,

It’s my requirement to change the system date after creating new tables.  This scenario is successfully working on IBM DB2 8.2 Express Edition and IBM DB2 9.7 EE but not in IBM DB2 9.7 Express-C.

Is there any way to do that?

iqtedar
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi iqtedar,

I know of no way around this.  It seems that IBM found this flaw in their integrity checks and somewhere between DB2 versions 8 and 9 took steps to correct it.

I'm having a little trouble visualizing a scenario where you must create a table, change the system date, then populate the table.  If you can explain your needs in a bit more detail perhaps I can help you find a work-around.


Kent
0
 
tliottaCommented:
It's hard to imagine a reason for doing it, but I've heard strange requirements from customers before. It's a little odd that I would probably expect IBM to fix it if my systems worked that way without errors. If nothing else, journals associated with the database would become terribly inconsistent with a change to the system date.

I suppose that an answer might simply be not to migrate from DB2 version 8 if that behavior is needed.

Tom
0
 
Kent OlsenData Warehouse Architect / DBACommented:
The poster hasn't explained why he needs to violate a rather standard procedure instead of using the database as intended.

Sometimes, the answer really is "no".
0
 
Robert MarleySinger / SongwriterCommented:
Starting the auto-close procedure on behalf of the Question Author, to implement the recommendations from the participating Expert(s).


-----
Everyt'ing is everyt'ing,

Mod_MarlEE
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.