Test Drive of Intact D/R
by
Shawn M. Gordon
President SMGA
What it can do?
While ensuring data integrity in your database may not be the most interesting or glamorous topic of discussion, it will save your bacon if you have planned ahead. Very few shops that I have had experience with take the time to code their applications such that they can cleanly recover from an incomplete logical transaction. A logical transactions could be thought of as a customer ordering a part from you. You would reduce inventory, create a purchase order, create a billing record, etc. Each of these physical transactions make up a logical transaction. If your program were to die for some reason, such as a disk crash or power outage, in the middle of the logical transaction, you would have incomplete data in your database.
Intact D/R (just Intact from now on) allows you to set up a safety net for rolling back logical transactions. It also has some interesting uses for testing an application and removing the data afterward.
How does it work?
Intact makes use of Image logging in conjunction with its own intercept to keep track of transactions, and allow rollback of those transactions. The intercept for Intact has to be run at logon time for each process. This can be setup as a logon UDC to make sure everyone is running through the trap. If you don’t do this, then you won’t be able to roll anything back.
You can configure the software so that Intact rolls back to the DBOPEN, say in the case of a long batch update job. Rollback to DBBEGIN, if the application calls DBBEGIN, and DBEND is never encountered before the termination of the program, then the activity from the DBBEGIN will be rolled back.
There doesn’t appear to be the same size limitation that exists in your standard DBBEGIN..DBEND construct for automatic rollback through the transaction manager. That limit, last I heard, was around a meg and a half of data.
Features
See Figure 1 for a list of valid commands. What’s interesting, and a little annoying about the help is that they go to pains to show you the short version of the command, but the short version of the command isn’t valid inside the help facility.
Basically you configure databases for Intact to stay aware of when you enable the traps. In conjunction with that, you can configure base specific messages that will display when that particular base has a process go into a rollback state. You can also display global messages that will display to the console whenever a database has a process activate the Intact rollback. After you go through these simple setup issues, you can then make use of the other features.
As I mentioned earlier, you can have Intact rollback to the DBOPEN for a process, which would be pretty much everything the program has done, or you can have it rollback around a logical transaction that is bracketted with DBBEGIN..DBEND. They have also implemented a DBUNDO intrinsic that you can call manually to roll out transactions. Imagine something like a maintainance screen where the user goes “Oh no, I didn’t mean to save that”. You could have a rollback key they could press and it would automatically undo the transaction.
Now the DBBEGIN..DBEND..DBUNDO stuff sounds pretty similar to the DBXBEGIN..DBXEND..DBXUNDO that was implemented a short time back. You have more external control over the rollback, and much more extensive reporting with Intact, with less work on your part (as far as I can tell). The manual goes on at length to describe the various scenarios that you can apply Intact, and this is helpful, because it brought up a number of scenarios for me that I hadn’t thought of yet.
Installation and Documentation
Installation is very easy and went smoothly. There software is strictly 3000 based, so we just restore, stream a job, and we are done. The documentation starts off as a discussion on the various uses of Intact and how Intact works, and the various types of rollback and reporting options. The manual then turns into a description of each of the INUTIL commands.
The biggest problems with the manual is that there is no “getting started” guide. Intact requires that you have Image logging enabled, and if you don’t already, that can be rather confusing to set up. There is also nothing that tells you a standard sequence of events for setting up your database in INUTIL.
I spoke with Lund about these problems, and they agreed that it would be a good idea to put in, so that little issue should be solved by the time you read this.
The Test Drive
Well the first step was to pick or create a database to put Intact on. I figured I would just use my DataWarp product to do the data transformations, because it’s a nice generic tool for mass updates of date fields. I wanted to try this on a program that didn’t have DBBEGIN..DBEND, and have it roll back to the DBOPEN.
The first challenge was in figuring out how to turn logging on for my sample database. A quick call to Lund solved that problem (and prompted them to agree to add instructions to the manual). So I tried changing some data and aborting the session in the middle of it. Strangely I had no results. I tried this a few times with no results.
A little later I happened to be browsing through the files that were restored and noticed the UDC file. This is where I discovered the LOGON.INTACTIX.LPS program that has to run BEFORE your process starts accessing the database, to enable the traps. I was never able to find this in the documentation.
Once I solved all the setup problems, things went very smoothly. It was pretty cool seeing this stuff just automatically rollback when the session got aborted. If you look at Figure 2, you will see the process where the session was executing, and I aborted it and Intact took over and rolled everything back before they let the session finish aborting. I don’t know how they are implementing their traps, but this was pretty nifty.
One thing that I wasn’t able to try, and you should try if you consider buying this product, is how it works with database shadowing tools such as Netbase and Shadow (also from Lund). I don’t know what, if any, issues might arise from having multiple traps going on with your database calls.
Conclusions
The documentation is the weakest part of this product. I had to stumble around for awhile before I found out that there was a logon UDC that initiated the traps for the product. I didn’t find it anywhere in the manual or the installation instructions. If you read through into the Shadow portion of the installation instructions you would probably be able to figure out how to get the image logging started.
With that said, Intact works, and it works well. If you choose to just make minimal use of it for certain critical batch processes, you could just put the trap at the beginning of your job and not have to change your programs at all. If you want to make more elaborate use of it, then you would probably want to add DBBEGIN/DBEND to your programs around the logical transactions (which you should do anyway).
There are some interesting side affects to the ability to reverse transactions, such as using it as a testing facility and not have to worry about the details of pulling the data back out again. Of course if you are doing a huge amount of data, then it probably isn’t the most constructive way to use it. I can easily recommend this product for people that are interested in really protecting their data.
Road Report
Intact D/R version E.01.02
Lund Performance Solutions
240 Second Street SW
Albany Oregon 97321
Phone 541-926-3800
FAX 541-926-7723
email: info@lund.com
http://www.lund.com
Intact D/R includes the 3000 based software required to save and rollback Image/SQL transactions
Intact D/R should run on any supported version of MPE/iX that supports Image logging. Pricing on the software for the HP 3000 is tier based ranging from $6,000 to $21,500. Support ranges from $1,200 to $4,300 per year and includes phone in, electronic support and new releases of the software. All prices are in US dollars.
Figure 1 VALID COMMANDS: SHORTFORMS BASE / * -enter/display a master database name B ENTER -enter a database ENT DELETE -delete a database or all databases DEL SHOW -show the settings for global or a database S LIST -list all databases entered L ENABLE -enable a database for INTACT ENA DISABLE -disable a database from INTACT DIS RMODE -set the reporting modes RM GMESSAGE -set the global message GM BMESSAGE -set the database message BM REINFORCE -turn on/off reinforcement reports RE RFILE -set type of report file RF REPORT -print out a report REP HELP -this screen H ? MPE (:) -execute some MPE commands REDO -edit last command entered R VERSION -show the version of INUTIL/INTACT V END E EXIT Figure 2 Begin warping data @ 09:42:47 Processed 318 records out of 3,189 @ 09:42:52 Processed 636 records out of 3,189 @ 09:42:58 Processed 954 records out of 3,189 @ 09:43:07 Processed 1,272 records out of 3,189 @ 09:43:16 INTACT E.01.02 WED, FEB 23, 2000, 9:43 AM FILE R0540943.PUB.SMGA USER MGR.PUB.SMGA PROGRAM WARPDATA.INTERNAL.TIMEWARP STDIN 4 ------------------------------------------------------------------------------ INT/DATA BASE: TRACE.PUB.SMGA Beginning Rollback DBOPEN mode. Logfile: TRA001.PUB.SMGA Dbputs 0 Dbdeletes 0 Dbupdates 1301 Ending Rollback Successfully. Problem with Trace. Call Shawn. ------------------------------------------------------------------------------ END OF INTACT REPORT SESSION aborted by system management. (CIERR 6027) CPU=42. Connect=8. WED, FEB 23, 2000, 9:43 AM. The console then displays 9:43/#S7/69/INT/INTACT invoked for MGR.PUB.SMGA in WARPDATA.INTERNAL.TIMEWARP Figure 3 The Kompany: listf r@,2 ACCOUNT= SMGA GROUP= PUB FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE---- SIZE TYP EOF LIMIT R/B SECTORS #X MX R0540943 825 132B FA 1322 10000 32 1040 5 32 INTACT E.01.02 WED, FEB 23, 2000, 9:43 AM FILE R0540943.PUB.SMGA USER MGR.PUB.SMGA PROGRAM WARPDATA.INTERNAL.TIMEWARP STDIN 4 ------------------------------------------------------------------------------------------------------------------------ INT/DATA BASE: TRACE.PUB.SMGA Beginning Rollback DBOPEN mode. Logfile: TRA001.PUB.SMGA DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2093 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2092 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2091 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2090 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2089 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2088 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 2087 ........ DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 807 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 806 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 805 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 804 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 803 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 802 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 801 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 800 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 799 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 798 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 797 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 796 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 795 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 794 DBUPDATE RUN-STAT-D (Detail), Mode 1, reversed 793 Dbputs 0 Dbdeletes 0 Dbupdates 1301 Ending Rollback Successfully. Problem with Trace. Call Shawn.