Skip Headers
Oracle® Transparent Gateway for DRDA Installation and User's Guide
10g Release 2 (10.2) for Microsoft Windows

Part Number B16218-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

10 Configuring the Gateway

After you have installed the gateway, configured your DRDA Server, and configured your SNA or TCP/IP software, you must configure the gateway.

This chapter contains the following sections:

Configuration Checklist

Choosing a Gateway System Identifier (SID)

Configuring the Host

Binding the DRDA Gateway Package

Binding Packages on DB2/Universal Database (DB2/UDB)

Before Binding the DRDA Gateway Package

Sample SQL scripts

Configuring the Oracle Integrating Server

Accessing the Gateway from Other Oracle Servers

Accessing Other DRDA Servers

Choosing a Gateway System Identifier (SID)

The gateway SID is a string of alphabetic and numeric characters that identifies a gateway instance. The SID is used in the file names of gateway parameter files and in the connection information that is associated with the Oracle server database links that access the gateway.

Enter the SID on the Worksheet

Enter the SID in Appendix E, "Configuration Worksheet".

A separate SID is required for each DRDA Server to be accessed. You might also have multiple SIDs for one DRDA Server to use different gateway parameter settings with that server. For information on configuring additional SIDs, refer to "Accessing Other DRDA Servers".

Gateway Configuration

The information in this chapter describes the configuration process for the gateway. All gateway parameters are kept in the initsid.ora gateway initialization file, which is stored in the gateway admin/ directory.

Configuring the Host

The data in this chapter describes the configuration process for the gateway. You should notice that most, if not all, gateway parameters have been moved into the initsid.ora initialization file. To configure the host for the Oracle Transparent Gateway for IBM DRDA, you tailor the parameter files for your installation.

To start with one of the provided sample configuration files, proceed to Step 1 below. To create entirely new configuration files, proceed to Step 2.


Note:

In previous versions of the gateway, the initialization parameters were stored in the files named initsid.ora and initsid.gtwboot in the gateway instance directories. With Release 10.1.0.2.0 of the gateway, most parameters that were in 'initsid.gtwboot' have been moved to initsid.ora. The syntax of the initsid.ora has been simplified. Refer to Appendix C for details.

When migrating from previous releases of TG4DRDA, please be aware of these differences.


Step 1: Copy the gateway initialization

Sample gateway initialization files (initsid.ora) are shipped on the distribution CD-ROM. These files are in the ORACLE_HOME\tg4drda\admin directory:

  • initDB2.ora, for DB2/OS390 remote servers

  • initDB2VM.ora, for DB2/VM remote servers

  • initAS400.ora, for DB2/400 remote servers

  • initDB2UDB.ora, for DB2/UDB remote servers

Copy one of these sample files into the same directory, renaming it with the name of your gateway SID. For example, if you chose your SID to be DRD1 in "Choosing a Gateway System Identifier (SID)", and if your remote server is DB2, then copy the initDB2.ora file and rename it initDRD1.ora.

Step 2: Determine settings for gateway initialization parameters

Your Configuration Worksheet in Appendix E should be complete. If not, review the incomplete entries and refer to the sections listed for more information. You need this information to tailor the gateway initialization file, initsid.ora.

Refer to Appendix C, "DRDA-Specific Parameters" for information on the DRDA-specific initsid.ora parameters.

Required Parameters

When you edit your initsid.ora file, you must change the values of all the parameters listed in the Configuration Worksheet in Appendix E, using the values in the right-hand column of the worksheet.

You will also need to set certain NLS gateway parameters. For more information on setting these parameters, refer to Appendix D, "National Language Support".

Optional Parameters

Several DRDA-specific parameters are not required, but you might want to change them. Unless otherwise indicated, these parameters are described in Appendix C.

Table 10-1 Optional DRDA-Specific Parameters

DRDA parameters Description

DRDA_DISABLE_CALL

Used to disable stored procedure support for DRDA Servers on which the gateway does not support stored procedures

DRDA_ISOLATION_LEVEL

Defines the package Isolation Level

HS_DB_NAME

Specifies the database SID name and must be set to the gateway SID

DRDA_OPTIMIZE_QUERY

Used for data query optimization

DRDA_PACKAGE_COLLID

Defines the package collection ID

DRDA_PACKAGE_NAME

Defines the name of the package

DRDA_PACKAGE_OWNER

Defines the owner of the package. By default, the owner is the user ID that is used when you run the g4drutl bind utility. This parameter is not valid for SQL/DS.

DRDA_PACKAGE_SECTIONS

Defines the maximum number of concurrent OPEN cursors at the remote server

HS_DB_DOMAIN

Specifies the gateway database domain


The values that are set in your initsid.ora file should work for most installations. Edit the values if changes are needed. For information on NLS-related initsid.ora parameters, refer to "NLS Parameters in the Gateway Initialization File".

