cancel
Showing results for 
Search instead for 
Did you mean: 

MAXDB Log Shipping

Former Member
0 Kudos

Hi folks,

we had working log shipping scripts which automatically copy log backups to the standby server. We had to interrupt the log backups (overwrite mode set during EHP installation) and now after a full backup and restore the log restores do not work, please see the log below (the last two lines).

The log file =42105

FirstLogPage=5233911

LastLogPage=6087243

Database UsedLogPage=5752904

I would expect the restore to work since Database log page is within the range of the first and last log pages of the log backup file.

Is this not the case? How should it work when re-establishing the log shipping?

Mark.

Find first log file to apply

FindLowestLogNo()

File: log_backup.42105

File extension is numeric '42105'

LogNo=42105

FindLowestLogNo()

LogMin=42105 LogMax=42105

Execute Command: C:\sapdb\programs\pgm\dbmcli.exe -n localhost -d ERP -u SUPERDBA,Guer0l1t0 db_admin & C:\sapdb\programs\pgm\dbmcli.exe -n localhost -d ERP -u SUPERDBA,Guer0l1t0 medium_label LOG1 42105

[START]

OK

OK

Returncode 0

Date 20110308

Time 00111416

Server saperpdb.rh.renold.com

Database ERP

Kernel Version Kernel 7.7.06 Build 010-123-204-327

Pages Transferred 0

Pages Left 0

Volumes

Medianame

Location F:\log_shipping\log_backup.42105

Errortext

Label LOG_000042105

Is Consistent

First LOG Page 5233911

Last LOG Page 6087243

DB Stamp 1 Date 20110209

DB Stamp 1 Time 00190733

DB Stamp 2 Date 20110308

DB Stamp 2 Time 00111415

Page Count 853333

Devices Used 1

Database ID saperpdb.rh.renold.com:ERP_20110209_210432

Max Used Data Page

Converter Page Count

[END]

LogNo=42105 FirstLogPage=5233911 LastLogPage=6087243 (UsedLogPage=5752904)

WARNING: Log file not yet applied but NOT the first log file. Either sequence error or first log file is missing/yet to arrive

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Natalia,

we ran recovery with initialization. Is this incorrect?

former_member229109
Active Contributor
0 Kudos

Hello Birch Mark,

the recovery with intialization is the correct step to recreate the shadow database.

What has to be done before:

Source database:

SA)Activate the database logging.

SB) Create the complete databackup

SC) Set the aoutolog on or create the logbackup,

the first logbackup after completedatabackup created => check the backup history of the source database.

Shadow database:

ShA) Run the recovery with initialization or use db_activate dbm command, see more details in the MAXDB library,

I gave you references in the my reply before.

ShB) After the restore of the complete databackup created in step SB) don't restart the database in the online.

Keep the shadow database in admin or offline < when you run execute recover_cancel >.

Please post output of the db_restartinfo command.

ShC) You could restart the logbackups recovery created in SC), check the backup history of the source database which logbackup will be first to recover.

Did you follow those steps?

***

There is helpful documentation/hints at Wiki:

http://wiki.sdn.sap.com/wiki/display/MaxDB/SAPMaxDBHowTo

->"HowTo - Standby DB log shipping"

Regards, Natalia Khlopina

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Natalia,

thankyou for the detailed response.

The problem was that the database log mode was switched from overwrite mode AFTER the backup.

This meant that the restoed database did not exist within a valid log sequence.

I made another backup and restore and everything works.

Thanks again.

former_member229109
Active Contributor
0 Kudos

Hello,

1. "and now after a full backup and restore the log restores do not work,..."

Did you run the recovery with initialization or use db_activate command for the restore the complete databackup?

2.

Please review the document at

http://maxdb.sap.com/doc/7_7/default.htm

-> Tutorials

-> Database Manager CLI Tutorial

-> Setting Up and Updating Standby Instances

Regards, Natalia Khlopina