在第 10 章中,更新了下列段落:
|You must have DB2 for OS/390 Version 5, DB2 for OS/390 Version 6, or DB2 |for OS/390 Version 7 to run DB2 DataPropagator for OS/390 Version 7 (V7).
|DB2 DataPropagator for OS/390 V7 supports UNICODE and ASCII encoding schemes. |To exploit the new encoding schemes, you must have DB2 for OS/390 V7 and you |must manually create or convert your DB2 DataPropagator source, target, and |control tables as described in the following sections. However, your existing |replication environment will work with DB2 DataPropagator for OS/390 V7 even |if you do not modify any encoding schemes.
|If your source, CD, and target tables use the same encoding scheme, you |can minimize the need for data conversions in your replication environment. |When you choose encoding schemes for the tables, follow the single CCSID rule: |Character data in a table space can be encoded in ASCII, UNICODE, or EBCDIC. |All tables within a table space must use the same encoding scheme. The encoding |scheme of all the tables in an SQL statement must be the same. Also, all |tables that you use in views and joins must use the same encoding scheme.
|If you do not follow the single CCSID rule, DB2 will detect the violation |and return SQLCODE -873 during bind or execution. Which tables should be ASCII |or UNICODE depends on your client/server configuration. Specifically, follow |these rules when you choose encoding schemes for the tables:
|To specify the proper encoding scheme for tables, modify the SQL that is |used to generate the tables:
|See the DB2 Universal Database |for OS/390 Utility Guide and Reference for more information on the Load and Reorg utilities.
|DPCNTL.MVS is shipped with DB2 for OS/390 |in sqllib\samples\repl and it contains several CREATE TABLE statements |that create the control tables. For those tables that need to be ASCII or |UNICODE (for example, ASN.IBMSNAP_REGISTER and ASN.IBMSNAP_PRUNCNTL), add |the CCSID ASCII or CCSID UNICODE keyword, as shown in the following example.
|CREATE TABLE ASN.IBMSNAP_PRUNCNTL ( | TARGET_SERVER CHAR( 18) NOT NULL, | TARGET_OWNER CHAR( 18) NOT NULL, | TARGET_TABLE CHAR( 18) NOT NULL, | SYNCHTIME TIMESTAMP, | SYNCHPOINT CHAR( 10) FOR BIT DATA, | SOURCE_OWNER CHAR( 18) NOT NULL, | SOURCE_TABLE CHAR( 18) NOT NULL, | SOURCE_VIEW_QUAL SMALLINT NOT NULL, | APPLY_QUAL CHAR( 18) NOT NULL, | SET_NAME CHAR( 18) NOT NULL, | CNTL_SERVER CHAR( 18) NOT NULL, | TARGET_STRUCTURE SMALLINT NOT NULL, | CNTL_ALIAS CHAR( 8) | ) CCSID UNICODE | DATA CAPTURE CHANGES | IN TSSNAP02;
|To modify existing control tables and CD tables, |use the Reorg and Load utilities.
|CREATE TABLE user1.cdtable1 ( | employee_name varchar, | employee_age decimal | ) CCSID UNICODE;
|The DB2 UDB for OS/390 SQL |Reference contains more information about CCSID. |