Step 3: Tailor the initsid.ora File

After you have copied the sample initialization file, you will need to tailor it to your installation. While many parameters can be left to their defaults, some parameters must be changed for correct operation of the gateway. Give attention to the following DRDA and HS parameters. Also, give attention to the security aspects of the initialization file. Chapter 13, "Security Considerations", contains details on encryption of passwords that would otherwise be embedded in the initialization file. See Appendix C for a description of each parameter:

  • DRDA_CONNECT_PARM

  • DRDA_PACKAGE_COLLID

  • DRDA_PACKAGE_NAME

  • DRDA_PACKAGE_OWNER

  • DRDA_REMOTE_DB_NAME

  • FDS_CLASS

  • HS_DB_NAME

  • HS_DB_DOMAIN

Binding the DRDA Gateway Package

The product requires a package to be bound on the DRDA Server. The gateway has an internal, stored procedure that must be used to create this package. The internal stored procedure is called from an Oracle integrating server. (Refer to "Configuring Oracle Net" of Chapter 9, "Oracle Net". Also refer to "Configuring the Oracle Integrating Server" of this chapter.) Before this package can be bound on the DRDA Server, the gateway initialization file must be correctly configured. Refer to Appendix C.

  1. Log on to an Oracle integrating server

    Use either SQL*Plus or Server Manager:

    > sqlplus system/manager
    
    
  2. Create a database link

    Create a database link with a user ID and with a password that has proper authority on the DRDA Server to create packages.

    SQL> CREATE PUBLIC DATABASE LINK dblink
    2 CONNECT TO userid IDENTIFIED BY password 
    3 USING 'tns_name_entry' 
    
    

    Note:

    The user ID that is creating the public database link must have the "CREATE PUBLIC DATABASE LINK" privilege.

    Refer to "Configuring the Oracle Integrating Server" later in this chapter.

  3. Run the stored procedure GTW$_BIND_PKG

    SQL> exec GTW$_BIND_PKG@dblink; 
    SQL> COMMIT;
    
    

    This creates and commits the package. If any errors are reported, then correct the gateway initialization file parameters as needed.

Binding Packages on DB2/Universal Database (DB2/UDB)

If you are connecting to a DB2/UDB DRDA Server, then DB2/UDB requires that you create the ORACLE2PC table before binding the DRDA package. Other DRDA Servers enable you to bind the package before the ORACLE2PC table exists.

To create the ORACLE2PC table:

  1. Log in to the system where DB2/UDB is running.

    Check that you have the ability to address the DB2/UDB instance where the ORACLE2PC table will reside.

  2. Copy the following files.

    Copy from the ORACLE_HOME\tg4drda\install\db2udb directory:

    • o2pc.sql  (SQL script for creating the table)

    • o2pcg.sql (SQL script for granting package access to PUBLIC)

  3. Connect to the database.

    Use the user ID that you will use for binding the package:

    $ db2 'CONNECT TO database USER userid USING password'
    
    

    Note:

    The user ID must have CONNECT, CREATETAB, and BINDADD authority to be able to connect to the database, to create the table, and to create the package.

    For more information, refer to "DB2/UDB (Universal Database)".

  4. Create the ORACLE2PC table:

    $ db2 -tf o2pc.sql
    
    
  5. Commit the transaction:

    $ db2 'COMMIT'
    
    
  6. Optionally, verify that the table was created under the correct user ID:

    $ db2 'LIST TABLES FOR USER'
    $ db2 'COMMIT'
    
    
  7. Disconnect from the session:

    $ db2 'DISCONNECT CURRENT'
    

DRDA Gateway Package Considerations

The DRDA package must be bound with the internal stored procedure GTW$_BIND_PKG. You must perform this bind step if this release is the first time the gateway has been installed on the system. If you are upgrading from version 9 of the gateway, then a rebind is not necessary unless the initialization parameters have been changed.

The user ID used to bind or rebind the DRDA package must have the suitable privileges on the remote database, as described in Chapter 5, "Configuring the DRDA Server".

Before Binding the DRDA Gateway Package

Check DRDA parameter settings and create your ORACLE2PC table before binding the DRDA gateway package.

Step 1: Check all DRDA parameter settings

Check all DRDA parameter settings to be sure that they are set correctly before you start the bind. For example, the default for DRDA_DISABLE_CALL works only if your DRDA database supports stored procedures. If not, then you must change the setting. Also, the value for DRDA_PACKAGE_NAME must be unique if you have any older versions of the gateway installed. New packages replace any old packages with the same name, causing versions of the gateway that use the old package to fail. Refer to Appendix C for information on the parameters and their settings.

Step 2: If using DB2/UDB, then create ORACLE2PC table

If your DRDA Server is DB2/UDB, then create the ORACLE2PC table. Refer to "Binding Packages on DB2/Universal Database (DB2/UDB)" for information on creating the table.

Sample SQL scripts

SQL scripts are provided to perform steps such as creating the ORACLE2PC table, removing obsolete tables and views, using previous releases, and creating tables and views to provide data dictionary support. Use the correct subdirectory for your DRDA Server platform:

tg4drda\install\db2 for DB2/OS390

tg4drda\install\as400 for DB2/400

tg4drda\install\db2vm for DB2/VM

tg4drda\install\db2udb for DB2/UDB

These scripts must be run on the DRDA Server platform using a database native tool (such as SPUFI on DB2/OS390), because no tool is provided with the gateway to run these scripts. Note that when running these scripts, the user ID used must be suitably authorized.

Step 1:  Run Data Dictionary scripts

If your DRDA Server is DB2/OS390, DB2/400, or DB2/UDB, then run the following scripts to create the Data Dictionary tables and view.

Step 1a:  Upgrading from a previous gateway version

If you are upgrading from a previous version of the gateway then run the dropold.sql script to drop the old data dictionary definitions.

Step 1b: Creating the Data Dictionary tables and views

Run the g4ddtab.sql and g4ddvwXX.sql scripts to create the Data Dictionary tables and views:

g4ddvwr7.sql DB2/OS390 V7 (RACF security)

g4ddvws7.sql DB2/OS390 V7 (DB2 security)

g4ddvwr8.sql DB2/OS390 V8 (RACF security)

g4ddvws8.sql DB2/OS390 V8 (DB2 security)

g4ddvw51.sql DB2/400 V5.1

g4ddvw52.sql DB2/400 V5.2

g4ddvwu7.sql DB2/UDB V7

g4ddvwu8.sql DB2/UDB V8

Step 2: DB2/UDB or other server

Depending on the DRDA Server, perform one of the following steps:

Step 2a: If server is DB2/UDB, then grant authority to package

If your DRDA Server is DB2/UDB, then the ORACLE2PC table has already been created (see the previous sections). For all users to be able to use the table, run o2pcg.sql granting authority to all users.

Step 2b: If server is not DB2/UDB, then create the ORACLE2PC table

If your DRDA Server is not DB2/UDB, then the ORACLE2PC table must be created. Run o2pc.sql.

Backup and Recovery of Gateway Configuration

The configuration of the gateway is stored in the gateway initialization file. These files are stored in ORACLE_HOME\tg4drda\admin. Becausee they are simple text files, you may back them up using an archiving tool of your choice.

Configuring the Oracle Integrating Server

Configure the Oracle integrating server, regardless of the platform on which it is installed. It can be on the host, but this is not required.

Step 1: Create a database link

To access the DRDA Server, you must create a public database link. A public database link is the most common of database links. Refer to "Processing a Database Link" for information about creating database links. In the following example, the Oracle Database server and the gateway are on the same host.

CREATE PUBLIC DATABASE LINK DB2 USING 'tns_name_entry'


Note:

The user ID that is creating the public database link must have the "CREATE PUBLIC DATABASE LINK" privilege.

Step 2: Create synonyms and views

To facilitate accessing data using the gateway, define synonyms and views for the DRDA data tables. If needed, then perform GRANT statements to ensure that the synonyms and views are accessible to the correct groups of users. For more information, refer to "Using the Synonym Feature".

Accessing the Gateway from Other Oracle Servers

Perform the following steps for each of the Oracle integrating servers from which you want to access the gateway:

  1. Create a database link with which to access the gateway.

  2. Define synonyms and views for tables.

    These are for tables that are accessed through the gateway, if needed.

  3. Perform GRANT statements.

    These statements are for the synonyms and views that you create.

Provide local or Oracle Net access from the Oracle servers to the gateway.

Accessing Other DRDA Servers

To access other DRDA Servers from the Oracle integrating server, use the following steps:

  1. Configure another APPC profile set for the DRDA Server.

    Only Side Information and Partner LU Profiles must be new. You can point to existing configuration information for other profiles unless you need to modify other aspects of the connection. For example, if you are using a different network adapter, then you must configure an entire APPC profile set. No additional profiles need to be configured for TCP/IP.

  2. Configure additional DRDA Server instances.

    To configure an additional instance, create new gateway initialization files. If you are using Oracle Net, then add entries to the listener.ora file and the tnsnames.ora file with the new SIDs.

    Other components, including the gateway ORACLE_HOME directory structure, can be shared among multiple gateway instances.

  3. Bind the DRDA package to the DRDA Server.

Gateway Installation and Configuration Complete

The Oracle Transparent Gateway for DRDA installation and configuration process is now complete. The gateway is ready for use.