Creating Required Tables and Views

Restriction: This topic applies to Windows environments only.

A few Micro Focus development tools, such as SQLWizard and XDB Migrate, use special tables in which they maintain control information. These programs also need access to system tables. Before you can successfully use these tools with XDB Link, you must do the following in DB2:

  1. Create the special tables these programs need.
  2. Grant public access to these special tables or grant access to XDB Link users on a user-by-user basis.
  3. Create views of the system tables these programs use (optional).
  4. Grant public access to these system tables (or views), or grant access to XDB Link users on a user-by-user basis.

Micro Focus provides a script file (XDBLINK.SQL, in the XDB program directory) to create the necessary files and grant the required privileges. Ask your DB2 database administrator to examine this script file and customize it for your DB2 site. He or she may want to edit this script to:

After the script is customized, run it against your DB2 location using a tool such as SPUFI on the host. Or, use the following steps to run the script with SQLWizard from an XDB client workstation.

To perform these steps, you must have SELECT privileges on the DB2 system tables and you must be authorized to create tables.

To run the XDBLINK script using SQLWizard

  1. On the machine where XDB Link is installed, start the communications software (SNA or TCP/IP) if it is not already running.
  2. If you are using XDB Link in a gateway configuration, start the XDB Server on the machine where XDB Link is installed.
  3. On the machine where XDB Link is installed, or from any client workstation with access to that machine, start Options by selecting its icon in the XDB program group or folder.
  4. When the Options window opens, set the following values on the Connect page:
    If you are using XDB Link in a... Make these selections...
    Gateway configuration In the Server Name field, select the name of the XDB Server on which XDB Link is installed.

    In the Location field, specify the name of the DB2 location.

    In the Protocol field, select protocol this machine will use to commu-nicate with the XDB Server on which XDB Link is installed.

    Direct-connect configuration In the Location field, specify the name of the DB2 location.

    In the Protocol field, select DRDA.

  5. Set these additional options:
    • On the Security page, enable the Client Security option.
    • On the SQL page, set SQL Compatibility Mode to DB2.
  6. Click OK to close Options and save your settings.
  7. Start SQLWizard by selecting its icon in the XDB program group or folder.
  8. Use the Run Batch command on the File menu to run the script file XDBLINK.SQL against each host location. This file is located in the XDB program directory.