Discussion:
Rollforward to PIT - 10.5.7 bug???
(too old to reply)
Jeremy Rickard
2017-01-28 22:28:47 UTC
Permalink
Hi,

A SAP application suggests that a near-line storage database should be rolled forward to a point in time that includes microsecond precision.

DB2 syntax supports only second granularity, but I thought I'd test what happens if you specify microseconds. The answer is that it rounds, but more interestingly in the course of my test I get some seemingly incorrect results.

See below, using an example without the microseconds...

db2inst1: db2 connect to TEST

Database Connection Information

Database server = DB2/LINUXX8664 10.5.7
SQL authorization ID = DB2INST1
Local database alias = TEST

db2inst1: db2 "create table TIMES(TIMESTAMP timestamp not null default CURRENT_TIMESTAMP, TEXT varchar(30) not null)"
DB20000I The SQL command completed successfully.
db2inst1: db2 "insert into TIMES(text) values ('test 1')"
DB20000I The SQL command completed successfully.
db2inst1: db2 "insert into TIMES(text) values ('test 2')"
DB20000I The SQL command completed successfully.
db2inst1: db2 "insert into TIMES(text) values ('test 3')"
DB20000I The SQL command completed successfully.

db2inst1: db2 "select * from TIMES"

TIMESTAMP TEXT
-------------------------- ------------------------------
2017-01-27-10.16.34.563226 test 1
2017-01-27-10.17.21.205592 test 2
2017-01-27-10.17.21.250648 test 3

3 record(s) selected.

db2inst1: db2 connect reset
DB20000I The SQL command completed successfully.

db2inst1: db2 archive log for db TEST
DB20000I The ARCHIVE LOG command completed successfully.

db2inst1: db2 "restore database TEST from /home/db2inst1/backup/data without prompting"
SQL2540W Restore is successful, however a warning "2539" was encountered
during Database Restore while processing in No Interrupt mode.

db2inst1:~$ db2 "rollforward database TEST to 2017-01-27-10.17.20 using local time and complete"

Rollforward Status

Input database alias = TEST
Number of members have returned status = 1

Member ID = 0
Rollforward status = not pending
Next log file to be read =
Log files processed = -
Last committed transaction = 2017-01-27-10.17.20.000000 Local

DB20000I The ROLLFORWARD command completed successfully.
db2inst1:~$ db2 "select * from TIMES"

TIMESTAMP TEXT
-------------------------- ------------------------------
2017-01-27-10.16.34.563226 test 1
2017-01-27-10.17.21.205592 test 2

2 record(s) selected.

I would expect my rolled forward database to contain only row "test 1".

Anyone have any thoughts on this?

Regards,

Jeremy Rickard
Ian
2017-02-02 00:32:55 UTC
Permalink
Post by Jeremy Rickard
Anyone have any thoughts on this?
This certainly looks like an issue to me. I'd suggest you open a PMR.
Jeremy Rickard
2017-02-05 20:44:13 UTC
Permalink
Thanks, if I can replicate in the customer's own AIX environment then maybe I can report via SAP, since unfortunately there is no direct IBM support channel available.
b***@gmail.com
2017-05-09 13:34:15 UTC
Permalink
Post by Jeremy Rickard
Thanks, if I can replicate in the customer's own AIX environment then maybe I can report via SAP, since unfortunately there is no direct IBM support channel available.
Dude, that's an ugly bug!

Loading...