cancel
Showing results for 
Search instead for 
Did you mean: 

Data seemingly not present in DB, until several hours later?

vlad1
Participant
2,547

Hi, SQL Anywhere 16.0.0.2546, Windows 2012 R2

We have an automated data export for our client (just a bunch of SELECT queries) which output data every evening at 22:00. However, sometimes, without any visible pattern, we've noticed that there are few trades missing from the export, although the trades are very much present in DB on a later inspection. We even created another, identical event, the only difference being that it runs at 07:00 next morning, which always works perfectly and includes what the first export does not.

Last night clients sent us a database backup taken at 00:30 in the morning, saying that "trade 12345 did not get exported". This trade was not present in the backup, although it was most definitely entered by users the afternoon before. However, they sent us another backup taken 10:00 this morning, and that trade was very much there. We are not just talking about 1 row and 1 table, but about 20 different rows across 10-15 different tables.

Initially I thought that the wrong backup was taken, which had no activity of the day 2017-10-19 whatsoever, but in one table I found 40-50 rows that were most definitely populated on 2017-10-19 evening. So it is very much the backup of that night.

So, to summarise:

  1. At 2017-10-19 14:15-15:20, users enter trade 12345 and quite a few follow-up entries about it. They see them all the time, and report and operate on these. Our application calls COMMIT after every successful transaction.
  2. At 2017-10-19 22:00, export query does not export this trade, as if trade not present. The export event does get triggered 100%, output file is created, but some data is missing - that trade 12345.
  3. At 2017-10-20 00:30, backup A is taken automatically
  4. At 2017-10-20 00:70, secondary export query, identical to first, exports data perfectly
  5. At 2017-10-20 09:00 we receive backup A - trade 12345 and subsequent entries are not in the database
  6. At 2017-10-20 10:30 backup B is taken and sent to us - all trades are perfectly there

I have never seen any behaviour like this before. Tables are not temporary or compressed or encrypted. The database is the only one on site, it is not Mobilink-ed or Ultralite-d. Just to underline - there is no visible pattern, it only happened 5 or 6 or 7 times in 12 months or so, during which time 5000-6000 exports were done 100% successfully.

Any clues and/or interest warmly appreciated!

Accepted Solutions (0)

Answers (1)

Answers (1)

Could timezones be causing a problem? Eg, os timezone, database server timezone, script timezone etc.

vlad1
Participant
0 Kudos

I really don't see how it could. It's one of the first things we looked at, but the timing of the event is completely outside of any chance for that.