· Mar 21, 2019

Switching code databases on a running Ensemble production

We would like to know if there are any ramifications swapping out our code database while an Ensemble production is running. We are trying to minimize down time as much as possible and even though stopping and starting the production ideally would be pretty quick, is it possible that we could just restart the business hosts that had the code change?

So this is our setup:
Ensemble 2016.1

global cache.dat
code1 cache.dat
code2 cache.dat

Namespace that we switch to point to either code1 or code2 and is mapped to the globals.

Has anyone done this? We are hesitant to do this and we also know we could try this out in our non prod environments but any user feedback would be very helpful.

Discussion (2)1
Log in or sign up to continue

I once separated one Ensemble database (with code and data) into two databases (one db for code, one db for data) on a running system.

It was not difficult actually:

  1. Exported code from one database
  2. Created new database.
  3. Imported code into new database.
  4. In a namespace switched code database from old database to a newly created one.
  5. Deleted classes from old database.

But in my situation the code itself didn't change.


We are using this procedure in order to reduce the dowtime during software update. 

In short :

  • Create a temp namespace. 
  • import and compile code.
  • stopping application.
  • switch DB code on target namespace.
  • Execute a script for data update (if needed).
  • starting application.

It work fine for Caché.

Coming soon, we will do that for production with HealthShare Health connect.

It should be work fine also for a production, but  I don't done a test yet.

If you have a translate file, don't forget import your traductions because ^CacheMsg and ^CacheMsgNames are in CODE database.