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