Replication Guide and Reference
The MIGRATE program functions include:
- The MIGRATE program migrates one source server, one target server, or one
of each (source and target) at a time.
- The output of the MIGRATE program puts a migration trace into the
MIGRATE.TRC file, and a report of the success or failure of the migration
execution in the MIGRATE.RPT file. If the migration fails, the changes will be
restored to their original state according to the migration assumptions.
The trace file is not translated, and should be handled like the Apply
trace file. You should always save the output of each run, especially if you
migrate the source server before the target servers. Otherwise, the source
server trace is lost.
- The MIGRATE program reads the run-time related information, such as the
timestamp, log sequence number, or status from source, target, and control
servers during migration or fallback.
- When you migrate the Capture program, all registrations at the source
server are migrated to Version 5. When you migrate the Apply program, all subscriptions at all the
control servers in the subscriber ID's routing table are migrated to
Version 5 subscriptions. The migrate program migrates a Version 1 multiple
control server environment to one Version 5 control server. When you run
ASNMIG, you must specify the location for the consolidated Version 5 control
server.
The following sections explain how to migrate the Version 1 registrations
and Version 1 subscriptions.
To migrate the Capture program from Version 1 to Version 5:
- Stop the Capture program.
- Connect to the source server database by entering:
DB2 CONNECT TO
database
where database is the source server database.
- Bind the migration program to the migration database and all associated
source, target, and control servers.
- Enter the following command:
ASNMIG MIGRATE D=
mig_db S=
v1_data_serv (V=
ver)
Where:
- mig_db
- Name of the migration database where the global control tables are stored.
This is a required parameter.
- v1_data_serv
- Name of the Version 1 source server, known as the source server in Version
5. This is a required parameter.
- ver
- Version of the migration data that you want to migrate. If you do not
specify this parameter, ASNMIG selects the latest version number. This is an
optional parameter.
You can specify only one migration database, source server, and version.
- Examine the migration report (MIGRATE.RPT) to determine if the program
executed successfully.
- Make sure the Version 5 Capture program is installed on the source server.
To install the program, see Quick Beginnings for your particular platform.
- Bind the Version 5 Capture program as described in "Configuring the Capture Program for Windows NT and Windows 95" for Windows NT and Windows 95, and in "Configuring the Capture Program for OS/2" for OS/2.
- Warm start the Version 5 Capture program as described in "Starting Capture for Windows NT and Windows 95" for Windows NT and Windows 95, and in "Starting Capture for OS/2" for OS/2.
When you run ASNMIG MIGRATE for a source server where Capture might run,
MIGRATE performs the following actions:
- Connects to the source server that you specify.
- Drops the critical section table, if an Apply program process has not
locked it, and then creates it with the Version 5 Data Definition Language
(DDL). If the critical section table is locked, ASNMIG attempts up to 400
times to drop it. There is one critical section table per registered source.
- Creates the ASN.IBMSNAP_WARM_START table if it does not exist. Otherwise,
the rows in all warm start tables are deleted. That is, all Version 1 and
Version 5 warm start tables are empty after migration.
- Alters the ASN.IBMSNAP_CCPPARMS table to add a new PRUNE_INTERVAL column.
- Alters the ASN.IBMSNAP_UOW table to add two new columns:
IBMSNAP_REJ_CODE and IBMSNAP_APPLY_QUAL.
- Creates the Version 5 ASN.IBMSNAP_REGISTER and ASN.IBMSNAP_PRUNCNTL
tables.
- Creates the Version 1 ASN.IBMSNAP_CD_CNTL1 table for saving Version 1
registrations.
- Copies from the Version 1 ASN.IBMSNAP_CD_CNTL and ASN.GLOBAL_CD_CNTL
tables to the Version 5 ASN.IBMSNAP_REGISTER table.
- Copies from the Version 1 ASN.IBMSNAP_CD_CNTL table to the
ASN.IBMSNAP_CD_CNTL1 table.
- For each registered source:
- If the length of the pruning control table name is 18 characters, MIGRATE
changes the first character of the pruning control table name to "M". If
the length of the pruning control table name is less than 18 characters,
creates a backup Version 1 pruning control table with a 1 appended to the
original pruning control table name.
- Copies from the original pruning control table to the backup table
individually.
- Copies the Version 1 pruning control table to the Version 5 pruning
control table.
- Drops the Version 1 pruning control tables.
- Creates the Version 1 pruning control view based on the Version 5 pruning
control table.
- Copies the SOURCE_OWNER, SOURCE_TABLE, and SOURCE_VIEW_QUAL values for a
view registered source from the ASN.GLOBAL_CD_CNTL table. They are resolved in
the BUILDDB and PREPARE actions.
- Drops the Version 1 ASN.IBMSNAP_CD_CNTL table, and then creates the
Version 1 ASN.IBMSNAP_CD_CNTL view based on the join of entries in the Version
1 ASN.IBMSNAP_CD_CNTL1 and Version 5 ASM.IBMSNAP_REGISTER tables. It gets the
names of the pruning control view from ASN.IBMSNAP_CD_CNTL1 and the critical
section name as a constant.
To migrate Version 1 subscriptions to Version 5:
- Stop the Version 1 Apply instances currently executing on the target
servers to be migrated.
- Connect to the target server database by entering:
DB2 CONNECT TO
database
where database is the target server database.
- Bind the migration program, if you have not done so, to the migration
database and all associated source, target, and control servers.
- Enter the following command:
ASNMIG MIGRATE D=
mig_db T=
rout_serv C=
v5_ctrl_serv U=
sub_id (V=
ver)
Where:
- mig_db
- Name of the migration database where the global control tables are stored.
This is a required parameter.
- rout_serv
- Server where the Version 1 routing table resides. This is a required parameter.
- v5_ctrl_serv
- Version 5 control server, which contains the control tables for the Apply
program process. This is a required parameter.
- sub_id
- Subscriber ID of an Apply program process. This is a required parameter.
- ver
- Version of the migration data that you want to migrate. If you do not
specify this parameter, ASNMIG selects the latest version number. This is an
optional parameter.
You can specify only one control server, subscriber ID, migration database
where the routing table server resides, and version.
- Examine the migration report (MIGRATE.RPT) to determine if the program
executed successfully.
- Make sure the Version 5 Apply program is installed on the correct server.
To install the program, see Quick Beginnings for your particular platform.
- Bind the Version 5 Apply program as described in "Configuring the Apply Program for Windows NT and Windows 95" for Windows NT and Windows 95, and in "Configuring the Apply Program for OS/2" for OS/2.
- Start the Version 5 Apply program as described in "Starting Apply for Windows NT and Windows 95" for Windows NT and Windows 95, and in "Before You Start theApply Program" for OS/2.
When you run ASNMIG MIGRATE for a target server where Apply might run,
MIGRATE performs the following actions:
- Connects to the Version 5 control server.
- Creates the following Version 5 common subscription control tables at the
Version 5 control server:
- ASN.IBMSNAP_SUBS_SET
- ASN.IBMSNAP_SUBS_MEMBR
- ASN.IBMSNAP_SUBS_COLS
- ASN.IBMSNAP_SUBS_STMTS
- ASN.IBMSNAP_SUBS_EVENT
- ASN.IBMSNAP_APPLYTRAIL
- Connects to the server where the routing table resides, and retrieves all
Version 1 control server names.
- For each Version 1 control server:
- Copies the Version 1 userid.IBMSNAP_REF_CNTL table at the Version
1 control server to the Version 5 ASN.IBMSNAP_SUBS_SET,
ASN.IBMSNAP_SUBS_MEMBR, and ASN.IBMSNAP_SUBS_STMTS tables at the IBM
Replication control server.
- Copies the Version 1 userid.IBMSNAP_REF_COLS table at the Version
1 control server to the Version 5 ASN.IBMSNAP_SUBS_COLS table at the Version 5
control server.
- Copies the Version 1 userid.IBMSNAP_TRAIL tables at the Version 1
control server to the Version 5 ASN.IBMSNAP_APPLYTRAIL table at the Version 5
control server.
- If more than one Version 1 control server exists, the MIGRATE action collapses multiple Version 1 control servers into a single Version
5 control server. The subscription definitions from each Version 1 control
server are copied to the single IBM Replication control server.
- If auto-registration is detected at the target server, MIGRATE instructs
you to enter the following command to migrate the ASN.IBMSNAP_CD_CNTL and userid.ASN. timestampPC
tables before the migration of this Apply program process is complete:
ASNMIG MIGRATE D=
mig_db S=
v1_copy_serv (V=
ver)
Auto-registration occurs when the subscriber's COPY_OWNER and
COPY_TABLE in the userid.IBMSNAP_REF_CNTL table are the same as the
SOURCE_OWNER and SOURCE_TABLE in the ASN.IBMSNAP_REGISTER table at the target
server.
- Creates userid.IBMSNAP_ROUTING1, copies data from
userid.IBMSNAP_ROUTING to it, then drops userid.IBMSNAP_ROUTING. This
prevents you from inadvertently running the Version 1 Apply program process after you migrate to Version 5.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]