Skip to Content
0

SAP MAXDB AUTO LOG Recovery Failing

May 10 at 01:04 PM

64

avatar image
Former Member

We searched lot of threads to automate log recovery in the stand by system. Our clients told script was working fine and recover logs before 4-5 years. It stopped working after new server migration was done. I checked various blogs and fixed the scripting part. I took full back up from the running server and applied in the standby maxdb server with initialization option using Database studio tool. After that without completing I went back and recovered the logs. Logs also recovered and ended up with RC-8010 as it was expecting next log file but it doesn't exist. So I selected restart database. Till now it is fine. Now remaining log restores should be working fine with the automated script. When it first ran it created import file and tried to apply it. But it came back with error that log has status HISTLOST and can't be recovered due to it.

20029,Logrecovery is not allowed, because state of log area is 'HistoryLost' (log must be cleared) Log- and data area are not compatible because 'Restore Log with Log State 'HistoryLost' is not allowed'.

Blogs told to clear log in that situation. So I execute util_execute clear log. The next run of automatic log recovery started failing with below error later on.

** DBA Action starts: Timestamp: 20180510115013 Function: rlo Object: LOG *** SAVE/RESTORE request: RESTORE LOG FROM 'N:\LOGSHIP\DR\LCP\LCP_LOG' FILE BLOCKSIZE 8 MEDIANAME 'AUTOLOG' *** SAVE/RESTORE request accepted: OK *** SAVE/RESTORE result: ERR -24988,ERR_SQL: SQL error -903,Host file I/O error 113,Open medium on N:\LOGSHIP\DR\LCP\LCP_LOG for READ failed k38headmaster, Error code 3700 "hostfile_error" RestoreLog, Error code 3700 "hostfile_error" 1,Open file N:\LOGSHIP\DR\LCP\LCP_LOG failed, CreateFile(READ,EXISTING) returned 'The system cannot find the file specified. ' (2)

The script has the following to execute

db_admin

db_connect

recover_start AUTOLOG LOG

recover_replace AUTOLOG N:\LOGSHIP\DR\LCP\LCP_LOG 22691

recover_replace AUTOLOG N:\LOGSHIP\DR\LCP\LCP_LOG 22692

recover_replace AUTOLOG N:\LOGSHIP\DR\LCP\LCP_LOG 22693

recover_replace AUTOLOG N:\LOGSHIP\DR\LCP\LCP_LOG 22694

db_release

Can any one help on this?

We are using MAXDB 7.9

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Bartosz Jarkowski May 10 at 01:42 PM
0

Can you please check, that the path specified in the log exist?

N:\LOGSHIP\DR\LCP\LCP_LOG

Also, does the OS user that runs the database (not your user) has a permission to access the files in this location?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 10 at 11:50 PM
0

That's the backup template defined for type log in stand by server. That path exist till N:\LOGSHIP\DR\LCP\ and under that we have the log files copied from the live maxdb server as LCP_LOG.xxxxx. So please confirm if the backup template defined for the log is correct


dbmcli.exe on LCP>backup_template_show NAME AUTOLOG OK NAME AUTOLOG CONTENT LOG CREATIONDATE 20180509235749 MODIFICATIONDATE 20180509235749 TOOL NONE BLOCKSIZE 8 DATACARRIER TYPE FILE LOCATION N:\LOGSHIP\DR\LCP\LCP_LOG OVERWRITE NO COMPRESSED YES

Permission is there, as I recovered log immediately after complete data restore once from the database studio and it worked

Share
10 |10000 characters needed characters left characters exceeded