DB2 Version 9.7 for Linux, UNIX, and Windows

Upgrading a DB2 server with XML Extender to DB2 Version 9.7

Upgrading XML Extender to DB2® Version 9.7 requires that you remove the XML Extender functionality then upgrade to DB2 Version 9.7 without this functionality. Upgrading a pre-Version 9.7 DB2 server where XML Extender is installed or where XML Extender functionality is enabled to DB2 Version 9.7 is not supported because XML Extender is discontinued.

Before you begin

Restrictions

Procedure

To upgrade a pre-Version 9.7 DB2 server with XML Extender functionality to DB2 Version 9.7:

  1. Optional: Back up all DAD or DTD files from the db2xml.DTD_REF or db2xml.XML_USAGE table for each database that you enabled for XML Extender. The following example shows how to export the DTD files stored in the DTD_REF table to a specific directory:
    db2 EXPORT TO dtdfiles.del OF del LOBS TO dir-name
         MODIFIED BY lobsinsepfiles
         SELECT CONTENT FROM DB2XML.DTD_REF
    The following example shows how to export the DAD files stored in the db2xml.XML_USAGE table to a specific directory:
    db2 EXPORT TO dadfiles.del OF del LOBS TO dir-name
         MODIFIED BY lobsinsepfiles
         SELECT DAD FROM DB2XML.XML_USAGE
  2. Disable all XML columns that you enabled for XML Extender in all databases by using the following command:
    dxxadm disable_column db_name tab_name column_name
    Alternatively, you can call the dxxDisableColumn() stored procedure. The following example shows how to list the columns that are enabled for XML Extender:
    db2 SELECT TABLE_SCHEMA, TABLE_NAME, COL_NAME 
        FROM DB2XML.XML_USAGE
        WHERE NOT TABLE_SCHEMA='DXX_COLL'
  3. Optional:Disable all XML collections that you enabled for XML Extender in all databases. Alternatively, you can call the dxxDisableCollection() stored procedure. The following example shows how to list all the collections that are enabled for XML Extender:
    db2 SELECT TABLE_SCHEMA, TABLE_NAME, COL_NAME 
        FROM DB2XML.XML_USAGE
        WHERE TABLE_SCHEMA='DXX_COLL' AND TABLE_NAME='DXX_COLLECTION'
  4. Drop all references to the XMLVARCHAR, XMLCLOB, and XMLFILE user-defined data types from tables, distinct types, structured types, user-defined functions (UDFs), methods, and dependent objects in all databases. The following example shows how to list the columns that use the XML Extender UDTs:
    db2 SELECT TABSCHEMA, TABNAME, COLNAME
        FROM SYSCAT.COLUMNS 
        WHERE TYPESCHEMA='DB2XML' AND NOT TABSCHEMA='DB2XML'

    Alternatively to dropping the column, you could add a new column using a built-in type to move the data from the XML columns using the UPDATE statement before dropping them. You cannot use the ALTER TABLE statement with the ALTER COLUMN clause to change the data type. You can also use the EXPORT, IMPORT, and LOAD utilities to re-create the table without XML columns.

  5. Disable all databases enabled for XML Extender by running the following command for each database:
    dxxadm disable_db database_name
    Alternatively, you can call the dxxDisableDB() stored procedure.
  6. Uninstall XML Extender on the DB2 server that you want to upgrade. The following example shows how to uninstall a copy of DB2 server on AIX operating systems:
    DB2DIR/install/db2_deinstall -F XML_EXTENDER 
    Where DB2DIR is the location where the DB2 server and XML Extender are installed.
  7. Update your instances to remove the XML Extender functionality by running the db2iupdt command:
       db2iupdt instance-name
  8. Install a new DB2 Version 9.7 copy on your DB2 server. If you are installing DB2 Version 9.7 on Windows and you choose to upgrade your existing pre-Version 9.7 DB2 copy, proceed to step 11,
  9. Upgrade instances from the new DB2 Version 9.7 copy.
  10. Optional: Upgrade the DB2 Administration Server if you want to keep your existing configuration and to administer your DB2 Version 9.7 instances using the Control Center.
  11. Upgrade databases.

What to do next

After upgrading the DB2 server, perform the recommended post-upgrade tasks such as resetting the diagnostic error level, adjusting log space size, and rebinding packages. In addition, verify that the upgrade of your DB2 server was successful.

Refer to Migrating from XML Extender to pureXML for details on how to migrate to pureXML after the upgrade.