| Oracle Transparent Gateway for IBM DRDA Installation and User's Guide Release 9.2.0.1.0 for UNIX Part Number A96194-02 |
|
After you have installed the gateway, configured your DRDA server, and configured your SNA or TCP/IP software, then you must configure the gateway. Some of these tasks involve customizing the Gateway Initialization File.
This chapter includes the following sections:
The gateway SID is a string of alphabetic and numeric characters that identifies a gateway instance. The SID is used in the filenames of gateway parameter files and in the connection information associated with the Oracle server database links that access the gateway.
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. Refer to "Accessing Other DRDA Servers" for information on configuring additional SIDs.
The data in this chapter describe the configuration process for the gateway. You should notice that most, if not all, gateway parameters may be moved into the initsid.ora initialization file, which would allow you to omit the Startup Shell Script. However, the Startup Shell Script provides an environment for troubleshooting and debugging if any problems occur with the gateway. The only advantage of removing the Startup Shell Script is a small decrease in gateway startup time. If this decrease in startup time is important to you in your usage of the gateway, then please contact Oracle Support Services for details on further configuration in this manner.
To configure the host for the Oracle Transparent Gateway for IBM DRDA, you tailor the parameter files for your installation.
In previous versions of the gateway, the initialization parameters were stored in files named initsid.ora and initsid.gtwboot in the gateway instance directories. With version 9i of the gateway, most parameters that were in initsid.gtwboot have been moved to a Startup Shell Script file. The syntax of the Startup Shell Script is that of the UNIX Bourne shell. The syntax of the initsid.ora has been simplified. Refer to Appendix C for details.
When migrating from previous releases of Oracle Transparent Gateway for IBM DRDA, please be aware of these differences.
First, choose a model startup shell script. Samples are stored in the $ORACLE_HOME/tg4drda/admin directory. The following list shows the startup shell scripts for various DRDA server platforms:
In previous versions of the gateway, a startup program was provided, named g4drdrv. This program was specified at the PROGRAM parameter in the listener.ora file. This program also was responsible for reading the initsid.gtwboot and starting the gateway server itself.
In version 9i of the gateway, this process has been moved to a shell script. Most of the init parameters that were stored in the initsid.gtwboot are now stored in this Startup Shell Script, and the name of the script will now be used as the PROGRAM parameter in the listener.ora file. Sample scripts, named 'drdaXXX.sh' are stored in the $ORACLE_HOME/tg4drda/admin directory. Copy one to a name of your choosing and move it to the $ORACLE_HOME/bin directory.
After an appropriate model of startup shell script has been chosen, copy it to a name of your choosing in the $ORACLE_HOME/bin directory. For example:
$ cp $ORACLE_HOME/tg4drda/admin/drdaDB2.sh $ORACLE_HOME/bin/drdahoa1.sh
The Startup Shell Script file contains parameters that govern:
Customize the file you created in Step 2 as needed to tailor the Startup Shell Script file for your installation.
NOTE: If you are using TCP/IP, then do not perform the instructions for changing environmental variable settings for SNA.
The initsid.ora gateway initialization file defines the operating parameters for the gateway. Samples (tailored for each type of DRDA server) are provided as a starting point for tailoring to your particular installation. The samples are stored in the $ORACLE_HOME/tg4drda/admin directory. The following is a list of the initialization files for various DRDA server platforms:
Choose a sample initialization file and copy it, within the same directory, to the name of the gateway SID, using the following naming convention:
initSID.ora
where SID is the chosen gateway SID. For example, if the chosen gateway SID were DRDA, then the initialization file would be named initDRDA.ora.
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. Attention should be given to the following DRDA & HS parameters. Attention should also be given to the security aspects of the initialization file. Chapter 15, "Security Considerations" contains details on using the g4drpwd utility to handle encryption of passwords that would otherwise be embedded in the initialization file. See Appendix C for a description of each parameter:
The product requires a package to be bound on the DRDA server. The gateway has an internal, stored procedure which must be used to create this package. The internal, stored procedure is invoked from an Oracle integrating server. (Refer to "Configuring Oracle Net". Also refer to "Configuring the Oracle Integrating Server" in this chapter.) Before this package can be bound on the DRDA server, the Gateway Initialization File must be correctly configured, and a Startup Shell Script must be chosen and configured (refer to Appendix C, "DRDA-Specific Parameters").
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" for more information.
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 and re-execute the bind procedure above.
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 allow you to bind the package before the ORACLE2PC table exists.
To create the ORACLE2PC table:
Check that you have the ability to address the DB2/UDB instance where the ORACLE2PC table will reside.
Copy the following files from the $ORACLE_HOME/tg4drda/install/db2udb directory:
Connect to the database using the user ID that you will use for binding the package:
$ db2 'CONNECT TO database USER userid USING password'
Note that the user ID must have CONNECT, CREATETAB, and BINDADD authority to be able to connect to the database, create the table, and create the package.
$ db2 -tf o2pc.sql
$ db2 'COMMIT'
Optionally, verify the table was created under the correct user ID:
$ db2 'LIST TABLES FOR USER' $ db2 'COMMIT'
$ 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 this system. If you are upgrading from version 4 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 appropriate 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 only works 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 your 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.
Choose the appropriate subdirectory for your DRDA server platform from the following list:
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 execute these scripts. Note that when running these scripts, the user ID used must be suitably authorized.
If your DRDA server is DB2/OS390 or DB2/400, 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 g4ddview.sql scripts to create the Data Dictionary tables and views:
Depending on your DRDA server, perform one of the following steps:
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.
If your DRDA server is not DB2/UDB, then the ORACLE2PC table must be created. Run o2pc.sql.
The configuration of the gateway is stored in the Gateway Initialization File and in the Startup Shell Script. These are stored in $ORACLE_HOME/tg4drda/admin and $ORACLE_HOME/bin, respectively. Since they are simple 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 on creating database links. In the following example, the Oracle server gateway is on the same host. Replace linkname with the name you used for the database link when you added your entry to the tnsnames.ora file (refer to Chapter 12, "Oracle Net", "Step 2: Modify tnsnames.ora file").
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, perform GRANT statements to ensure that the synonyms and views are accessible to the appropriate groups of users. Refer to "Using the Synonym Feature" for information.
Perform the following steps for each of the Oracle servers from which you want to access the gateway:
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:
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 SNA profile set. No additional profiles need to be configured for TCP/IP.
To configure an additional instance, create new Startup Shell Scripts and new Gateway Initialization Files. If you are using Oracle Net, then add entries to the listener.ora file and tnsnames.ora file with the new SIDs.
Other components, including the gateway ORACLE_HOME directory structure, can be shared among multiple gateway instances.
The Oracle Transparent Gateway for IBM DRDA installation and configuration process is now complete. The gateway is ready for use.
|
|
![]() Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|