There are many ways to replicate data in DB2 database, this paper mainly introduces a scheme of cloning DB2 data using fast disk replication technology (such as flashcopy, etc.). By using DB2 cloning Tool, you can minimize the actions that DBAs need to perform during the DB2 database cloning process. Make the entire process more automated.
Database administrators (DBAs), or DB2 development testers, can benefit from this, and learn how to build DB2 test environments quickly and easily through DB2 cloning tool. Provides a powerful guarantee for application development and testing.
Preface
The DB2 database on the host platform is a database solution with excellent performance, stable operation and extensive use. With the increasing amount of data stored in the host DB2 database, developers often need to spend a lot of effort and time to build a qualified host DB2 test environment when testing the new host-based DB2 database application System. The structure of this test DB2 system must be consistent with the structure of the generating DB2 system, and the test environment must contain a considerable amount of data in order to ensure the accuracy of the test.
Two kinds of data cloning technology
In general, you can import data into the DB2 system for testing in the following two ways.
1. Use the Unload tool to unload data from the production DB2 system, and then mount the test DB2 environment using the load tool. The advantage of this method is that it is flexible and easy to operate. The main problem with this approach is that it takes a long time.
2. Using disk replication technology such as FlashCopy, the DB2 subsystem is quickly replicated by volume copy to volume. The biggest advantage of this method is that it is fast. Second, we can maximize the consistency of test DB2 and production DB2 physical characteristics (the distribution of data on physical disks) through volume copies of volumes. But the main problem with this approach is that
DB2 uses VSAM datasets, which may require a new VSAM cluster for the VSAM dataset after the volume is copied to the volume;
Typically, DB2 has more VSAM datasets involved and it is difficult for users to rename these VSAM DataSet one by one, so the name of the newly generated DB2 database can only remain consistent with the source DB2.
The second approach is certainly attractive, but its drawbacks are tricky. In response to this situation, IBM DB2 cloning tool emerged. It can help users with the power of rapid disk replication technology such as FlashCopy, convenient, fast cloning of the required DB2 database.
Typical usage scenarios for DB2 cloning tool
The rapid cloning production system DB2, enables the user to be able to run the production flow concurrently;
Establish a QA (Quality Assurance) test environment that is completely equivalent to the production system, making the results of performance testing more specific;
Before upgrading to the new version of DB2, create a complete subsystem environment (clone) to test the upgrade and application of the new system before the production system is upgraded to a new version;
Create a data warehouse that enables users to perform data mining without impacting the production system.
DB2 cloning tool's use environment
Figure 1. DB2 cloning tool's use environment