This content has been marked as final. Show 3 replies
its my understanding that 'recovering' an environment should only be performed when no other processes are accessing the database files
Obviously in your case when you start the 2nd Application and it tries to 'recover' it does not have exsclusive access to the databases.
When you try to Open the Env it knows recovery isnt required and therefore errors out.
I think the best thing you can do is to set envConfig.RunRecovery to false once the first Application has started up so subsequent starts will not try to open in 'recovery' mode.
Global Support Services
Register and RunRecovery should be used when running a multi-process application, that should not be the problem. What Register does is only run recovery when a process accessing the environment has crashed. Perhaps the issue is envConfig.LockSystemCfg.DeadlockResolution = DeadlockPolicy.MIN_WRITE;. The locking policy can only be set once, and returns an invalid argument error if set a second time.
Thank you for your responses. Your suggestion, regarding deadlock policy, is interesting but there does not seem to be an issue if the deadlock policy is set in multiple threads and run-recovery & register are not set, so I think that may not be the issue...