I have had some problems and while I solved everything and up a running
again, I would like to explain what I did because I'm not entirely sure
that my analysis is correct.
I don't remember all the error codes I got, and it's been at least 2
weeks since this happened, but please bear with me wven though the
explanation can be a bit confusing.
First of all: We are using SapDB 7.3.0 (build 025-000-085-912) on a
RedHat 7.3 (or maybe 7.4) system.
I believe the easiest way to explain is by using a timeline of events,
since what I don't know if what event caused the problem:
1 full backup
2 log backup
3 full backup
4 log backup
5 log backup
... etc for a long time. we have never deleted any log backup files (we
have all of them laballed logbackup.000 -> logbackup.040 or so. We only
keep the last full backup)
6 full backup
7 log backup
At this point in time I made a mistake when managing the database and
had to roll the database back in time to a point (approximately 30
minutes before) when the data was correct. I did this by going into the
DBMGUI and going to "recovery" and "database" and select recover with a
time stamp 30 minutes back in time). It all worked great.
8 log backup
9 log backup
10 log backup
11 log backup
12 log backup (...etc)
At this point in time, we had approximately two weeks worth of log
backups but no full backups. The last full backup was from a day before
we did the time rollback (event number 6 in my list).
What happened now was that the database structure changed after
installing the latest version of the software. I issued a set of ALTER
TABLE and some other things in order to set everything up for the new
version. I then realised that I had made a catastrophic mistake and had
messed up the table structure. No problem, I went into DBMGUI, selected
"recovery" and "database" and recovered to a point in time a few minutes
before in order to get back to where I was. This worked great and the
database was up and running again.
I then went back and issued the ALTER TABLE statements and thanks to
Murphy, I messed up again! So I went into DBMGUI again to roll
everything back to where I was and at this point was so used to the
procedure I was certain everything would work.
But it didn't. The recover seemed to hang (I believe I was waiting at
least 10 minutes (which should be more than enough since the database is
less than 10 MB in size)) and after interruting and attempting to put
the database back in WARM mode I got en error. I can't remember the
error code but the documentation said that the data and log were
inconsistent.
------- Question number 1 -----------
Why did this happen? Was it because I tried to roll the database back in
time twice, to the same point in time?
-------------------------------------
At this point I wasn't too worried. I had full backups after all and
recovery should be a simple matter. I recreated the database for
recovery and selected the latest full backup (event number 6). It then
asked me for the log backups in succession and a couple of them were
recovered without problem.
The problems started when it reached the log backup from event number 10
(in other words: two log backups after the point in time when I did the
very first time stamped recover).
At this point I got a message saying that it couldn't read this log
backup. I believe the error message was saying "file can't be opened"
but I'm not entrely sure on this. The only alternative I had was to stop
the recovery and run from this point in time.
The thing that saved us was the fact that these almost 2 weeks of logs
were practically empty since this was around christmas and very few
changes had been made to the database, so we didn't lose any critical
information.
------- Question number 2 -----------
Why did it fail to recover the logs? My personal guess is that you
cannot recover a chain of log backups that was performed around a time
stamped recover. However, the database was able to recover one of the
log backups taken after this time stamped recover, which seems to
indicate that it should work.
-------------------------------------
As it stands, I'm making sure that I take full backups more often. And I
intend to upgrade to 7.4 since it's full backups are always consistent.
This will make me feel more safe.
Thanks in advance, and for actually reading through this post.
Elias M�rtenson
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
