Setting up consists of configuring the source, target, and control servers, and setting up NT services. The following sections provide instructions for configuring each server, providing end-user authentication at the source server, and setting up the NT Service Control Manager.
DB2 CONNECT TO database
where database is the source server database.
DB2 UPDATE DATABASE CONFIGURATION FOR database_alias USING LOGRETAIN ON DB2 BACKUP DATABASE database_alias
DB2 BIND @CAPTURE.LST ISOLATION UR BLOCKING ALL
where UR specifies the list in uncommitted read format for greater performance.
If your system does not support UR, substitute CS (cursor stability format) instead.
These commands create a list of packages, the names of which can be found in the CAPTURE.LST file.
DB2 CONNECT TO databasewhere database is the source server database.
DB2 BIND @APPLYCS.LST ISOLATION CS BLOCKING ALL
DB2 BIND @APPLYUR.LST ISOLATION UR BLOCKING ALL
Where:
These commands create a list of packages, the names of which can be found in the APPLYCS.LST and APPLYUR.LST files.
DB2 CONNECT TO databasewhere database is the target server database.
DB2 BIND @APPLYCS.LST ISOLATION CS BLOCKING ALL GRANT PUBLIC
DB2 BIND @APPLYUR.LST ISOLATION UR BLOCKING ALL GRANT PUBLIC
Note: | Because the Apply program control tables use static SQL calls, the Apply bind process searches for nearly all of the control tables at each server that it is bound to, regardless of whether these control tables have any use or meaning at each server. |
For end-user authentication to occur at the source server, you must provide a password file with the AUTH=SERVER scheme for the Apply program to use when connecting to the source server. It is advisable to limit read access of this file to the user ID that will run the Apply program.
Creating a password file:
The password file must meet the following criteria:
<APPLYQUAL><instname><CNTLSRVR>.PWD
Where:
For example: DATADIRapply1REPRTDB.PWD
Note that this naming convention is the same as the .LOG file name and the .SPL file name, but with a file extension of PWD.
SERVER=server_name PWD=passwordThe file cannot include blank lines or comment lines.
For more information about authentication and security, refer to the IBM DB2 Universal Database Administration Guide.
You can operate the Capture and Apply programs for Windows NT and Windows 95 by using the DB2 command processor, or by using the NT Service Control Manager (SCM). The SCM enables you to automatically start the Capture and Apply programs as services from the NT Control Panel.
To set up NT services:
ASNINST D:\DIRECTORY\ASNSERV.EXE
ASNPATH=D:
db_name x:\\ASNCCP parameters
db_name x:\\ASNAPPLY parameters
where db_name is the name of your source database for the Capture program and control database for the Apply program, x is the drive, and parameters is one or more parameters as in the following example:
DBNAME1 C:\CAPTURE\ASNCCP COLD TRACE DBNAME2 C:\APPLY\ASNAPPLY X 2
D:\NTSERV.ASN
After starting the service, the Capture and Apply programs run independently of ASNSERV. Consequently, stopping ASNSERV does not stop the Capture and Apply programs.
To remove ASNSERV from the NT Control Panel, use the ASNREMV program. After removing ASNSERV, Replication no longer appears on the Services window.