4.1 Gateway Appearance to Application Programs

An application that is written to access information in a DRDA database interfaces with an Oracle database.

When developing applications, keep the following information in mind:

  • You must define the DRDA database to the application by using a database link that is defined in the Oracle database. Your application should specify tables that exist on a DRDA database by using the name that is defined in the database link. For example, assume that a database link is defined so that it names the DRDA database link DRDA, and also assume that an application needs to retrieve data from an Oracle database and from the DRDA database. Use the following SQL statement joining two tables together in your application:
    SELECT EMPNO, SALARY
    FROM EMP L, EMPS@DRDA R
    WHERE L.EMPNO = R.EMPNO
    

    In this example, EMP is a table on an Oracle database, and EMPS is a table on a DRDA server. You can also define a synonym or a view on the DRDA server table, and access the information without the database link suffix.

  • You can read and write data to a defined DRDA database. SELECT, INSERT, UPDATE, and DELETE are all valid operations.
  • A single transaction can write to one DRDA database and to multiple Oracle databases.
  • Single SQL statements, using JOINs, can refer to tables in multiple Oracle databases, in multiple DRDA databases, or in both.

4.1.1 Fetch Reblocking

Oracle database supports fetch reblocking with the HS_RPC_FETCH_REBLOCKING parameter.

When the value of this parameter is set to ON (the default), the array size for SELECT statements is determined by the HS_RPC_FETCH_SIZE value. The HS_RPC_FETCH_SIZE parameter defines the number of bytes sent with each buffer from the gateway to the Oracle database. The buffer may contain one or more qualified rows from the DRDA server. This feature can provide significant performance enhancements, depending on your application design, installation type, and workload.

The array size between the client and the Oracle database is determined by the Oracle application. Refer to Oracle Database Gateway Installation and Configuration Guide for IBM AIX on POWER Systems (64-Bit), Linux x86-64, Oracle Solaris on SPARC (64-Bit), Oracle Solaris on x86-64 (64-Bit) and HP-UX Itanium or Oracle Database Gateway Installation and Configuration Guide for Microsoft Windows , depending on your platform, for more information.