cancel
Showing results for 
Search instead for 
Did you mean: 

MaxDB recovery with rsync

Former Member
0 Kudos

Here is brief about scenario : Server1 was working good but due to migration we did server to server copy (rsync) and built Server2. Server2 also working good, but Database backup not happening due to hardware block corruption so need to again change hardware. Here is option which we are trying

Built Server 3 from server 1 using rsync and decided to apply logs which are generated on server 2 from migration time to till date. Lets say last log post migration was 5166 and current log is 5180. Copied all log files to Server 3 and start log recovery with recover_start log 5167 command, it's completed with rc=0 and DB start automatically started in Online mode. We again started DB in admin mode and started apply further logs with recover_replace command but its failing rc='-7075'.


Checked links -->

https://archive.sap.com/discussions/thread/1397058
https://wiki.scn.sap.com/wiki/display/MaxDB/HowTo+-+SAP+MaxDB+Recovery+with+Database+Manager+CLI

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello James,

Thanks for update.

In our scenario, we shutdown SAP on source system (server1) and then started rsync and completed copy to target host (server2). Now as Server 2 has hardware issues so we are using Server 1 again for copying to new lpar Server3 and using server 2 log files.

We did not used restore initialization option and only used recovery log files. The first log 5167 got applied correctly and DB came online and now when applying others its giving error.

As I understand, now DB is online so further logs not possible to get applied but when I tried to apply 5167 again, it went well with RC=0 ?

How to do forward recovery post rsync ? as we have log files post completion of rsync

JamesZ
Advisor
Advisor
0 Kudos

Hello,

Did you mean you ever brought db online, then you were able to apply log successfully? Then let me know how you performed the copy or rsync. copy database via os command?

Because if you are using backup and restore to do that, then note 129352 clearly mentions:
=>
Note that once the database has started and the operating state ONLINE has been reached, no further log backups can be implemented. In other words, the recovery process ends when the database is started.
=>

Best regards,
James

Former Member
0 Kudos

Did you mean you ever brought db online, then you were able to apply log successfully? Then let me know how you performed the copy or rsync. copy database via os command? -- used rsync (server to server file copy)

Because if you are using backup and restore to do that, then note 129352 clearly mentions:
=> We did not used backup/restore so note does not applies to us.
Note that once the database has started and the operating state ONLINE has been reached, no further log backups can be implemented. In other words, the recovery process ends when the database is started.
=>

---------------

commands used :

dbmcli -d <SID> -n <IP> -u control,<pwd>

db_connect control,<pwd>

db_admin

service_connect

recover_check PQH_LOG 5167

recover_start PQH_LOG 5167 --> Completed with RC='0' and DB started in Online post completion of log recovery

Stopped DB and started in admin mode

recover_start PQH_LOG 5168 --> Failing with RC = '-7075'

even tried

recover_replace PQH_LOG 5168 --> Failing with RC='-7075'

Strange things is as now DB is online, we stopped and started in Admin mode and again tried applying 5167, it got applied successfully with RC='0' and again DB coming online at end of log recovery

JamesZ
Advisor
Advisor
0 Kudos

ok, if you are using file system copy, then you MIGHT have possibility to apply log after db online.

Then please check whether SAP note 1008304 helps.

JamesZ
Advisor
Advisor
0 Kudos

Hi,

The key point is if you restore backup and recover log from other database, once the target database is online, then you have no way to continue to apply log. This is the design, because you will use "restore initialization option" to do this restore, this option will reformat the log before FIRST online database, then there is no way to apply log.

SAP note 129352 also helps our scenario.


Best regards,
James