on 03-21-2011 4:20 PM
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
Hi Natalia,
we ran recovery with initialization. Is this incorrect?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.