OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: Error when recovering logs

From: Andy Chan (andy_chanivrs.com)
Date: Fri Feb 20 2004 - 05:40:40 CST


Thanks a lot! I've successfully get through the recover_replace within the same backup session.

Just want to drill a bit further on the 2nd approach (which suits better my need). I've tried but get -71 on the second recover_start.

dbmcli -d sdb2 -u dbm,dbm -uUTL -c recover_start archivelog LOG 014
OK
Returncode -8020

dbmcli -d sdb2 -u dbm,dbm db_restartinfo
OK
Used LOG Page 1721
First LOG Page 1721
Restartable 1
Id Restart Record db1.ithlgroup.com:SDB1_20040216_172652
Id LOG Info db1.ithlgroup.com:SDB1_20040216_172652
Consistent 1

From dbm.knl, we see the page range for the logs,
LOG_00014 1445 1720
LOG_00015 1721 1898 <-- so we should this, right?!
LOG_00016 1899 2252

dbmcli -d sdb2 -u dbm,dbm -uUTL -c recover_start archivelog LOG 015
ERR
-24988,ERR_SQL: sql error
-71,connection broken server state 6

It seems we cannot continue the recovery :<

One further question I raise before is that the LOG sequence is only 3 digits long. What would happen if it overflow to 999, would it recyle back to 001 ?

Thanks again for helping.

-----Original Message-----
From: Heinrich, Tilo [mailto:tilo.heinrichsap.com]
Sent: 2004?2?20? 1:02
To: maxdblists.mysql.com
Subject: RE: Error when recovering logs

Hello Andy,

please use recover_replace only directly after a recover_start or another recover-replace.

So the following will work:

dbmcli -d ... -u ...,... -uUTL
>recover_start archivelog LOG 014
>recover_replace archivelog /home/sdb/archive/log.ARC 015
>recover_replace archivelog /home/sdb/archive/log.ARC 016
...

If you stop the log recovery by ending your dbmcli session, the following could work:

dbmcli -d ... -u ...,... -uUTL -c recover_start archivelog LOG 014
dbmcli -d ... -u ...,... -uUTL -c recover_start archivelog LOG 015
...

But to make sure that this works under all circumstances you have to use db_restartinfo inbetween all those dbmcli calls, to make sure that you restore the right log backups. This is necessary, because at the end of each dbmcli call an implicit recover_cancel stops the database kernel's log recovery process. As log reading and log redoing are two different things in the database kernel, it can be sometimes necessary to recover a log backup for the second time, because its last 5 pages were not redone before the recover_cancel. I hope that makes sense.

The problem you actually encountered ("DBM-Api error ( -4...") is a bug in the recover_replace command. The DBM Server is crashing, if recover_replace is called without a previous recover_start. By the way that bug is a 5 year old classic, that was fixed only last week. So in the next version you will get something like "ERR -24990,ERR_NOBACKUPSESSION: no backup session available", if you use recover_replace again without a previous recove_start.

Best Regards,
Tilo Heinrich
SAP Labs Berlin

-----Original Message-----
From: Andy Chan [mailto:andy_chanivrs.com]
Sent: Thursday, February 19, 2004 12:32 PM
To: Jean-Michel OLTRA; maxdblists.mysql.com
Subject: RE: Error when recovering logs

Thanks for responding. In fact, I did put down the path but same error throw out.

dbmcli -d sdb2 -u dbm,dbm medium_get archivelog
OK
archivelog /home/sdb/archive/log.ARC FILE LOG 0 0 NO NO 200402191924
32 20040219192432

dbmcli -d sdb2 -u dbm,dbm -uUTL -c recover_replace archivelog /home/sdb/archive/log.ARC 015
DBM-Api error ( -4'Reading header from pipe:(0:NO ERROR(0))')

ls -l /home/sdb/archive/log.ARC.015
-rw-rw---- 1 sdb sdba 1703936 Feb 19 19:28 /home/sdb/archive/log.ARC.015

No error reported in knldiag.err

From knldiag, it only writes
2004-02-19 19:34:39 31915 11561 COMMUNIC Connecting T143 local 32110
2004-02-19 19:34:39 32060 11561 COMMUNIC Connected T143 local 32110
which tells me nothing :(

P.S>
I'm green to MaxDB and I'm sure the current difficulty I'm getting through is valuable to my learning.
I'm more than happy to share the step-by-step guide to anyone in need. :>

-----Original Message-----
From: Jean-Michel OLTRA [mailto:jm.oltraespinasse.net]
Sent: 2004?2?19? 19:05
To: maxdblists.mysql.com
Subject: Re: Error when recovering logs

Le jeudi 19 février 2004, Andy Chan a écrit...
        bonjour,

> Then I use 002 instead of 2 for restoration

> dbmcli -d sdb2 -u dbm,dbm db_admin
> dbmcli -d sdb2 -u dbm,dbm -uUTL -c recover_start archivelog 002
> OK
> Returncode -8020

> That's the returncode I've been expecting to get ...

> To continue on the recovery,
> dbmcli -d sdb2 -u dbm,dbm -uUTL -c recover_replace archivelog 003
> DBM-Api error ( -4'Reading header from pipe:(0:NO ERROR(0))')

I think recover_replace is waiting for a path

as the manual says:
recover_replace <medium> [ExternalBackupID <ext_backup_ID>] [<loc>
[<nnn>]]

so it could be:
recover_replace archivelog /path/to/logMediumFile 003

You're writing a nice step-by-step howto....

--
jm

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=andy_chanivrs.com

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=tilo.heinrichsap.com

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=andy_chanivrs.com

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb