Previous Topic Next topic Print topic


To create a default DBRM and package in DB2 for XDB Link

Before you can use XDB Link, you must create a default DBRM for the link, and bind it to DB2. The default DBRM creates a package that XDB Link uses to execute dynamic SQL statements from your application, and to execute statically-bound SQL statements contained in the XDB Link program itself.

Follow these directions only once for each DB2 location with which you will use the XDB Link. See the Link Configuration Guide for more information.

Note:

Do not use the same default package in DB2 for more than one user group or application. To support multiple user groups or applications, you must generate a separate default DBRM and package for each on. After the first application or group uses the Gateway Profile Utility's default values, the development team must agree on the package name and collection ID with which to identify the remaining default packages. See the Link Configuration Guide for more information.

  1. In the Bind Utility window, from the Remote Location drop-down list, select the desired DB2 location.
  2. Click Default. The Create Default DBRM dialog box appears.
  3. Specify the Collection ID, Package Name, Host System, and number of Dynamic Sections.
  4. Click Create. Bind generates a default DBRM that you will use to create a package for the Link. The DBRM is stored locally in your default working directory as a .DBR file.
    Note:

    The DBRM for XDB Link contains three packages. The name of these packages are derived by combining the XDB Link package name with the letters A, B and C. For example, if your package name is XDBSYS, packages XDBSYSA, XDBSYSB and XDBSYSC are created.

  5. In the Bind Utility main window, click Bind. The Bind Package dialog box appears.
  6. In the Bind Package dialog box, select the name of the DBRM file you just created from the DBRM File Name drop-down list.
  7. If desired, set the Package Version, Isolation Level, and Action.
  8. If desired, click the Bind... button to configure additional bind options.
  9. If desired, click the Format... button to specify data formats associated with the DBRM.
  10. Click Execute. Bind creates a package in the selected DB2 location and updates the relevant DB2 tables. The Status bar indicates when the procedure is complete.
Note:
  • The Bind Utility automatically grants execute privileges to all users. Use the SQLWizard to revoke GRANT EXECUTE privileges where necessary.
  • Each time you bind a DBRM, the Bind Utility creates a log file (.LOG) in which it records all errors that occur during the bind. The .LOG file is stored in locally in the same directory as your DBRM (.LOG).

    If no error has occurred during the binding of a particular DBRM, the log file does not exist.

Previous Topic Next topic Print topic