#MDRapid is a software product that runs on the IBM i to minimize downtime when making database changes to very large files.
This is done in a number of Phases
- Launch Phase
- Monitor Phase
- Copy Phase
- Sync Phase
- Install Phase
#MDRapid is a module of MDCMS Change control for #IBMi that enables developers of systems with very, very large files to deploy changes in seconds and minimize downtime normally associated with taking a system down and copying the live data to an updated file before making the updated system available again.
The Launch Phase
The changes are prepared in a copy of the impacted tables. All existing data is transformed and mapped from the live tables to the new version of the tables while the applications are still running. Any database transactions that occur during this time period are also transformed and mapped to the new version of the tables. Any database relations over those tables are also prepared while the applications are still running.
The Monitoring Phase
The monitor job performs the following tasks:
1)Start the #MDRapid job for the table with the largest number of records
2)If multiple parallel copy jobs are allowed, based on the #MDRapid Usage Template, the next largest table will be started, and so on until max number of parallel jobs are started.
3)Once the copy portion of an #MDRapid job is complete, the monitor job will start the #MDRapid job for the next table in the queue. This continues until all #MDRapid table jobs have been started.
4)Once the copy portion of an #MDRapid table job is complete, the monitor job checks if there are any indexes or views that are based on the table and submits a job to create them. If the view or logical file is based on multiple tables, the creation is delayed until the copy is complete for all of the based on tables.
5)Update status for a job if it abnormally ends or remains stuck in the job queue.
The Copy Phase
The #MDRapid table job performs the following tasks during the copy phase:
1) If the table was requested for update, any defined update commands are invoked and applied to the new version of the table in the #MDRapid temporary library.
2) Check if any uniquely keyed logical files are based on the table and create them before copying data to ensure the unique constraints are supported and avoid potential for duplicate errors during the syncing process.
3) Mark the start time and initial journal receiver required for when the sync phase begins, in order to avoid missing out on any transactions occurring during the copy phase.
4) Copy the rows in the live table to the new version of the table. This is performed in batches of 10,000 rows. After each batch, the status is updated for viewing in the console.
The Sync Phase
The #MDRapid table job performs the following tasks during the sync phase:
1) Check the journal for the table for any record or member transactions and replicate those transactions in the new version of the table, transforming the information to match the defined #MDTransform column result configuration.
2) Once all outstanding journal transactions are processed, enable any check and referential constraints and set status for table to Sync/Idle, indicating that installation of the table can occur.
The Install Phase
Once all tables are in Sync/Idle state and all database relations are created, the table update is ready for installation.
The installation will then either automatically install, if defined to do so, or syncing will continue until a user manually requests to start the installation.
The Installation Steps:
1)Run any defined pre-installation commands and scripts, for example to end application jobs.
2)Validate that all #MDRapid sync jobs are active, to ensure no final transactions will be missed.
3)Obtain an *EXCLRD lock on the tables in the live application
4)Wait for the #MDRapid sync jobs to complete and end
5)Obtain an exclusive lock on all tables, indexes and views that will be replaced by the new versions.
6)Move the current versions to a temporary backup library
7)Move the new versions to the application library
8)Apply journaling and any defined triggers to the new versions
9)Run any defined post-installation commands and scripts, for example to restart application jobs.
For a demonstration contact us though LinkedIn or via our Contact Page