cancel
Showing results for 
Search instead for 
Did you mean: 

recover log data automatically

Former Member
0 Kudos

Hello,

I'd like to create standby DB server for my SAP installation. I have a backup procedure, which creates logs files on remote host (files autolog.bkp.xxx).

Now, I have a problem how to recover this data into standby database server automatically. When using dbmcli tool, there's a recover_start command, but it needs a "version number" parameter. If I'm not wrong(???) this is the xxx in autologs filenames. And I have two questions about it:

1) Is there any command I could run on standby, that would tell me what number I should recover next?

2) What will happend if I try to recover wrong file (file with lower number)? IMO database should ignore already imported data and recover only missing one. Am I right?

My database is MaxDB 7.5.

regards, Konrad

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Konrad,

If you want to restore log backups into a standby database you must not use command autorecover, as this command tries to restart the database at the end of the restore. If this happens the standby is no longer a standby.

To answer your original questions:

1) The commands you are looking for are db_restartinfo and medium_labeloffline. The first tells you the log page number, that the next log backup must contain. The second tells you the range of log pages contained in a certain backup.

2) The database returns an error. The data in the standby is not changed.

Best regards,

Tilo Heinrich

Former Member
0 Kudos

Hello,

> 1) The commands you are looking for are

> db_restartinfo and medium_labeloffline. The first

> tells you the log page number, that the next log

> backup must contain.

I've got two parameters: "Used LOG Page" and "First LOG Page". For me, none of these values specify next page I should recover. Could you precise which paramteer describes next required page?

> The second tells you the range

> of log pages contained in a certain backup.

Is there any way to get such information from certain file, not backup medium?

I've got "wrong file or device name" when I try to run this command against autolog medium. With full backup and incremental backup medium everything is fine.

Regards,

Konrad

Former Member
0 Kudos

Hello,

> Is there any way to get such information from certain

> file, not backup medium?

> I've got "wrong file or device name" when I try to

> run this command against autolog medium. With full

> backup and incremental backup medium everything is

> fine.

Ok, I can fetch all information from autolog now, but medium has to be defined in standby database. However, fetching data directly from file would be nice

Regards,

Konrad

Former Member
0 Kudos

Hello Konrad,

"Used LOG Page" is the log page number that is represented by the current state of the data volumes. "First LOG Page" is the first log page on the log volumes. As you recover into a standby this value should 2147483647 which represents an undefined log page number. So you are looking for "Used LOG Page".

If you are using MaxDB 7.6.00.19 or newer and if your log backups are files, you can use command medium_labeloffline without a medium definition (e.g.: medium_labeloffline c:\logbackup.001 blocksize 8).

Best regards,

Tilo Heinrich

Former Member
0 Kudos

Hello,

if you wants to recover the database automatically the dbmcli command autorecover would be the best choice. For its using you need a complete backup history.

In this case you don't need to find out the right numbers of log backups. You will find more information about the options of the autorecover command in the database documentation

Try this link:

http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.sap?_SCLASS=XDP_STRUCT&_SLOIO=ACA5F596EFBA439DB...

Or check the complete documentation as described in the SAP note 767598.

To second question: you will get surely an error message. Which one depends from the concrete recovery state, the last recovered backup and the wrong backup.

Kind regards,

Oksana Alekseious

Former Member
0 Kudos

Hello,

> if you wants to recover the database automatically

> the dbmcli command autorecover would be the best

> choice. For its using you need a complete backup

> history.

I have complete backup history from first server, but I have no idea how could I use it

AFAIK backup history is saved in dbm.knl. I tried to copy this file and switch the "original" one on standby server, but it is not the way, I think.

> Try this link:

> http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.s

[...]

> S=BCO_COMMON

server not found

I tried to find something in MaxDB documentation, but I did not. Could you please write what I should look for?

Thanks once again for help!

regards,

Konrad

Former Member
0 Kudos

Hello,

the location of the documentation is described in the note 767598. For the version 7.5 you can use following path http://help.sap.com/nw2004s/ -> SAP NetWeaver 2004 -> English -> SAP NetWeaver -> Application Platform -> MySQL MaxDB

As you need information about standvy database I think this section is of special use:

Basic Information -> Backround Knowledge -> High Availability -> Standby Databases

The autorecover command is described in the documentation for the 7.6 version but it is already implemented in the 7.5 version.

http://help.sap.com/nw2004s/ -> English -> SAP NetWeaver Library -> SAP NetWeaver by Key Capability -> Databases -> MaxDB -> Tools -> Database Manager CLI -> Overview of All DBM Command

Regards,

Oksana Alekseious