Temporary read-only access to production server

JamesBowen

19+ years progress programming and still learning.
Hi all.

I've come across a situation where in the very near future I need to put the production system into Read-only mode for a temporary period 20-minutes an hour. The company requires that operators are allow to view members details but not to update.


  1. My ideas was to use the -RO client start-up parameter (but this does not work as expected on multi-user database).
  2. Take a backup up the database and let the operators do what ever they like, and the restore from backup.(not really ideal).
  3. Put the entire main application within one big transaction so when the operator quite/exit/leaves the application the any transactions is rolled back. (Seam all to risky).
Any other ideas you might have would be great. Thanks.
 
Hi Cecil

I'm not aware of an easy solution to provide read only access.

Ideally it would be handled by the application using the database.

I would not advise on creating one big transaction. The database will fall over somewhere. Either the bi file will use up the available space on disk, you'll blow the transaction table or users will be locking each other making the system almost unusable anyway.

If you make use of after imaging and LVM's you could use that to create a read only system. You could create a copy of the database initially and then every 30 minutes or just before you start the system, apply all AI files from the production server. Then start the database in a LVM snapshot. After the 20 minutes is passed, delete the snapshot. Then you'll just repeat the process every time you need the database. There will be a lot of scripting involved, but depending on your requirements (availability etc), it could be a solution.

If you use OpenEdge replication it does provide the functionality to create a readonly database. If you're not using it already I would not suggest going down that path just to get a readonly database.

The -RO option doesn't work for us because most systems would at least write a log when you log in and would need at least "some" write access.

Regards,
Pieter
 
We did RO project and now our system can operate in RO and not RO mode. But it is not that easy. We changed system kernel to adopt RO requirements.
1. DB replication implemented through ai files.
2. Target DB server started with -RO parameter (it is server Enchanced RO).
3. We make sure that no transaction executes in RO mode.
- Our system had ViewOnly flag for each module in UserMenu, so we set it globally in RO mode.
- We changed logging procedure at login time and execution time so they do not write any info into DB.
- We have to change our report system to cache all data entered in report form.
- batch processes do not start on target DB.

So now we have report users and real-time users.
Report users are connecting to target db.
Real-time users are connecting to source DB and change data.
Kernel is the same.
Replication through ai files changes target DB every minute. So report users can view any real time info and do not restricted a lot.

My recomendation - implement Viewonly mode for some modules users can access in RO mode and change login procedures to make sure no writes to DB.
Global transaction is global LOCK and deadlock.

Sorry, my english skill is not good.
 
The best way to get ReadOnly is print the data out on paper. :biggrin:

Create triggers for all tables and return error .
 
2. Target DB server started with -RO parameter (it is server Enchanced RO).

Enhanced Read-Only is only available if you use OE Replication Enterprise Edition. The target databases can be access in "Enhanced Read-Only" (if you have Enterprise replication and not the Standard replication) but it only apply to a Replication Target Database. There is no -RO parameter for the database server .

For a explanation of the -RO parameter check out solution P22224 on the progress KB. You can only connect in single user mode using -RO parameter.
 
Back
Top