Oracle® Transparent Gateway for DRDA Installation and User's Guide 10g Release 2 (10.2) for Microsoft Windows Part Number B16218-01 |
|
|
View PDF |
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:
Choosing a Gateway System Identifier (SID)
Binding the DRDA Gateway Package
Step 2: Create a database link
Binding Packages on DB2/Universal Database (DB2/UDB)
Step 2: Copy the following files.
Step 3: Connect to the database.
Step 4: Create the ORACLE2PC table:
Step 5: Commit the transaction:
Step 6: Optionally, verify that the table was created under the correct user ID:
Step 7: Disconnect from the session:
Before Binding the DRDA Gateway Package
Step 2a: If server is DB2/UDB, then grant authority to package
Step 2b: If server is not DB2/UDB, then create the ORACLE2PC table
Configuring the Oracle Integrating Server
Accessing the Gateway from Other Oracle Servers
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 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".
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.
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. |
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.
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.
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".
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 |
---|---|
|
Used to disable stored procedure support for DRDA Servers on which the gateway does not support stored procedures |
|
Defines the package Isolation Level |
|
Specifies the database SID name and must be set to the gateway SID |
|
Used for data query optimization |
|
Defines the package collection ID |
|
Defines the name of the package |
|
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. |
|
Defines the maximum number of concurrent OPEN cursors at the remote server |
|
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".
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
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.
Log on to an Oracle integrating server
Use either SQL*Plus or Server Manager:
> sqlplus system/manager
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'
Refer to "Configuring the Oracle Integrating Server" later in this chapter.
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.
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:
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.
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)
Connect to the database.
Use the user ID that you will use for binding the package:
$ db2 'CONNECT TO database USER userid USING password'
For more information, refer to "DB2/UDB (Universal Database)".
Create the ORACLE2PC table:
$ db2 -tf o2pc.sql
Commit the transaction:
$ db2 'COMMIT'
Optionally, verify that the table was created under the correct user ID:
$ db2 'LIST TABLES FOR USER' $ db2 'COMMIT'
Disconnect from the session:
$ db2 'DISCONNECT CURRENT'
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".
Check DRDA parameter settings and create your ORACLE2PC table before binding the DRDA gateway package.
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.
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.
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.
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.
If you are upgrading from a previous version of the gateway then run the dropold.sql
script to drop the old data dictionary definitions.
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
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.
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.
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.
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'
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".
Perform the following steps for each of the Oracle integrating servers from which you want to access the gateway:
Create a database link with which to access the gateway.
Define synonyms and views for tables.
These are for tables that are accessed through the gateway, if needed.
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.
To access other DRDA Servers from the Oracle integrating server, use the following steps:
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.
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.
Bind the DRDA package to the DRDA Server.