Setting up the XML schema repository

Before you can do XML schema validation on your XML documents, you need to set up an XML schema repository.

Before you begin

Besides Db2 for z/OS®, XML schema repository setup requires that the following software is installed and configured:
  • Workload Manager for z/OS (WLM)
  • z/OS XML System Services
  • Java™ 2 Technology Edition, V5 or later, 31-bit version
  • IBM® Data Server Driver for JDBC and SQLJ

About this task

Setting up an XML schema repository involves defining a set of Db2 tables and indexes that store XML schema information, and setting up a set of stored procedures that operate on the XML schemas that are stored in the tables.

Procedure

To set up the XML schema repository:

  1. Define the XML schema repository objects by running the DSNTIJRT job that was generated by the Db2 installation CLIST.

    The DSNTIJRT job invokes a program that executes the DDL statements for creating the XML schema repository tables and indexes. The DSNTESR sample member of the prefix.SDSNSMAP data set contains samples of the data definition language (DDL) statements that are processed by the DSNTIJRT job.

    Important: Do not drop these objects after you begin to do XML schema validation. Doing so can cause unexpected behavior.

    The XML schema repository includes the following objects:

    Object type Object names
    Database
    • DSNXSR
    Table spaces
    • Start of changeSYSIBM.SYSXSR1End of change
    • Start of changeSYSIBM.SYSXSR2End of change
    • Start of changeSYSIBM.SYSXSR3End of change
    • Start of changeSYSIBM.SYSXSR4End of change
    • SYSIBM.SYSXSRA1
    • SYSIBM.SYSXSRA2
    • SYSIBM.SYSXSRA3
    • SYSIBM.SYSXSRA4
    Tables
    • SYSIBM.XSRANNOTATIONINFO
    • SYSIBM.XSRCOMPONENT
    • SYSIBM.XSROBJECTCOMPONENTS
    • SYSIBM.XSROBJECTGRAMMAR
    • SYSIBM.XSROBJECTHIERARCHIES
    • SYSIBM.XSROBJECTPROPERTY
    • SYSIBM.XSROBJECTS
    • SYSIBM.XSRPROPERTY
    Indexes
    • SYSIBM.XSRANNINFOIDX
    • SYSIBM.XSRCOMP01
    • SYSIBM.XSRCOMP02
    • SYSIBM.XSRHIER01
    • SYSIBM.XSRHIER02
    • SYSIBM.XSROBJ01
    • SYSIBM.XSROBJ02
    • SYSIBM.XSROBJ03
    • SYSIBM.XSROBJ04
    • SYSIBM.XSRXCC01
    • SYSIBM.XSRXCP01
    • SYSIBM.XSRXOG01
    • SYSIBM.XSRXOP01
  2. Define the WLM environment and startup procedure for the C language XML schema repository stored procedures.
  3. Define the WLM environment and startup procedure for the Java language XML schema repository stored procedure.
  4. Define the XML schema repository stored procedures to Db2.
  5. Bind the packages for the XML schema repository stored procedures.
    Installation job DSNTIJRT invokes a program that binds the packages for the XML schema repository stored procedures. After the installation process customizes job DSNTIJRT, you can run DSNTIJRT without further modification to bind the packages.
  6. Bind the packages for the IBM Data Server Driver for JDBC and SQLJ.
  7. Test the XML schema repository setup.