Question
lw wei · Apr 28, 2020

Starting caché without automatic WIJ recovery in non-interactive way

After the database is restored, the WIJ file may be incompatible, so I deleted the WIJ file, and it needs to be set manually at startup

message in cconsole.log:

Enter Cache' with 
     csession CACHE2016 -B
and Do ^STURECOV for help recovering from the errors

after command " Do ^STURECOV":

%SYS>Do ^STURECOV


Journal recovery options
--------------------------------------------------------------
1) Display the list of errors from startup
2) Run the journal restore again
3) Bring up the system in multi-user mode (includes journal restore)
4) Dismount a database
5) Mount a database
6) Database Repair Utility
7) Check Database Integrity
8) Reset system so journal is not restored at startup
9) Display instructions on how to shut down the system
10) Display Journaling Menu (^JOURNAL)
--------------------------------------------------------------
H) Display Help
E) Exit this utility
--------------------------------------------------------------

This is an interactive way, is there a non-interactive way to do this?

0
0 499
Discussion (2)2
Log in or sign up to continue

Hi @lw wei,

I don't know if an API exists to do this, but if nothing exists you can use the job command with an input file.
example :

JOB ^STURECOV:("%SYS"::infile:outfile):3

"infile" is the path to your input file that contains all entries for each read.
"outfile" optional, but interesting to know what happened.


 

I've done a tremendous number of system restores over the years, and generally think that structuring your restore process to require manually removing the WIJ isn't a preferred design choice.  It's too easy to get into the habit of removing it, and then do it at a time when it causes problems.  

I assume you're asking about doing this following a restore of all databases, including CACHESYS,  since if only some databases were restored, removing the WIJ could lead to problems with the databases which were not restored.    I'm also assuming you're talking about designing a backup restore process, not an actual down system you're trying to get back up.  (If you're talking about a down system you need help with right now, please call the WRC.)

In a full system restore, you would restore the databases and WIJ from the older time.   Since you're already restoring all databases, have you considered treating it like a full system restore and including the older WIJ, which would let you avoid the need to remove the current WIJ?   This would also mean that the system would know which journal restore point to start from, and could automatically start journal restore for you at startup, assuming the journals are all available before you start up.