DB2 Server for VM: System Administration


Migrating from Version 3 Release 2

When migrating from a Version 3 Release 2 database, you may want to update the SNA NETID file. For information on this task, see Updating the SNA NETID File.

With Version 3 Release 3, you can specify a server name of up to 18 characters, and a resid that is correlated with it. For more information on the conventions to follow when specifying the server name and resid, see Choosing an Application Server Name and VM Resource Identifier.

Choosing an Application Server Default CHARNAME

After migration, the database manager sets the application server default CHARNAME to ENGLISH, and sets the application server CCSID values as follows:

You can change the value of the default CHARNAME, which in turn determines the values for the three application server default CCSIDs. These four values are stored in the VALUE column of the SYSTEM.SYSOPTIONS catalog table. The corresponding values in the SQLOPTION column for these defaults are CHARNAME, CCSIDSBCS, CCSIDMIXED, and CCSIDGRAPHIC.

The value you choose for the default CHARNAME should accurately reflect the type of data that will be stored in the database: that is, the type of code page and character set that describes the data, and whether or not the database manager is to support DBCS characters or MBCS characters, or both. For more information, see Character Set Considerations at Startup, Determining CCSID Values, and CCSID Conversion. For a summary of the considerations for changing these values, see Considerations when changing default CHARNAME and CCSID.

Setting Migration CCSID Values

After choosing your default CHARNAME, you must also set your CCSID values for character and graphic data that existed before the migration to Version 3 Release 3. The CCSID value of character and graphic data stored in tables that were created before Version 3 Release 3 are specified by the three other rows (with SQLOPTION value MCCSIDSBCS, MCCSIDMIXED and MCCSIDGRAPHIC) in the SYSTEM.SYSOPTIONS catalog table. The migration CCSID values (MCCSIDSBCS, MCCSIDMIXED, and MCCSIDGRAPHIC) are used for single byte, mixed, and graphic data that was created prior to Version 3 Release 4 and therefore does not have a CCSID associated with it. The database manager sets the migration CCSID values as follows:

If the code page and character set used to create the migrated data (that is, the data that was inserted into the database prior to Version 3 Release 3) is not CP/CS 37/697, these settings are not correct for your installation and must be changed. You can determine the CCSIDs for migrated data from the code page and character set that was used to generate the terminal controller where the data was entered.

For an example of how your choice of migration CCSID value affects the characters displayed, refer to page ***.

To determine if your database contains graphic or mixed data, issue the following query:


       SELECT COUNT(*) FROM SYSTEM.SYSCOLUMNS
       WHERE COLTYPE = 'GRAPHIC'  OR
             COLTYPE = 'VARGRAPH' OR
             COLTYPE = 'LONGVARG' OR
             SUBTYPE = 'M'

If the query returns a result of zero rows, the database contains neither graphic nor mixed data; a nonzero result indicates the number of columns in your database that do contain such data.

Handling SBCS Data

If your database contains only SBCS data (that is, the above query returns a result of zero) prior to Version 3 Release 3, the migrated CCSID values for mixed and graphic data (MCCSIDMIXED and MCCSIDGRAPHIC) must remain 0.

If the MCCSIDSBCS value of 37 is not correct for your installation, this must be changed to correspond to the code page and character set used to create the migrated data. For example, if the data was created with CP/CS 273/697 (GERMAN), the CCSID value you should use is 273. For a list of some of the SBCS CCSIDs and their character set and code page values, see Table 22.

The row that you must update for data in tables created before Version 3 Release 3 is:

Handling Mixed Data

If your database contains graphic or mixed data prior to Version 3 Release 3, you must update the VALUE column of SYSTEM.SYSOPTIONS for the row where SQLOPTION='MCCSIDMIXED' with the appropriate nonzero CCSID value. You must also update the row where SQLOPTION='MCCSIDSBCS' to the value of the SBCS component of the mixed CCSID, and the row where SQLOPTION='MCCSIDGRAPHIC' to the value of the DBCS component of the mixed CCSID. If these CCSIDs do not correspond to the components of the mixed CCSID, the wrong conversion selection tables are being used. For a list of some of the mixed CCSIDs and their component SBCS and DBCS CCSIDs, see Table 22.

The rows that you must update for data in tables created before Version 3 Release 3 are:

Choosing the Default CHARNAME for All Application Requesters

After migration, the application requester default CHARNAME is determined from the SQLGLOB file. By default it is set to INTERNATIONAL, and the application requester CCSID values are as follows:

To ensure the integrity of character data representation and to reduce the performance overhead associated with CCSID conversion, it is important to choose the appropriate CHARNAME for the code page used by each application requester. If you need to, you can later change it for all application requesters by using the global default SQLGLOB EXEC. See Choosing the Default CHARNAME and CCSID for Application Requesters and Setting the Application Requester Default CHARNAME and CCSIDs. For more general information on CCSIDs, see CCSID Conversion and Determining CCSID Values.

Considerations for Mixed Primary Keys with Field Procedures

If you are migrating from Version 3 Release 1 or Version 3 Release 2, the value of CCSID in SYSTEM.SYSKEYCOLS is NULL. For some primary keys, this value is not correct. In this case, you should drop and recreate the primary keys, which you can identify by running the ARISFPKY EXEC after migrating. (For information on this procedure, see the DB2 Server for VM Program Directory.)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]