DB2 Replication Guide and Reference
The migration process includes:
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.
- Run the DPCNTL.MVS or DPCNTL.UDB file using the DB2 -TF
command. This does the following:
- Drops and creates ASN.IBMSNAP_CRITSEC table.
- Creates ASN.IBMSNAP_WARM_START table if it does not exist.
- Creates ASN.IBMSNAP_REGISTER and ASN.IBMSNAP_PRUNCNTL
tables.
- Bind and create the migration package at the source server by entering the
following command:
DB2 BIND ASNMIG.BND ISOLATION CS BLOCKING ALL
where CS specifies cursor stability as the isolation
level.
- Repeat the connect and bind steps for the migration database and every
server that will be involved in the migration process.
-
Enter the following commands:
-
set db2dbdft=mig_db
-
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 data 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.
Note: | For the Windows 95 and Windows NT platforms, when you specify parameters with
the ASNMIG command for the MIGRATE action, you must surround those parameters
with double quotes.
|
- 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 the Capture program
runs, MIGRATE performs the following actions:
- Connects to the source server that you specify.
- Checks if the APPLY_QUAL column is in the ASN.IBMSNAP_CRITSEC
table. If so, proceed. Otherwise, exit.
- Check if the ASN.IBMSNAP_WARM_START table exists. If not,
exit. 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 1 ASN.IBMSNAP_CD_CNTL1 table for saving Version
1 registrations.
- Constructs the rows from the Version 1 ASN.IBMSNAP_CD_CNTL table
and ASN.GLOBAL_CD_CNTL table in the migration database, and puts them
in the Version 5 ASN.IBMSNAP_REGISTER table.
- Copies from the Version 1 ASN.IBMSNAP_CD_CNTL table to the
ASN.IBMSNAP_CD_CNTL1 table.
- 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. If the Version 1 Apply program runs
with the Version 5 Capture program concurrently, the Apply program gets the
names of the Version 1 pruning control and critical section tables from the
ASN.IBMSNAP_CD_CNTL1 table.
- For each registered source:
- Determines the backup Version 1 pruning control (PC) table name and
creates the backup PC table. The backup PC table name is constructed by
appending a "1" to the original name (if the table name length is less
than 18 characters), or replacing the first character with "M" if the
table name length is equal to 18 characters. If the original PC table
name already starts with "M", you are responsible for changing the
original Version 1 PC table name before starting the MIGRATE
action.
- Copies from the original PC table to the backup PC table.
- Constructs the rows from the PC table and ASN.GLOBAL_CD_CNTL table
and puts them in the Version 5 ASN.IBMSNAP_PRUNCNTL table. The
values of the SOURCE_OWNER, SOURCE_TABLE, and SOURCE_VIEW_QUAL columns are
resolved when the PREPARE action is run, and are stored in the
ASN.GLOBAL_CD_CNTL table. At this point, the values of the
APPLY_QUAL and SET_NAME columns are set to "?". The CNTL_ALIAS column
has a null value and the CNTL_SERVER column still contains the Version 1
control server name. The values are not known until the Version 1 Apply
is migrated later.
- Drops the Version 1 pruning control tables.
- Creates the Version 1 pruning control view based on the Version 5
ASN.IBMSNAP_PRUNCNTL table.
Migration of control tables at the data server is committed
based on the successful migration of each table. For example, it is
possible that ASN.IBMSNAP_CD_CNTL table is migrated and committed, but
one of the pruning control tables failed to migrate. In such a case,
you must use the FALLBACK action to restore to Version 1. After the
cause of the failure is fixed, you can migrate the data server
again.
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 Version 5 control server database by entering:
DB2 CONNECT TO database
where database is the control server database.
- Run the DPCNTL.UDB or DPCNTL.MVS file using the DB2 -TF
command to create the following control tables:
- ASN.IBMSNAP_SUBS_SET
- ASN.IBMSNAP_SUBS_MEMBR
- ASN.IBMSNAP_SUBS_COLS
- ASN.IBMSNAP_SUBS_STMTS
- ASN.IBMSNAP_SUBS_EVENT
- ASN.IBMSNAP_APPLYTRAIL
- Bind and create the migration package at the control server by entering
the following command:
DB2 BIND ASNMIG.BND ISOLATION CS BLOCKING ALL
where CS specifies cursor stability as the isolation
level.
- Repeat the connect and bind steps for the migration database and all
associated source, target, and Version 1 control servers.
-
Enter the following commands:
-
set db2dbdft=mig_db
-
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 subscriber ID, the server where the
subscriber's routing table resides, one migration database, one version
of the migration data, and one Version 5 control server. Specifically,
this MIGRATE action will migrate the subscriptions of a subscriber all at
once.
Note: | For the Windows 95 and Windows NT platforms, when you specify parameters with
the ASNMIG command for the MIGRATE action, you must surround those parameters
with double quotes.
|
- 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 the Apply Program for OS/2.
When you run ASNMIG MIGRATE for a subscriber whose Apply program might run
on some target server, MIGRATE performs the following actions:
- Connects to the server where the routing table resides, and retrieves all
Version 1 control server names.
- For each Version 1 control server:
- Constructs the rows from the Version 1
subscriber.IBMSNAP_REF_CNTL table and the
ASN.GLOBAL_REF_CNTL table and puts them in the Version 5
ASN.IBMSNAP_SUBS_SET, ASN.IBMSNAP_SUBS_MEMBR, and
ASN.IBMSNAP_SUBS_STMTS tables at the IBM Replication control
server.
- Connects to the source server and updates the APPLY_QUAL, SET_NAME,
CNTL_SERVER, and CNTL_ALIAS columns in the ASN.IBMSNAP_PRUNCNTL
table.
- Copies the Version 1 subscriber.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.
- 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 the Version 1 pruning control 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 subscriber.IBMSNAP_REF_CNTL table are the
same as the BASE_OWNER and BASE_TABLE in the ASN.IBMSNAP_CD_CNTL table
at the target server.
- Creates subscriber.IBMSNAP_ROUTING1, copies data from
userid.IBMSNAP_ROUTING to it, then drops
subscriber.IBMSNAP_ROUTING. This prevents you from inadvertently running the Version 1 Apply program process after you migrate to Version
5.
The migration of the subscriber's control tables is committed when the
subscriber's IBMSNAP_ROUTING table is dropped and the IBMSNAP_ROUTING1
table is created. If the MIGRATE action fails before this occurs, you
do not need to run the FALLBACK action because the subscriber's Version 1
control tables are still intact.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]